diff options
-rw-r--r-- | res/values/cm_strings.xml | 15 | ||||
-rw-r--r-- | src/com/android/contacts/common/MoreContactUtils.java | 19 | ||||
-rw-r--r-- | src/com/android/contacts/common/interactions/ImportExportDialogFragment.java | 6 |
3 files changed, 20 insertions, 20 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index b3f164cf..5dbcf778 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -51,7 +51,10 @@ <string name="tag_too_long">The contact name is too long</string> - <string name="export_cancelled">The export was canceled, <xliff:g id="insertCount">%s</xliff:g>items were exported</string> + <plurals name="export_cancelled"> + <item quantity="one">Export was canceled, %d item was exported</item> + <item quantity="other">Export was canceled, %d items were exported</item> + </plurals> <string name="export_no_phone_or_email"><xliff:g id="name">%s</xliff:g> does not have a phone number or email address</string> @@ -69,17 +72,13 @@ <string name="deleteConfirmation">This contact will be deleted.</string> <!-- Warning dialog contents after users selects to delete a contact. --> - <string name="readOnlyContactDeleteConfirmation">This contact contains information from multiple - accounts. Information from read-only accounts will be hidden in your contacts lists, - not deleted.</string> + <string name="readOnlyContactDeleteConfirmation">This contact contains information from multiple accounts. Information from read-only accounts will be hidden in your contacts lists, not deleted.</string> <!-- Warning dialog contents after users selects to delete a ReadOnly contact--> - <string name="readOnlyContactWarning">You can\'t delete contacts from read-only accounts, - but you can hide them in your contacts lists.</string> + <string name="readOnlyContactWarning">You can\'t delete contacts from read-only accounts, but you can hide them in your contacts lists.</string> <!-- Warning dialog contents after users selects to delete a contact with multiple Writable sources. --> - <string name="multipleContactDeleteConfirmation">Deleting this contact will delete information - from multiple accounts.</string> + <string name="multipleContactDeleteConfirmation">Deleting this contact will delete information from multiple accounts.</string> <string name="copy_done">The contact was copied successfully</string> <string name="copy_failure">Copying the contact failed</string> diff --git a/src/com/android/contacts/common/MoreContactUtils.java b/src/com/android/contacts/common/MoreContactUtils.java index b31eb9aa..f37c5dbc 100644 --- a/src/com/android/contacts/common/MoreContactUtils.java +++ b/src/com/android/contacts/common/MoreContactUtils.java @@ -281,7 +281,7 @@ public class MoreContactUtils { } public static void insertToPhone(String[] values, final ContentResolver resolver,int sub) { - Account account = getAcount(sub); + Account account = getAccount(sub); final String name = values[NAME_POS]; final String phoneNumber = values[NUMBER_POS]; final String emailAddresses = values[EMAIL_POS]; @@ -415,7 +415,7 @@ public class MoreContactUtils { return result; } - public static Account getAcount(int sub) { + private static Account getAccount(int sub) { Account account = null; if (MSimTelephonyManager.getDefault().isMultiSimEnabled()) { if (sub == SimContactsConstants.SUB_1) { @@ -439,7 +439,7 @@ public class MoreContactUtils { } public static int getSimFreeCount(Context context, int sub) { - String accountName = getAcount(sub).name; + String accountName = getAccount(sub).name; int count = 0; if (context == null) { @@ -878,15 +878,16 @@ public class MoreContactUtils { if (context == null || subscription < 0) { return null; } - String name = ""; MSimTelephonyManager stm = getMSimTelephonyManager(); if (stm.isMultiSimEnabled()) { - name = Settings.System.getString(context.getContentResolver(), + String name = Settings.System.getString(context.getContentResolver(), MULTI_SIM_NAME[subscription]); + if (!TextUtils.isEmpty(name)) { + return name; + } + return context.getString(R.string.account_sim) + " " + (subscription + 1); } - if (TextUtils.isEmpty(name)) { - name = getSimAccountName(subscription); - } - return name; + + return context.getString(R.string.account_sim); } } diff --git a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java index cbc89421..30cb7734 100644 --- a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java +++ b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java @@ -885,9 +885,9 @@ public class ImportExportDialogFragment extends DialogFragment // add toast handler when export is canceled case TOAST_EXPORT_CANCELED: - int exportCount = msg.arg1; - Toast.makeText(mPeople,mPeople.getString(R.string.export_cancelled, - String.valueOf(exportCount)), Toast.LENGTH_SHORT).show(); + String text = mPeople.getResources().getQuantityString( + R.plurals.export_cancelled, msg.arg1, msg.arg1); + Toast.makeText(mPeople, text, Toast.LENGTH_SHORT).show(); break; // add toast handler when no phone or email |