mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Handle pluralization of import toasts.
This commit is contained in:
parent
932d178679
commit
a7e134164f
@ -1036,7 +1036,8 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
||||
<string name="settings_exporting">Exporting settings...</string>
|
||||
<string name="settings_importing">Importing settings...</string>
|
||||
<string name="settings_export_success">Exported settings to <xliff:g id="filename">%s</xliff:g></string>
|
||||
<string name="settings_import_success">Imported <xliff:g id="numAccounts">%s</xliff:g> accounts from <xliff:g id="filename">%s</xliff:g></string>
|
||||
<string name="settings_import_success_multiple">Imported <xliff:g id="numAccounts">%s</xliff:g> accounts from <xliff:g id="filename">%s</xliff:g></string>
|
||||
<string name="settings_import_success_single">Imported 1 account from <xliff:g id="filename">%s</xliff:g></string>
|
||||
<string name="settings_export_failure">Failed to export settings: <xliff:g id="reason">%s</xliff:g></string>
|
||||
<string name="settings_import_failure">Failed from import settings from <xliff:g id="filename">%s</xliff:g>:<xliff:g id="reason">%s</xliff:g></string>
|
||||
|
||||
|
@ -829,7 +829,10 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
public void run()
|
||||
{
|
||||
mHandler.progress(false);
|
||||
String toastText = Accounts.this.getString(R.string.settings_import_success, numAccounts, fileName );
|
||||
String toastText =
|
||||
numAccounts != 1
|
||||
? Accounts.this.getString(R.string.settings_import_success_multiple, numAccounts, fileName )
|
||||
: Accounts.this.getString(R.string.settings_import_success_single, fileName );
|
||||
Toast toast = Toast.makeText(Accounts.this.getApplication(), toastText, 1);
|
||||
toast.show();
|
||||
refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user