From bcba2f556b578be6ca78cd806d91df41fec72feb Mon Sep 17 00:00:00 2001 From: seven332 Date: Fri, 13 Jun 2014 22:47:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=A7=BB=E8=87=B3?= =?UTF-8?q?=20string.xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- res/layout/dir_selection.xml | 2 +- res/values-zh-rCN/strings.xml | 12 ++++++- res/values/strings.xml | 33 ++++++++++++------- .../hippo/ehviewer/ui/FavouriteActivity.java | 25 ++++++++------ .../hippo/ehviewer/ui/MangaListActivity.java | 2 +- .../hippo/ehviewer/ui/SettingsActivity.java | 2 +- 6 files changed, 50 insertions(+), 26 deletions(-) diff --git a/res/layout/dir_selection.xml b/res/layout/dir_selection.xml index 8ac4b40c2..b009281c7 100644 --- a/res/layout/dir_selection.xml +++ b/res/layout/dir_selection.xml @@ -36,6 +36,6 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:textColor="@android:color/holo_red_dark" - android:text="当前路径不可写" /> + android:text="@string/cur_dir_not_writable" /> \ No newline at end of file diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 828f2ac7c..b77dff85e 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -60,7 +60,7 @@ 切换至标签搜索模式 - 共 %d 页 + 第 %d 页,共 %d 页 跳至: 非法页面 @@ -149,6 +149,14 @@ 本地收藏 + 选择项目 + 移动至何处? + 正在移动… + 移动成功 + 移动失败 + 目标与源相同 + 删除成功 + 删除失败 显示 @@ -305,6 +313,7 @@ 感觉快要窒息了 + 重试 本地 标签 已复制 @@ -368,4 +377,5 @@ 左划更多 重启应用以便生效 + 当前文件夹不可写 \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 7a2e06a83..93b3dc812 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -37,15 +37,14 @@ Checking login status - Login succeeded - Login failed + Login succeedfully + Failed to login Login or not What are the benefits of login ? Do not login - - Logout succeeded - Logout failed + Logout succeedfully + Failed to logout No keyword is OK @@ -64,7 +63,7 @@ Switch To Tag Search Mode - %d pages in total + Page %d, %d pages in total Jump to : Invalid page @@ -151,6 +150,14 @@ Local Favorite + Select item + Where to move ? + Moving… + Move successfully + Failed to move + The same Source and Destination + Delete successfully + Failed to delete Display @@ -258,8 +265,8 @@ Start download task Download task finished Downloading - download successfully - download unsuccessfully + Download successfully + Failed to download Not started Waiting Please wait for the last operation @@ -275,13 +282,13 @@ Please login to avoid Sad Panda. - Vote succeeded - Vote failed + Vote successfully + Failed to vote Invalid rating - Rate succeeded - Rate failed + Rate successfully + Failed to rate 该用户上传的其他内容 @@ -313,6 +320,7 @@ DISASTER + Retry Local Tag Copyed @@ -377,4 +385,5 @@ Swipe left Restart the application to take effect + Current directory is not writable \ No newline at end of file diff --git a/src/com/hippo/ehviewer/ui/FavouriteActivity.java b/src/com/hippo/ehviewer/ui/FavouriteActivity.java index cfcbf6c9b..47caf9111 100644 --- a/src/com/hippo/ehviewer/ui/FavouriteActivity.java +++ b/src/com/hippo/ehviewer/ui/FavouriteActivity.java @@ -351,7 +351,7 @@ public class FavouriteActivity extends AbstractGalleryActivity public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.favorite_choice, menu); - mode.setTitle("Select Items"); // TODO + mode.setTitle(R.string.select_item); return true; } @@ -370,7 +370,7 @@ public class FavouriteActivity extends AbstractGalleryActivity private void startMoveFromLocal2Cloud() { mPdb = new ProgressDialogBulider(FavouriteActivity.this); - mPdb.setCancelable(false).setTitle("正在移动..."); + mPdb.setCancelable(false).setTitle(R.string.moving); mPdb.setMax(mChoiceGiSetCopy.size()).setProgress(0); mProgressDialog = mPdb.create(); mProgressDialog.show(); @@ -407,7 +407,8 @@ public class FavouriteActivity extends AbstractGalleryActivity public void onActionClicked() { startMoveFromLocal2Cloud(); } - }, 0, "移动失败", R.drawable.ic_warning, "重试", true); + }, 0, mResources.getString(R.string.failed_to_move), + R.drawable.ic_warning, mResources.getString(R.string.retry), true); } }); } else { @@ -416,18 +417,19 @@ public class FavouriteActivity extends AbstractGalleryActivity mPdb = null; mProgressDialog.dismiss(); mProgressDialog = null; - new SuperToast(this, "移动成功").show(); // TODO + new SuperToast(this, R.string.move_successfully).show(); } } private AlertDialog createMoveDialog(final ActionMode mode) { - return new DialogBuilder(this).setTitle("移动至何处?") // TODO + return new DialogBuilder(this).setTitle(R.string.where_to_move) .setItems(mMenuTitles, new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { if (mMenuIndex == position) { - new SuperToast(FavouriteActivity.this, "目标与源相同", SuperToast.WARNING).show(); + new SuperToast(FavouriteActivity.this, R.string.dst_src_same, + SuperToast.WARNING).show(); return; } @@ -443,14 +445,16 @@ public class FavouriteActivity extends AbstractGalleryActivity mMoveDialog = null; mClient.modifyFavorite(getGids(mChoiceGiSetCopy), mTargetCat, - mMenuIndex -1, new Modify("移动成功", "移动失败", true)); + mMenuIndex -1, new Modify(mResources.getString(R.string.move_successfully), + mResources.getString(R.string.failed_to_move), true)); mHlv.setRefreshing(true); } else { // change cloud dir mMoveDialog.dismiss(); mMoveDialog = null; mClient.modifyFavorite(getGids(mChoiceGiSetCopy), mTargetCat, - mMenuIndex -1, new Modify("移动成功", "移动失败", false)); + mMenuIndex -1, new Modify(mResources.getString(R.string.move_successfully), + mResources.getString(R.string.failed_to_move), false)); mHlv.setRefreshing(true); } } @@ -475,7 +479,8 @@ public class FavouriteActivity extends AbstractGalleryActivity } else { mTargetCat = -1; mClient.modifyFavorite(getGids(mChoiceGiSet), mTargetCat, - mMenuIndex -1, new Modify("删除成功", "删除失败", false)); + mMenuIndex -1, new Modify(mResources.getString(R.string.delete_successfully), + mResources.getString(R.string.failed_to_delete), false)); mHlv.setRefreshing(true); } mode.finish(); @@ -536,7 +541,7 @@ public class FavouriteActivity extends AbstractGalleryActivity public void onFailure(String eMsg) { mHlv.setRefreshing(false); showToastBar(new Remodify(mSuccStr, mFailStr, mToLocal), 0, mFailStr + ": " + eMsg, - R.drawable.ic_action_redo, "重试", true); // TODO + R.drawable.ic_action_redo, mResources.getString(R.string.retry), true); } } diff --git a/src/com/hippo/ehviewer/ui/MangaListActivity.java b/src/com/hippo/ehviewer/ui/MangaListActivity.java index 7710f3622..1d37b0e5b 100644 --- a/src/com/hippo/ehviewer/ui/MangaListActivity.java +++ b/src/com/hippo/ehviewer/ui/MangaListActivity.java @@ -534,7 +534,7 @@ public class MangaListActivity extends AbstractGalleryActivity LayoutInflater inflater = this.getLayoutInflater(); View view = inflater.inflate(R.layout.jump, null); TextView tv = (TextView)view.findViewById(R.id.list_jump_sum); - tv.setText(String.format(getString(R.string.jump_sum), getMaxPage())); // TODO + tv.setText(String.format(getString(R.string.jump_summary), getCurPage() + 1, getMaxPage())); tv = (TextView)view.findViewById(R.id.list_jump_to); tv.setText(R.string.jump_to); final EditText et = (EditText)view.findViewById(R.id.list_jump_edit); diff --git a/src/com/hippo/ehviewer/ui/SettingsActivity.java b/src/com/hippo/ehviewer/ui/SettingsActivity.java index 30ac23f14..7d94b659c 100644 --- a/src/com/hippo/ehviewer/ui/SettingsActivity.java +++ b/src/com/hippo/ehviewer/ui/SettingsActivity.java @@ -434,7 +434,7 @@ public class SettingsActivity extends AbstractPreferenceActivity { public void onClick(View v) { if (!fileExplorerView.canWrite()) new SuperToast(mActivity).setIcon(R.drawable.ic_warning) - .setMessage("当前路径不可写").show(); + .setMessage(R.string.cur_dir_not_writable).show(); else { String downloadPath = fileExplorerView.getCurPath();