Closed
Bug 930563
Opened 11 years ago
Closed 11 years ago
[B2G][L10n][Clock] Chinese Traditional: Highlight date instead of first number displayed
Categories
(Firefox OS Graveyard :: Gaia::Clock, defect)
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)
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
Reporter | ||
Updated•11 years ago
|
Whiteboard: LocRun1.2
Reporter | ||
Comment 1•11 years ago
|
||
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 screenshot. Please let me know if this what you are expecting.
Flags: needinfo?(petercpg)
Reporter | ||
Comment 3•11 years ago
|
||
(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>');
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)
Reporter | ||
Comment 7•11 years ago
|
||
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+
Assignee | ||
Comment 9•11 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•11 years ago
|
Assignee: nobody → m
Target Milestone: --- → 1.4 S1 (14feb)
Assignee | ||
Updated•11 years ago
|
Whiteboard: LocRun1.3 → LocRun1.3 [p=1]
Assignee | ||
Comment 10•11 years ago
|
||
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•11 years ago
|
||
(In reply to Marcus Cavanaugh [:mcav] <mcav@mozilla.com> from comment #10)
> Created attachment 8374408 [details]
> 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•11 years ago
|
||
Thanks! Landed in https://github.com/mozilla-b2g/gaia/commit/adfc2a2f75e57c4dc6e38df8ff21ca1cd8bb9075.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
Attachment #8374408 -
Flags: review?(gnaneswar.devuni)
Comment 13•11 years ago
|
||
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.
Description
•