[B2G][L10n][Clock] Chinese Traditional: Highlight date instead of first number displayed

VERIFIED FIXED in 1.4 S1 (14feb)

Status

Firefox OS
Gaia::Clock
--
minor
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: petercpg, Assigned: mcav)

Tracking

(Blocks: 1 bug)

unspecified
1.4 S1 (14feb)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: LocRun1.3 [p=1])

Attachments

(2 attachments, 3 obsolete attachments)

Created attachment 821708 [details]
screenshot

The date in en-US is displayed in "Thursday, October 24", while it is "10 月 24 日 星期四 in zh-TW". 
Only the date should be highlighted instead of the first number displayed.

Build: 20131023225434
Gaia: c57951d06f6c9fa5a762d151e4c75214b988679f
Platform Version: 26.0a2
Whiteboard: LocRun1.2
Still affects zh-TW locale in 1.3.


Device: Geeksphone Keon
Build: 20140205010019
Gaia: 3405205
Platform Version: 28.0
Summary: [B2G][Clock][zh-TW] Highlight date instead of first number displayed → [B2G][L10n][Clock] Chinese Traditional: Highlight date instead of first number displayed
Whiteboard: LocRun1.2 → LocRun1.3

Comment 2

4 years ago
Created attachment 8371396 [details]
Date_Screenshot.jpg

Attached screenshot. Please let me know if this what you are expecting.
Flags: needinfo?(petercpg)
(In reply to Gnaneswar from comment #2)
> Created attachment 8371396 [details]
> Date_Screenshot.jpg
> 
> Attached screenshot. Please let me know if this what you are expecting.

No, it doesn't follow locale's date format, "%b %e 日 %A" per string dateFormat. 
You can see that there're numerals for month(10) and day(24), but month was highlighted in the original screenshot.
Flags: needinfo?(petercpg)

Comment 4

4 years ago
In clock_view.js file, in updateDayDate() function, it seems below code snippet highlights the first number.

>> this.dayDate.innerHTML = formated.replace(/([0-9]+)/, '<b>$1</b>');
Blocks: 938417

Comment 5

4 years ago
I am working on this and will submit patch soon

Comment 6

4 years ago
Created attachment 8373304 [details] [diff] [review]
Patch which highlights date for chinese tradition locale too.

Attached patch which apply bold for date in Chinese tradition locale.

Today,somehow I am not able to push the patch to github.
After entering git hub credentials, there is no progress even after some hours.
Hence, I could not share github PR.
Attachment #8371396 - Attachment is obsolete: true
Attachment #8373304 - Flags: review?(petercpg)
Comment on attachment 8373304 [details] [diff] [review]
Patch which highlights date for chinese tradition locale too.

Review of attachment 8373304 [details] [diff] [review]:
-----------------------------------------------------------------

This patch fixes the bug on my Keon, but I might not be the right reviewer. Probably someone from Gaia team should give r+?

Mike, I just find you on the Modules page, could you find an appropriate person to make review? Thanks.
Attachment #8373304 - Flags: review?(petercpg)
Attachment #8373304 - Flags: review?(mike)
Attachment #8373304 - Flags: feedback+

Comment 8

4 years ago
Created attachment 8373914 [details] [review]
Pointer to Github PR

Finally succeeded in pushing the patch. Attached  github PR.
(Assignee)

Comment 9

4 years ago
Comment on attachment 8373304 [details] [diff] [review]
Patch which highlights date for chinese tradition locale too.

I'm going to steal the review from Mike. Gnaneswar, you're on the right track, but it would be better for us to have a more generic solution. We can do this by mucking about with the localeFormat string before we actually parse out the date.

I'll upload a patch in a second that explains what I mean; I'll have you review it and see if that makes sense to you.
Attachment #8373304 - Flags: review?(mike)
(Assignee)

Updated

4 years ago
Assignee: nobody → m
Target Milestone: --- → 1.4 S1 (14feb)
(Assignee)

Updated

4 years ago
Whiteboard: LocRun1.3 → LocRun1.3 [p=1]
(Assignee)

Comment 10

4 years ago
Created attachment 8374408 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16186

Gnaneswar, this patch should account for any locale, no matter what format they use for their date. Let me know if this looks good to you, or feel free to change it further if you think it needs something more. Sorry to keep stealing patches from you!
Attachment #8373304 - Attachment is obsolete: true
Attachment #8373914 - Attachment is obsolete: true
Attachment #8374408 - Flags: review?(gnaneswar.devuni)

Comment 11

4 years ago
(In reply to Marcus Cavanaugh [:mcav] <mcav@mozilla.com> from comment #10)
> Created attachment 8374408 [details] [review]
> Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16186

This patch looks good to me.

>Sorry to keep stealing patches from you!
Its fine if it improves the quality of code!
(Assignee)

Comment 12

4 years ago
Thanks! Landed in https://github.com/mozilla-b2g/gaia/commit/adfc2a2f75e57c4dc6e38df8ff21ca1cd8bb9075.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Attachment #8374408 - Flags: review?(gnaneswar.devuni)
Verified info:
Gaia      6e71ab4da1b08586ea0c758edb7aa199ee34cd2f
Gecko     https://hg.mozilla.org/mozilla-central/rev/bb030d47c946
BuildID   20140219160202
Version   30.0a1

The bug has fixed, I mark it to VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.