Closed Bug 859879 Opened 12 years ago Closed 12 years ago

Add New Number screen not translated with GAIA_DEFAULT_LOCALE

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 fixed, b2g18-v1.0.1 fixed)

RESOLVED FIXED
blocking-b2g tef+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: piecu, Assigned: gtorodelvalle)

Details

(Keywords: l12y, Whiteboard: QARegressExclude)

Attachments

(1 file)

While testing Polish translation we saw that the Add New Number screen (the one that is trigged after you click an unknown number in the call list) is in English. However, the entities used there are translated. After some testing we saw that when you change the language to the other one and then switch back to Polish this screen is in Polish but only until you kill the dialer (or reboot the device). What's more interesting, this occurs only when Gaia was flashed with GAIA_DEFAULT_LOCALE=pl. When I set GAIA_DEFAULT_LOCALE=de and then set language to Polish the screen is translated (even after the reboot). Moreover, when I set GAIA_DEFAULT_LOCALE=de the same problem occurs (the interface is in German, the Add New Number screen is in English). Steps to reproduce: 1. Get the latest version of Gaia and pl locale 2. Flash Gaia to the phone with GAIA_DEFAULT_LOCALE=pl flag (I'm using this: make clean && make production MAKECMDGOALS=production MOZILLA_OFFICIAL=1 GAIA_DEFAULT_LOCALE=pl LOCALES_FILE=locales/languages_all.json LOCALE_BASEDIR=locales/ REMOTE_DEBUGGER=1) 3. Go through the FTU (set Polish), call some unknown number and disconnect 4. Click on this number on the call screen ‒ you get English dialog [1] 5. Change the language in Settings to some other 6. Go to the call screen and click the unknown number ‒ you get the dialog in the language of your choice 7. Change the language in Settings to Polish 8. Go to the call screen and click the unknown number ‒ you get Polish dialog [2] 9. Reboot the device 10. Go to the call screen and click the unknown number ‒ you get English dialog [3] Expected results: The language of the Add New Number dialog should be Polish in [1] and [3], the same as now is in [2]
Whiteboard: [lang-switching]
This is working for me with 1.0.1 and Spanish, Portuguese, English... Unfortunately I do not have Polish in my build Stas, Can you test if this can be reproduced with 1.0.1?
Flags: needinfo?(stas)
(In reply to Daniel Coloma:dcoloma from comment #1) > Stas, Can you test if this can be reproduced with 1.0.1? Yes, just tested and I can reproduce on v1.0.1. In fact, this doesn't work with GAIA_DEFAULT_LOCALE=en-US either: the English "translation" (i.e., the value of the string in dialer.en-US.properties) is "Add new number", while the text displayed is "Add New Number," capitalized, and is taken directly from the HTML. This particular piece of UI is commented out in the HTML initially, and then the DOM is changed when needed: https://github.com/mozilla-b2g/gaia/blob/v1.0.1/apps/communications/dialer/js/dialer.js#L454 We need to localize the DOM nodes that are being inserted.
Flags: needinfo?(stas)
Whiteboard: [lang-switching]
Assignee: nobody → gtorodelvalle
blocking-b2g: tef? → tef+
Attached file Associated PR.
Hi guys! Great catch ;-) We were not translating the lazy loaded HTML code. Thanks!
Attachment #736755 - Flags: review?(etienne)
Comment on attachment 736755 [details] Associated PR. r=me with the proper indentation :)
Attachment #736755 - Flags: review?(etienne) → review+
Merged in master after solving the indentation issues ;-) Thanks! https://github.com/mozilla-b2g/gaia/commit/8ea1e63c1d5a18342fa1195bfa5cb173dd922fad
Should this bug be close as resolved fixed?
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Ups, sorry! Thanks Dani! ;-)
Uplifted commit 8ea1e63c1d5a18342fa1195bfa5cb173dd922fad as: v1-train: ce63614fb3271561c09c15f5ee203622baa0ea2e v1.0.1: 357aebf2b21841166f8f905aa9a88065c1e41820
Unable to test here. Marking as QARegressExclude.
Whiteboard: QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: