diff --git a/res/values/strings.xml b/res/values/strings.xml index 897e9775f..12242def5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,7 +1,7 @@ - - Seafile - http://seafile.com + + Seafile + http://seafile.com Welcome to Seafile Choose an account to start Edit @@ -20,7 +20,7 @@ Download again Cancel Unknown file type - Can not find App to open this file + Can\`t find App to open this file Refresh Add Account Personal @@ -28,7 +28,7 @@ Cached Activities Upload - https + https Transfer List Accounts Settings @@ -48,9 +48,9 @@ No network connection Unknown error Invalid server address - Server address can not be empty - Email can not be empty - Password can not be empty + Server address can\`t be empty + Email can\`t be empty + Password can\`t be empty Login failed Email or password error Upload @@ -83,10 +83,14 @@ Other Wait - No image Found + No image found Choose photos/videos to upload - select items to upload - %d items selected + Select items to upload + + %1$d item selected + %1$d items selected + + Please enter the name of the folder Please enter the name of the file Please enter the password @@ -99,12 +103,12 @@ No app can be found Add to Seafile OK - Please setup an account in Seafile first + Please set up an account in Seafile first You have no library yet Choose an account Choose a library Choose a folder - Failed to load seafile accounts + Failed to load Seafile accounts Failed to load libraries Failed to load contents of this folder This type of share is not supported @@ -117,7 +121,7 @@ last modified modified file size - The library have been deleted. + The library has been deleted. Export this file No upload tasks yet No download tasks yet @@ -139,7 +143,7 @@ Open navigation drawer Close navigation drawer No starred file yet - The selected file(s) is added to the upload tasks list. + The selected file(s) have been added to the upload tasks list. The photo is being uploaded Take Photo successfully Libraries @@ -150,25 +154,28 @@ Finished Cancelled Failed - days ago - hours ago - minutes ago - seconds ago + %d days ago + %d hours ago + %d minutes ago + %d seconds ago Just now Error when loading starred files Open as - select files to upload + Select files to upload Storage was removed Error when selecting file - %d file(s) selected + + %1$d file selected + %1$d files selected + Empty folder Choose a file - security check failed + Security check failed The security certificate of %s is not trusted. Do you want to continue? %s uses an invalid security certificate. The connection is not secure. Do you want to continue? Untrusted Connection Issued To - Finger Prints + Fingerprints Period of Validity SHA-1 %s MD5 %s @@ -179,14 +186,14 @@ Yes No Remember my choice - Copied Successfully - Moved Successfully + Copied successfully + Moved successfully Internal Server Error Copying file Moving file Copying folder Moving folder - upload is started + Upload is started You can\'t copy a folder to its subfolder You can\'t move a folder to its subfolder Cancel @@ -194,7 +201,7 @@ Account User info - loading... + loading… Space used Sign out Click to sign out @@ -210,22 +217,28 @@ Pattern cell added Pattern detected Forgot password - Failed 5 times, please wait for 30 seconds before trying - You can retry %d seconds later - Incorrect pattern, you can try another %d times + Failed 5 times, please wait 30 seconds before trying + + You can retry %1$d second later + You can retry %1$d seconds later + + + Incorrect pattern, you can try another %1$d time + Incorrect pattern, you can try another %1$d times + Linking points not long enough, pelase try again Retry Next OK Please draw Gesture Lock Pattern Learn how to draw Gesture Lock Pattern - Link at least 4 points, try again! + Swipe across at least 4 points, try again! Pattern saved Please draw Gesture Lock pattern Please confirm your pattern - Pattern not match, try again! - Confirm to save your pattern - Move away your firgure after drawing" + Pattern didn\'t match. Try again. + Tap OK to save your pattern + Release finger when finished drawing Gesture Lock Pattern successfully saved @@ -253,7 +266,7 @@ About Author Seafile Andoird Client +
Seafile Android Client

%s

Contact Us

