Closed
Bug 976663
Opened 11 years ago
Closed 11 years ago
[B2G][l10n][Contacts][All languages] Number Label name of Suggested Contacts to merge is not translated
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(blocking-b2g:1.4+, b2g-v1.4 fixed)
Tracking | Status | |
---|---|---|
b2g-v1.4 | --- | fixed |
People
(Reporter: pbylenga, Assigned: flod)
References
Details
(Keywords: l12y, Whiteboard: locrun1.3)
Attachments
(2 files, 1 obsolete file)
Description:
The number label name (ie. Home, Work, Office, etc) of suggested contacts to merge are globally not translated. This screen is accessed by tapping to the right of one of numbers. Tapping the number itself will toggle it's selection.
Prerequisites:
Have a Contact setup with a phone number of 1234567890
Change device language to a non-English supported language
Repro Steps:
1) Update a Buri to BuildID: 20140225004004
2) Launch Contacts app
3) Create a new contact with identical information to the one previously setup
4) Tap done and on the Merge Contacts screen tap to the right of the suggested contact
Actual:
The number label name of the suggested duplicate remains in English
Expected:
The number label name of the suggested duplicate is localized to device language
v1.3 Environmental Variables:
Device: Buri v1.3 MOZ
BuildID: 20140225004004
Gaia: 6e883bde818d4d53aef7b5b075b4b34267918360
Gecko: e597280f9300
Version: 28.0
Firmware Version: v1.2-device.cfg
Notes:
Repro frequency: 5/5, 100%
See attached: screenshot
Updated•11 years ago
|
QA Contact: ktucker
Comment 2•11 years ago
|
||
This issue occurs on the latest Buri v 1.2.0 Mozilla RIL
Environmental Variables
Device: Buri v 1.2.0 Mozilla RIL
Build ID: 20140220004002
Gecko: https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/2ea6a65eea23
Gaia: 539a25e1887b902b8b25038c547048e691bd97f6
Platform Version: 26.0
Firmware Version: v1.2-device.cfg
The user can see the "Mobile" label in English.
Keywords: qawanted
Comment 3•11 years ago
|
||
Ok so this is too late to make it into 1.3
Does this happen only when you save a contact in English and then switch to another locale?
Or does it also appear untranslated when you've added a contact in another locale than English?
Updated•11 years ago
|
Flags: needinfo?(pbylenga)
Reporter | ||
Comment 4•11 years ago
|
||
I was adding the contacts while in Polish during my initial testing and the number type was showing up in English on that specific screen.
Flags: needinfo?(pbylenga)
Comment 5•11 years ago
|
||
ok thanks Peter
I think the string is in apps/communications/contacts/contacts.properties
I do see it localized for many locales in 1.3 though, so I don't know why it's not appearing as so on the phone
Flod, can you help out with this please?
Flags: needinfo?(francesco.lodolo)
Reporter | ||
Comment 6•11 years ago
|
||
Just to be clear, it is localized in multiple sections throughout the phone, so far it's just this screen that I found that it isn't localized on. For example, the proper localized string is shown when creating/editing a contact.
Assignee | ||
Comment 7•11 years ago
|
||
No l10n support in that function, just concatenates type + ',' + value
https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contacts/js/contacts_matching_ui.js#L358
Flags: needinfo?(francesco.lodolo)
Assignee | ||
Comment 8•11 years ago
|
||
Tested on my Keon and it definitely works (also passes unit tests locally), not sure if I'm overlooking anything.
Attachment #8382771 -
Flags: review?(etienne)
Comment 9•11 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #7)
> just concatenates type + ',' + value
This makes me nervous. ;-) (keeping bug 968853 on my radar…)
I agree this is a very simple case, but are we 100% sure this will work for all locales? I thought that the comma itself (,) was different in some locales like Arabic, Chinese, Japanese…
I’ll trust your opinion on that. I just wanted to say that since this is not a 1.3+ blocker (not even a blocker at all), we can take the time to fix this properly and add a few l10n strings like:
number-personal = personal, {{ number }}
number-work = work, {{ number }}
</my2¢>
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Fabien Cazenave [:kaze] from comment #9)
> (In reply to Francesco Lodolo [:flod] from comment #7)
> > just concatenates type + ',' + value
>
> This makes me nervous. ;-) (keeping bug 968853 on my radar…)
You beat me by minutes ;-)
After bug 975637 I realized I need to fix this too. Clearing review and doing a proper fix.
P.S. it doesn't work well with Italian either: I would definitely use ":", not ",", given a choice.
Assignee | ||
Comment 11•11 years ago
|
||
Comment on attachment 8382771 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16686/files
Need a proper fix, clearing review for now.
Attachment #8382771 -
Flags: review?(etienne)
Comment 12•11 years ago
|
||
Haha, thanks for CC’ing me in the first place. :-)
Another $.02 — if it’s just a matter of not adding new l10n strings, we could even use this trick:
number-personal = {{ personal }}, {{ number }}
number-work = {{ work}}, {{ number }}
In both case, instead of:
item.textContent = _(fieldValue.type) + ', ' + fieldValue.value;
we would use:
navigator.mozL10n.localize(item, 'number-' + fieldValue.type, { number: fieldValue.value });
Assignee | ||
Comment 13•11 years ago
|
||
Kaze, what about this approach? Only one new string and no concatenation.
Assignee: nobody → francesco.lodolo
Attachment #8382771 -
Attachment is obsolete: true
Attachment #8382819 -
Flags: review?(etienne)
Attachment #8382819 -
Flags: feedback?(kaze)
Comment 14•11 years ago
|
||
Comment on attachment 8382819 [details] [review]
Updated PR
Redirecting to a contact peer, but looking good :)
Attachment #8382819 -
Flags: review?(francisco.jordano)
Attachment #8382819 -
Flags: review?(etienne)
Attachment #8382819 -
Flags: feedback+
Assignee | ||
Comment 15•11 years ago
|
||
Requesting 1.4?: no new strings added, improve localizability even if it's a pretty hidden UI (but QA managed to find it already).
blocking-b2g: --- → 1.4?
Comment 16•11 years ago
|
||
Comment on attachment 8382819 [details] [review]
Updated PR
Tried on the phone and looking perfect.
Could you add a unit test before we land it?
Attachment #8382819 -
Flags: review?(francisco.jordano)
Attachment #8382819 -
Flags: review+
Attachment #8382819 -
Flags: feedback?(francisco.jordano)
Attachment #8382819 -
Flags: feedback+
Updated•11 years ago
|
Attachment #8382819 -
Flags: review?(francisco.jordano)
Attachment #8382819 -
Flags: review+
Attachment #8382819 -
Flags: feedback?(francisco.jordano)
Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Francisco Jordano [:arcturus] from comment #16)
> Could you add a unit test before we land it?
To be honest I wouldn't know where to start. So far I only managed to fix existing tests, and I don't see any for this part of the UI.
Assignee | ||
Comment 18•11 years ago
|
||
Didn't noticed the failing tests, trying to look into them now.
Assignee | ||
Comment 19•11 years ago
|
||
I fixed the existing tests and we should have some coverage now (hope that's enough)
https://travis-ci.org/mozilla-b2g/gaia/builds/19743458
Comment 20•11 years ago
|
||
Comment on attachment 8382819 [details] [review]
Updated PR
One string to fix them all. Nice! :-)
Nitpick: I’d prefer to use mozL10n.localize() rather than mozL10n.get on HTML elements — see my detailed comment on your PR.
Attachment #8382819 -
Flags: feedback?(kaze) → feedback+
Comment 21•11 years ago
|
||
Triage: localization issue so it should be fixed.
blocking-b2g: 1.4? → 1.4+
Comment 22•11 years ago
|
||
Comment on attachment 8382819 [details] [review]
Updated PR
Working like charm now :)
Thanks!
Attachment #8382819 -
Flags: review?(francisco.jordano) → review+
Updated•11 years ago
|
Flags: in-testsuite+
Comment 23•11 years ago
|
||
@Francesco, could you rebase the patch?
I tried it on the phone, but now I'm not able to merge cause there are conflicts.
Merge once the conflicts are resolved unless the changes are huge.
Cheers!
Assignee | ||
Comment 24•11 years ago
|
||
Rebased, there was a conflict in the .properties file (new label added right in the same place of this one).
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 25•11 years ago
|
||
Master: 8f37a3795a07cfd5399c24d40a30ab92763cde0f
Status: NEW → RESOLVED
Closed: 11 years ago
status-b2g-v1.4:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S2 (28feb)
Assignee | ||
Comment 26•11 years ago
|
||
Verified on Keon with build 20140307, setting phone to it.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•