[l12y][Settings]The "AM" and "PM" cannot be translated on the value selector button in "Date&Time" view.

VERIFIED FIXED in 2.2 S11 (1may)

Status

defect
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: yulan.zhu, Assigned: flod)

Tracking

({l12y})

unspecified
2.2 S11 (1may)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:2.2+, b2g-v2.1 affected, b2g-v2.2 verified, b2g-master verified)

Details

(Whiteboard: LocRun2.2, )

Attachments

(3 attachments, 1 obsolete attachment)

Reporter

Description

4 years ago
Posted image Screenshot_Time.png
[1.Description]:
[l12y][v2.1&v2.2][Settings]Arabic:Set the time in "Date&Time" view, the "AM" and "PM" cannot be translated to Arabic on the value selector button.
See attachment:Screenshot_Time.png

[2.Testing Steps]: 
1.Set your phone language to Arabic.
2.Launch Settings and select "Date&Time".
3.Disable "Set Automatically" and tap the value selector button of Time.
4.Select AM/PM and go back to "Date&Time" view.

[3.Expected Result]: 
4.The "AM" and "PM" should be translated to Arabic on the value selector button.

[4.Actual Result]: 
4.The "AM" and "PM" cannot be translated to Arabic on the value selector button.

[5.Reproduction build]: 
Device: Flame 2.2 (affected)
Build ID               20150415162504
Gaia Revision          89a94a8b9c9087da916751697a61ba15bc0688c3
Gaia Date              2015-04-15 20:05:38
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/20e92b626530
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150415.195419
Firmware Date          Wed Apr 15 19:54:30 EDT 2015
Bootloader             L1TC000118D0

Device:Flame 2.1 (Affected)
Build ID               20150415161202
Gaia Revision          bbe983b4e8bebfec26b3726b79568a22d667223c
Gaia Date              2015-04-09 13:52:48
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/c54aa1be51d6
Gecko Version          34.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150415.193716
Firmware Date          Wed Apr 15 19:37:27 EDT 2015
Bootloader             L1TC000118D0

[6.Reproduction Frequency]: 
Always Recurrence,10/10

[7.TCID]: 
12531

[8.Note]:
The "AM" and "PM" still cannot be translated in Accented English or Mirrored English.
Reporter

Updated

4 years ago
Just to clarify, this bug affects all locales.

We already have strings for AM/PM, Gaia just needs to pick them from dates.properties.

You can find them all here:

AM http://transvision.mozfr.org/string/?entity=shared/date/date.properties:time_am&repo=gaia#ar
PM http://transvision.mozfr.org/string/?entity=shared/date/date.properties:time_pm&repo=gaia#ar

AM/PM seems localized in other parts of the OS (Calendar for example), so I guess we just need Settings to pick the right translations in the Date & Time panel.
Summary: [l12y][Settings]Arabic:The "AM" and "PM" cannot be translated to Arabic on the value selector button in "Date&Time" view. → [l12y][Settings]The "AM" and "PM" cannot be translated on the value selector button in "Date&Time" view.
Assignee

Comment 3

4 years ago
Issue is visible also by using a pseudolocale and switching to 12 hours format.

The code for _formatTime, unlike _formatDate, doesn't currently use l10n.js to format the date, relying on Date.prototype.toLocaleFormat instead
Assignee: nobody → francesco.lodolo
Attachment #8595899 - Flags: review?(ehung)

Comment 4

4 years ago
Comment on attachment 8595899 [details] [review]
Pull request on Github

Sorry I'm inactive in Settings app, redirect to Arthur.
Attachment #8595899 - Flags: review?(ehung) → review?(arthur.chen)
Comment on attachment 8595899 [details] [review]
Pull request on Github

Thank you for catching this, Flod! r=me.
Attachment #8595899 - Flags: review?(arthur.chen) → review+
Assignee

Updated

4 years ago
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Assignee

Updated

4 years ago
Attachment #8595896 - Attachment is obsolete: true
Assignee

Comment 8

4 years ago
Comment on attachment 8595899 [details] [review]
Pull request on Github

Not sure if I also need the blocking-gaia flag on the bug.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): time format is not localized using the internal l10n.js library
[User impact] if declined: time format displayed in Date & Time panel will be inconsistent with the rest of Gaia for locales translating AM/PM (Arabic, Chinese)
[Testing completed]: master
[Risk to taking this patch] (and alternatives if risky): low
[String changes made]: none
Attachment #8595899 - Flags: approval-gaia-v2.2?
blocking-b2g: --- → 2.2+
Attachment #8595899 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
This issue is verified fixed on Flame Master and 2.2.

Result: "AM" and "PM" are localized in Date & Time settings page. I checked with Arabic, Japanese, Korean, and Traditional Chinese.

Environmental Variables:
Device: Flame 3.0 (KK, 319mb, full flash)
Build ID: 20150430010201
Gaia: db8ea705c0fd1b1684807f5a8e837bb9a36a6f96
Gecko: 4b9b12c248dc
Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b
Version: 40.0a1 (Master)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0


Environmental Variables:
Device: Flame 2.2 (KK, 319mb, full flash)
Build ID: 20150430002504
Gaia: aa1da5036f9425c25d515d14243d3473bfefb4fd
Gecko: 38b2838d43e1
Gonk: ebad7da532429a6f5efadc00bf6ad8a41288a429
Version: 37.0 (2.2)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][MGSEI-l10n-1F]
Whiteboard: LocRun2.2, MGSEI-l10n-1F-Arabic → LocRun2.2,
You need to log in before you can comment on or make changes to this bug.