@@ -266,40 +279,40 @@ ]]> - ADVANCE FEATURE + ADVANCED FEATURE Cache size Clear cache Do you want to clear cache? - Clear cache successfully - Clear cache failed + Cache cleared successfully + Cache cleared failed 0 KB - Pull to refresh… - Release to refresh… - Loading… - Last update :  -  seconds ago -  minutes ago -  hours ago + Pull to refresh… + Release to refresh… + Loading… + Last update:  + %d seconds ago + %d minutes ago + %d hours ago - Could not open file %s. - Can not open directory. + Couldn\'t open file %s. + Can\`t open directory. File %s not cached. - Could not find/open thumbnail %s. - Could not download file %s from server. - Can not open directory for reading/writing. - Could not find Seafile account. + Couldn\'t find/open thumbnail %s. + Couldn\'t download file %s from server. + Can\`t open directory for reading/writing. + Couldn\'t find Seafile account. Server is empty! Server should starts with either http:// or https:// - Error: + Error:  Shibboleth Login - Input server... + Input server… Login with Shibboleth - loading... + loading… Network connection error, please try again later! @@ -314,7 +327,7 @@ Searching… Please input keywords Nothing was found - Oops, Search was not supported on this server! + Oops, search was not supported on this server! Couldn\'t find this library. It may be deleted diff --git a/src/com/seafile/seadroid2/data/DataManager.java b/src/com/seafile/seadroid2/data/DataManager.java index 39ac2de4c..45d62c6cd 100644 --- a/src/com/seafile/seadroid2/data/DataManager.java +++ b/src/com/seafile/seadroid2/data/DataManager.java @@ -787,7 +787,7 @@ public String getLastPullToRefreshTime(String whichFragment) { sb.append(SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update)); if (seconds < 60) { - sb.append(seconds + SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update_seconds_ago)); + sb.append(SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update_seconds_ago, seconds)); } else { int minutes = (seconds / 60); if (minutes > 60) { @@ -796,11 +796,11 @@ public String getLastPullToRefreshTime(String whichFragment) { Date date = new Date(lastUpdate); sb.append(ptrDataFormat.format(date)); } else { - sb.append(hours + SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update_hours_ago)); + sb.append(SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update_hours_ago, hours)); } } else { - sb.append(minutes + SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update_minutes_ago)); + sb.append(SeadroidApplication.getAppContext().getString(R.string.pull_to_refresh_last_update_minutes_ago, minutes)); } } return sb.toString(); diff --git a/src/com/seafile/seadroid2/fileschooser/MultiFileChooserActivity.java b/src/com/seafile/seadroid2/fileschooser/MultiFileChooserActivity.java index 44a6ba2fc..a73b19b9b 100644 --- a/src/com/seafile/seadroid2/fileschooser/MultiFileChooserActivity.java +++ b/src/com/seafile/seadroid2/fileschooser/MultiFileChooserActivity.java @@ -141,8 +141,7 @@ private void updateSelectionStatus() { if (nSelected == 0) { status = getResources().getString(R.string.select_upload_files); } else { - status = String.format(getResources().getString(R.string.n_upload_files_selected), - nSelected); + status = getResources().getQuantityString(R.plurals.n_upload_files_selected, nSelected, nSelected); } mFooterFragment.getStatusView().setText(status); } diff --git a/src/com/seafile/seadroid2/gallery/MultipleImageSelectionActivity.java b/src/com/seafile/seadroid2/gallery/MultipleImageSelectionActivity.java index 429c1684a..6aca7b33e 100644 --- a/src/com/seafile/seadroid2/gallery/MultipleImageSelectionActivity.java +++ b/src/com/seafile/seadroid2/gallery/MultipleImageSelectionActivity.java @@ -585,8 +585,7 @@ private void updateSelectionStatus() { if (nSelected == 0) { status = getResources().getString(R.string.select_upload_items); } else { - status = String.format(getResources().getString(R.string.n_upload_items_selected), - nSelected); + status = getResources().getQuantityString(R.plurals.n_upload_items_selected, nSelected, nSelected); } mSelectionStatus.setText(status); } diff --git a/src/com/seafile/seadroid2/ui/activity/UnlockGesturePasswordActivity.java b/src/com/seafile/seadroid2/ui/activity/UnlockGesturePasswordActivity.java index 8b0d88282..a554fc98a 100644 --- a/src/com/seafile/seadroid2/ui/activity/UnlockGesturePasswordActivity.java +++ b/src/com/seafile/seadroid2/ui/activity/UnlockGesturePasswordActivity.java @@ -105,8 +105,8 @@ public void onPatternDetected(List pattern) { - mFailedPatternAttemptsSinceLastTimeout; if (retry >= 0) { if (retry == 0) - ToastUtils.show(UnlockGesturePasswordActivity.this, getResources().getString(R.string.lockscreen_access_pattern_failure)); - mHeadTextView.setText(getResources().getString(R.string.lockscreen_access_pattern_failure_left_try_times, retry)); + ToastUtils.show(UnlockGesturePasswordActivity.this, getResources().getString(R.string.lockscreen_access_pattern_failure)); + mHeadTextView.setText(getResources().getQuantityString(R.plurals.lockscreen_access_pattern_failure_left_try_times, retry, retry)); mHeadTextView.setTextColor(Color.RED); mHeadTextView.startAnimation(mShakeAnim); } @@ -143,7 +143,7 @@ public void run() { public void onTick(long millisUntilFinished) { int secondsRemaining = (int) (millisUntilFinished / 1000) - 1; if (secondsRemaining > 0) { - mHeadTextView.setText(getResources().getString(R.string.lockscreen_access_pattern_failure_left_try_seconds, secondsRemaining)); + mHeadTextView.setText(getResources().getQuantityString(R.plurals.lockscreen_access_pattern_failure_left_try_seconds, secondsRemaining, secondsRemaining)); } else { mHeadTextView.setText(R.string.lockscreen_access_pattern_hint); mHeadTextView.setTextColor(Color.WHITE); diff --git a/src/com/seafile/seadroid2/util/Utils.java b/src/com/seafile/seadroid2/util/Utils.java index e045b3ef2..9bd9216d2 100644 --- a/src/com/seafile/seadroid2/util/Utils.java +++ b/src/com/seafile/seadroid2/util/Utils.java @@ -375,15 +375,15 @@ public static String translateCommitTime(long timestampInMillis) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); return fmt.format(d); } else if (days > 0) { - return days + SeadroidApplication.getAppContext().getString(R.string.days_ago); + return SeadroidApplication.getAppContext().getString(R.string.days_ago, days); } else if (seconds >= 60 * 60) { long hours = seconds / 3600; - return hours + SeadroidApplication.getAppContext().getString(R.string.hours_ago); + return SeadroidApplication.getAppContext().getString(R.string.hours_ago, hours); } else if (seconds >= 60) { long minutes = seconds / 60; - return minutes + SeadroidApplication.getAppContext().getString(R.string.minutes_ago); + return SeadroidApplication.getAppContext().getString(R.string.minutes_ago, minutes); } else if (seconds > 0) { - return seconds + SeadroidApplication.getAppContext().getString(R.string.seconds_ago); + return SeadroidApplication.getAppContext().getString(R.string.seconds_ago, seconds); } else { return SeadroidApplication.getAppContext().getString(R.string.just_now); }