From 16fb0b04d8261628be8004fa74e2b268e19c67e0 Mon Sep 17 00:00:00 2001 From: lioncash Date: Tue, 1 Oct 2013 10:32:05 -0400 Subject: [PATCH] [Android] Externalize how the formatting is used in the file size string, the file clicked string, and the current dir string. --- Source/Android/res/values-ja/strings.xml | 6 +++--- Source/Android/res/values/strings.xml | 6 +++--- .../dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java | 4 ++-- .../dolphinemu/dolphinemu/gamelist/GameListFragment.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Android/res/values-ja/strings.xml b/Source/Android/res/values-ja/strings.xml index cceb520733..a316621ee6 100644 --- a/Source/Android/res/values-ja/strings.xml +++ b/Source/Android/res/values-ja/strings.xml @@ -13,9 +13,9 @@ サポートのOpenGL ES 3 - 現在のディレクトリ: + 現在のディレクトリ: %1$s 親ディレクトリ - ファイルサイズ: + ファイルサイズ: %1$s クリア @@ -26,7 +26,7 @@ について - クリックされたファイル: + クリックされたファイル: %1$s ステートセーブ diff --git a/Source/Android/res/values/strings.xml b/Source/Android/res/values/strings.xml index 720ce8ef4e..c3f7322c95 100644 --- a/Source/Android/res/values/strings.xml +++ b/Source/Android/res/values/strings.xml @@ -13,9 +13,9 @@ Supports OpenGL ES 3 - Current Dir: + Current Dir: %1$s Parent Directory - File Size: + File Size: %1$s Clear game list @@ -26,7 +26,7 @@ About - File clicked: + File clicked: %1$s Save State diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java index e8a3fd9c94..fe7fd2641c 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java @@ -46,7 +46,7 @@ public final class FolderBrowser extends ListFragment // Populates the FolderView with the given currDir's contents. private void Fill(File currDir) { - m_activity.setTitle(getString(R.string.current_dir) + currDir.getName()); + m_activity.setTitle(String.format(getString(R.string.current_dir), currDir.getName())); File[] dirs = currDir.listFiles(); List dir = new ArrayList(); List fls = new ArrayList(); @@ -76,7 +76,7 @@ public final class FolderBrowser extends ListFragment { if (validExts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.')))) { - fls.add(new FolderBrowserItem(entryName, getString(R.string.file_size)+entry.length(), entry.getAbsolutePath())); + fls.add(new FolderBrowserItem(entryName, String.format(getString(R.string.file_size), entry.length()), entry.getAbsolutePath())); } } } diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java index bd168ec94a..e499ef593e 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java @@ -86,7 +86,7 @@ public final class GameListFragment extends Fragment if (!entry.isHidden() && !entry.isDirectory()) { if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.')))) - fls.add(new GameListItem(mMe, entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath())); + fls.add(new GameListItem(mMe, entryName, String.format(getString(R.string.file_size), entry.length()), entry.getAbsolutePath())); } } } @@ -128,7 +128,7 @@ public final class GameListFragment extends Fragment private void onFileClick(String o) { - Toast.makeText(mMe, getString(R.string.file_clicked) + o, Toast.LENGTH_SHORT).show(); + Toast.makeText(mMe, String.format(getString(R.string.file_clicked), o), Toast.LENGTH_SHORT).show(); Intent intent = new Intent(mMe, EmulationActivity.class); intent.putExtra("SelectedGame", o);