Closed Bug 930563 Opened 11 years ago Closed 10 years ago

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

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED
1.4 S1 (14feb)

People

(Reporter: petercpg, Assigned: mcav)

References

Details

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

Attachments

(2 files, 3 obsolete files)

Attached image 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
Attached image Date_Screenshot.jpg (obsolete) —
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)
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>');
I am working on this and will submit patch soon
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+
Attached file Pointer to Github PR (obsolete) —
Finally succeeded in pushing the patch. Attached  github PR.
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: nobody → m
Target Milestone: --- → 1.4 S1 (14feb)
Whiteboard: LocRun1.3 → LocRun1.3 [p=1]
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)
(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!
Thanks! Landed in https://github.com/mozilla-b2g/gaia/commit/adfc2a2f75e57c4dc6e38df8ff21ca1cd8bb9075.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: