From: David A. Velasco Date: Tue, 23 Jun 2015 12:39:29 +0000 (+0200) Subject: Fixed wrong format of files & folder count X-Git-Tag: oc-android-1.7.2~1^2~7 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/8107d9dc4f51cfa633f44f87415c5f41edabbf97 Fixed wrong format of files & folder count --- diff --git a/res/values/strings.xml b/res/values/strings.xml index a93d08d5..716d3b2a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -354,6 +354,6 @@ 1 file, %1$d folders %1$d files %1$d files, 1 folder - %1$d files, %1$d folders + %1$d files, %2$d folders diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index a8f7ff07..06213234 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -447,9 +447,7 @@ public class OCFileListFragment extends ExtendedListFragment { output = getResources().getString(R.string.file_list__footer__folder); } else { // foldersCount > 1 - output = getResources().getString(R.string.file_list__footer__folders); - String.format(output, foldersCount); - + output = getResources().getString(R.string.file_list__footer__folders, foldersCount); } } else if (filesCount == 1) { @@ -460,22 +458,19 @@ public class OCFileListFragment extends ExtendedListFragment { output = getResources().getString(R.string.file_list__footer__file_and_folder); } else { // foldersCount > 1 - output = getResources().getString(R.string.file_list__footer__file_and_folders); - String.format(output, foldersCount); - + output = getResources().getString(R.string.file_list__footer__file_and_folders, foldersCount); } } else { // filesCount > 1 if (foldersCount <= 0) { - output = getResources().getString(R.string.file_list__footer__files); - String.format(output, filesCount); + output = getResources().getString(R.string.file_list__footer__files, filesCount); } else if (foldersCount == 1) { - output = getResources().getString(R.string.file_list__footer__files_and_folder); - String.format(output, filesCount); + output = getResources().getString(R.string.file_list__footer__files_and_folder, filesCount); } else { // foldersCount > 1 - output = getResources().getString(R.string.file_list__footer__files_and_folders); - String.format(output, filesCount, foldersCount); + output = getResources().getString( + R.string.file_list__footer__files_and_folders, filesCount, foldersCount + ); } }