Commit 977621f6 authored by fallenstardust's avatar fallenstardust

arrange strings.xml

parent a268e3f0
...@@ -153,14 +153,14 @@ public class YGODialogUtil { ...@@ -153,14 +153,14 @@ public class YGODialogUtil {
ll_add.setOnClickListener(new View.OnClickListener() { ll_add.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
du.dialogl("新建", new String[]{"分类", "卡组"}).setOnItemClickListener(new AdapterView.OnItemClickListener() { du.dialogl(context.getString(R.string.new_deck), new String[]{context.getString(R.string.category_name), context.getString(R.string.deck_name)}).setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
du.dis(); du.dis();
switch (position) { switch (position) {
case 0: case 0:
DialogPlus builder = new DialogPlus(context); DialogPlus builder = new DialogPlus(context);
builder.setTitle("请输入分类名"); builder.setTitle(R.string.please_input_category_name);
EditText editText = new EditText(context); EditText editText = new EditText(context);
editText.setGravity(Gravity.TOP | Gravity.LEFT); editText.setGravity(Gravity.TOP | Gravity.LEFT);
editText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); editText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
...@@ -172,7 +172,7 @@ public class YGODialogUtil { ...@@ -172,7 +172,7 @@ public class YGODialogUtil {
builder.setLeftButtonListener((dlg, s) -> { builder.setLeftButtonListener((dlg, s) -> {
String name = editText.getText().toString().trim(); String name = editText.getText().toString().trim();
if (TextUtils.isEmpty(name)) { if (TextUtils.isEmpty(name)) {
YGOUtil.show("名称不能为空"); YGOUtil.show(context.getString(R.string.invalid_category_name));
return; return;
} }
File file = new File(AppsSettings.get().getDeckDir(), name); File file = new File(AppsSettings.get().getDeckDir(), name);
...@@ -198,7 +198,7 @@ public class YGODialogUtil { ...@@ -198,7 +198,7 @@ public class YGODialogUtil {
public void onClick(View v) { public void onClick(View v) {
List<DeckType> otherType = getOtherTypeList(); List<DeckType> otherType = getOtherTypeList();
du.dialogl("请选择要移动到的分类", getStringType(otherType)).setOnItemClickListener(new AdapterView.OnItemClickListener() { du.dialogl(context.getString(R.string.please_select_target_category), getStringType(otherType)).setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
du.dis(); du.dis();
...@@ -212,7 +212,7 @@ public class YGODialogUtil { ...@@ -212,7 +212,7 @@ public class YGODialogUtil {
} }
deckList.remove(deckFile); deckList.remove(deckFile);
} }
YGOUtil.show("移动完毕"); YGOUtil.show(context.getString(R.string.done));
onDeckMenuListener.onDeckMove(deckAdp.getSelectList(), toType); onDeckMenuListener.onDeckMove(deckAdp.getSelectList(), toType);
clearDeckSelect(); clearDeckSelect();
} }
...@@ -225,7 +225,7 @@ public class YGODialogUtil { ...@@ -225,7 +225,7 @@ public class YGODialogUtil {
public void onClick(View v) { public void onClick(View v) {
List<DeckType> otherType = getOtherTypeList(); List<DeckType> otherType = getOtherTypeList();
du.dialogl("请选择要复制到的分类", getStringType(otherType)).setOnItemClickListener(new AdapterView.OnItemClickListener() { du.dialogl(context.getString(R.string.please_select_target_category), getStringType(otherType)).setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
du.dis(); du.dis();
...@@ -239,7 +239,7 @@ public class YGODialogUtil { ...@@ -239,7 +239,7 @@ public class YGODialogUtil {
} }
deckList.remove(deckFile); deckList.remove(deckFile);
} }
YGOUtil.show("复制完毕"); YGOUtil.show(context.getString(R.string.done));
onDeckMenuListener.onDeckCopy(deckAdp.getSelectList(), toType); onDeckMenuListener.onDeckCopy(deckAdp.getSelectList(), toType);
clearDeckSelect(); clearDeckSelect();
} }
...@@ -251,13 +251,13 @@ public class YGODialogUtil { ...@@ -251,13 +251,13 @@ public class YGODialogUtil {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (deckAdp.getSelectList().size() == 0) { if (deckAdp.getSelectList().size() == 0) {
YGOUtil.show("未选中卡组"); YGOUtil.show(context.getString(R.string.no_deck_is_selected));
return; return;
} }
DialogPlus dialogPlus = new DialogPlus(context); DialogPlus dialogPlus = new DialogPlus(context);
dialogPlus.setMessage("确定删除这些卡组吗?"); dialogPlus.setMessage(R.string.question_delete_deck);
dialogPlus.setLeftButtonText(YGOUtil.s(R.string.delete)); dialogPlus.setLeftButtonText(YGOUtil.s(R.string.delete));
dialogPlus.setRightButtonText("取消"); dialogPlus.setRightButtonText(R.string.Cancel);
dialogPlus.setLeftButtonListener(new DialogInterface.OnClickListener() { dialogPlus.setLeftButtonListener(new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
...@@ -266,7 +266,7 @@ public class YGODialogUtil { ...@@ -266,7 +266,7 @@ public class YGODialogUtil {
new File(deckFile.getPath()).delete(); new File(deckFile.getPath()).delete();
deckList.remove(deckFile); deckList.remove(deckFile);
} }
YGOUtil.show("删除完毕"); YGOUtil.show(context.getString(R.string.done));
dialogPlus.dismiss(); dialogPlus.dismiss();
onDeckMenuListener.onDeckDel(selectDeckList); onDeckMenuListener.onDeckDel(selectDeckList);
clearDeckSelect(); clearDeckSelect();
...@@ -314,7 +314,7 @@ public class YGODialogUtil { ...@@ -314,7 +314,7 @@ public class YGODialogUtil {
} }
} }
IOUtils.delete(file); IOUtils.delete(file);
YGOUtil.show("删除完毕"); YGOUtil.show(context.getString(R.string.done));
onDeckMenuListener.onDeckDel(deckFileList); onDeckMenuListener.onDeckDel(deckFileList);
typeAdp.remove(positon); typeAdp.remove(positon);
if (typeAdp.getSelectPosition() == positon) { if (typeAdp.getSelectPosition() == positon) {
......
...@@ -12,6 +12,7 @@ import java.util.List; ...@@ -12,6 +12,7 @@ import java.util.List;
import cn.garymb.ygomobile.bean.DeckType; import cn.garymb.ygomobile.bean.DeckType;
import cn.garymb.ygomobile.bean.events.DeckFile; import cn.garymb.ygomobile.bean.events.DeckFile;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.adapters.TextSelectAdapter; import cn.garymb.ygomobile.ui.adapters.TextSelectAdapter;
import cn.garymb.ygomobile.ui.plus.DialogPlus; import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.utils.IOUtils; import cn.garymb.ygomobile.utils.IOUtils;
...@@ -52,9 +53,9 @@ public class DeckTypeTouchHelperCallback extends ItemTouchHelper.Callback { ...@@ -52,9 +53,9 @@ public class DeckTypeTouchHelperCallback extends ItemTouchHelper.Callback {
TextSelectAdapter textSelectAdapter = ((TextSelectAdapter) recyclerView.getAdapter()); TextSelectAdapter textSelectAdapter = ((TextSelectAdapter) recyclerView.getAdapter());
DialogPlus dialogPlus = new DialogPlus(recyclerView.getContext()); DialogPlus dialogPlus = new DialogPlus(recyclerView.getContext());
dialogPlus.setMessage("确定删除该分类吗?分类下的卡组也将全部被删除"); dialogPlus.setMessage(R.string.delete_confirm);
dialogPlus.setLeftButtonText("删除"); dialogPlus.setLeftButtonText(R.string.delete);
dialogPlus.setRightButtonText("取消"); dialogPlus.setRightButtonText(R.string.Cancel);
dialogPlus.setLeftButtonListener(new DialogInterface.OnClickListener() { dialogPlus.setLeftButtonListener(new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
......
...@@ -254,4 +254,10 @@ ...@@ -254,4 +254,10 @@
<string name="category_pack">한 갑</string> <string name="category_pack">한 갑</string>
<string name="category_windbot_deck">AI 덱</string> <string name="category_windbot_deck">AI 덱</string>
<string name="category_Uncategorized">분류되지 않은</string> <string name="category_Uncategorized">분류되지 않은</string>
<string name="please_input_category_name">카테고리 이름을 입력하십시오.</string>
<string name="invalid_category_name">잘못된 카테고리</string>
<string name="please_select_target_category">카테고리를 지정하십시오.</string>
<string name="delete_confirm">카테고리 전부 삭제</string>
<string name="no_deck_is_selected">덱이 선택되지 않았습니다.</string>
<string name="done">완료!</string>
</resources> </resources>
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
<string name="deck_manager_v2">组卡器V2</string> <string name="deck_manager_v2">组卡器V2</string>
<string name="reset_game_ver_fail">重置游戏版本失败</string> <string name="reset_game_ver_fail">重置游戏版本失败</string>
<string name="deck_name">卡组</string> <string name="deck_name">卡组</string>
<string name="category_name">卡组分类</string>
<string name="save_quit">保存并退出</string> <string name="save_quit">保存并退出</string>
<string name="tip_reset_game_res">游戏数据检查完成</string> <string name="tip_reset_game_res">游戏数据检查完成</string>
<string name="join_helper_tip">你可以把常约战的服务器拖到第一位 <string name="join_helper_tip">你可以把常约战的服务器拖到第一位
...@@ -256,4 +257,10 @@ ...@@ -256,4 +257,10 @@
<string name="category_pack">卡包展示</string> <string name="category_pack">卡包展示</string>
<string name="category_windbot_deck">人机卡组</string> <string name="category_windbot_deck">人机卡组</string>
<string name="category_Uncategorized">未分类卡组</string> <string name="category_Uncategorized">未分类卡组</string>
<string name="please_input_category_name">请输入新卡组分类名</string>
<string name="invalid_category_name">无效的名称</string>
<string name="please_select_target_category">要放到哪个的分类</string>
<string name="delete_confirm">确定删除该分类吗,分类下的卡组也将全部被删除</string>
<string name="no_deck_is_selected">未选中卡组</string>
<string name="done">完成!</string>
</resources> </resources>
...@@ -210,6 +210,7 @@ ...@@ -210,6 +210,7 @@
<string name="deck_manager_v2">Deck Manager V2</string> <string name="deck_manager_v2">Deck Manager V2</string>
<string name="reset_game_ver_fail">reset game version fail</string> <string name="reset_game_ver_fail">reset game version fail</string>
<string name="deck_name">Deck</string> <string name="deck_name">Deck</string>
<string name="category_name">Deck Category</string>
<string name="save_quit">Save and quit</string> <string name="save_quit">Save and quit</string>
<string name="tip_reset_game_res">Reset game resources completed</string> <string name="tip_reset_game_res">Reset game resources completed</string>
<string name="join_helper_tip">you can move your favourite sever on top <string name="join_helper_tip">you can move your favourite sever on top
...@@ -259,4 +260,10 @@ ...@@ -259,4 +260,10 @@
<string name="category_pack">Pack</string> <string name="category_pack">Pack</string>
<string name="category_windbot_deck">BotDeck</string> <string name="category_windbot_deck">BotDeck</string>
<string name="category_Uncategorized">UncategorizedDeck</string> <string name="category_Uncategorized">UncategorizedDeck</string>
<string name="please_input_category_name">please input category name</string>
<string name="invalid_category_name">invalid category name</string>
<string name="please_select_target_category">please select target category</string>
<string name="delete_confirm">will delete all deck of this Category</string>
<string name="no_deck_is_selected">no_deck_is_selected</string>
<string name="done">done!</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment