Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug 796163 - [Contacts] Import contacts from SIM - No contacts detected #6822

Merged
merged 1 commit into from

4 participants

Francisco Jordano albertopq Axel Hecht Staś Małolepszy
Francisco Jordano
Collaborator

When no contacts detected (not the same than an error reading the SIM), we should show the proper message (and not reload the contacts list).

Also took the privilege to modify the FTU SIM import section to make both messages being in sync.

@albertopq @stas can you r?

Thanks.

...unications/contacts/locales/contacts.en-US.properties
@@ -91,7 +91,7 @@ simContacts-reading = Reading from SIM card…
simContacts-storing = Storing SIM contacts…
simContacts-error = Could not import contacts from SIM
simContacts-imported2 = {[ plural(n) ]}
-simContacts-imported2[zero] = No contacts imported
+simContacts-imported2[zero] = No contacts detected in SIM to import
Staś Małolepszy Collaborator
stasm added a note

I think we'll need to bump the revision here, to simContacts-imported3 (all seven strings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
apps/communications/ftu/locales/ftu.en-US.properties
@@ -78,7 +78,7 @@ simContacts-reading = Reading from SIM card…
simContacts-storing = Storing SIM contacts…
simContacts-error = Could not import contacts from SIM
simContacts-imported2 = {[ plural(n) ]}
-simContacts-imported2[zero] = No contacts imported
+simContacts-imported2[zero] = No contacts detected in SIM to import
Staś Małolepszy Collaborator
stasm added a note

I think we'll need to bump the revision here, to simContacts-imported3 (all seven strings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
albertopq
Collaborator

JS looking good from my side. r+
Mergeable as soon as @stasm comments are fixed

Axel Hecht

Stas asked for all 7 to be replaced, and not just one?

Also, I just checked with Matej, we should rather say "on SIM" than "in SIM"

Axel Hecht

Yep, like this. Thanks.

Francisco Jordano arcturus merged commit fd22b48 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
6 apps/communications/contacts/js/contacts_settings.js
View
@@ -328,8 +328,10 @@ contacts.Settings = (function() {
},
function onimport(num) {
- addMessage(_('simContacts-imported2', {n: num}), after);
- contacts.List.load();
+ if (num > 0) {
+ contacts.List.load();
+ }
+ addMessage(_('simContacts-imported3', {n: num}), after);
Contacts.hideOverlay();
},
function onerror() {
4 apps/communications/contacts/js/utilities/import_sim_contacts.js
View
@@ -26,8 +26,8 @@ function importSIMContacts(onread, onimport, onerror) {
// early way out if no contacts have been found
if (nContacts === 0) {
- if (onerror) {
- onerror();
+ if (onimport) {
+ onimport(0);
}
return;
}
14 apps/communications/contacts/locales/contacts.en-US.properties
View
@@ -90,13 +90,13 @@ simContacts-importing = Importing SIM contacts…
simContacts-reading = Reading from SIM card…
simContacts-storing = Storing SIM contacts…
simContacts-error = Could not import contacts from SIM
-simContacts-imported2 = {[ plural(n) ]}
-simContacts-imported2[zero] = No contacts imported
-simContacts-imported2[one] = Imported one contact
-simContacts-imported2[two] = Imported {{n}} contacts
-simContacts-imported2[few] = Imported {{n}} contacts
-simContacts-imported2[many] = Imported {{n}} contacts
-simContacts-imported2[other] = Imported {{n}} contacts
+simContacts-imported3 = {[ plural(n) ]}
+simContacts-imported3[zero] = No contacts detected on SIM to import
+simContacts-imported3[one] = Imported one contact
+simContacts-imported3[two] = Imported {{n}} contacts
+simContacts-imported3[few] = Imported {{n}} contacts
+simContacts-imported3[many] = Imported {{n}} contacts
+simContacts-imported3[other] = Imported {{n}} contacts
# Social networks
social-network = Social networks
2  apps/communications/ftu/js/ui.js
View
@@ -178,7 +178,7 @@ var UIManager = {
function() {
feedbackMessage.innerHTML = _('simContacts-reading');
}, function(n) {
- feedbackMessage.innerHTML = _('simContacts-imported2', {n: n});
+ feedbackMessage.innerHTML = _('simContacts-imported3', {n: n});
}, function() {
feedbackMessage.innerHTML = _('simContacts-error');
});
14 apps/communications/ftu/locales/ftu.en-US.properties
View
@@ -77,13 +77,13 @@ simContacts-importing = Importing SIM contacts…
simContacts-reading = Reading from SIM card…
simContacts-storing = Storing SIM contacts…
simContacts-error = Could not import contacts from SIM
-simContacts-imported2 = {[ plural(n) ]}
-simContacts-imported2[zero] = No contacts imported
-simContacts-imported2[one] = Imported one contact
-simContacts-imported2[two] = Imported {{n}} contacts
-simContacts-imported2[few] = Imported {{n}} contacts
-simContacts-imported2[many] = Imported {{n}} contacts
-simContacts-imported2[other] = Imported {{n}} contacts
+simContacts-imported3 = {[ plural(n) ]}
+simContacts-imported3[zero] = No contacts detected on SIM to import
+simContacts-imported3[one] = Imported one contact
+simContacts-imported3[two] = Imported {{n}} contacts
+simContacts-imported3[few] = Imported {{n}} contacts
+simContacts-imported3[many] = Imported {{n}} contacts
+simContacts-imported3[other] = Imported {{n}} contacts
importContacts = Import contacts
importSim = Import from SIM
importFb = Import from Facebook
Something went wrong with that request. Please try again.