Closed Bug 1024154 Opened 10 years ago Closed 10 years ago

[Notes] l10n improvements for date strings

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(b2g-v2.1 verified)

VERIFIED FIXED
2.0 S4 (20june)
Tracking Status
b2g-v2.1 --- verified

People

(Reporter: doliver, Assigned: doliver)

References

Details

(Keywords: l12y)

Attachments

(4 files)

The current way we handle the relative date strings of the last edit time on the notes is not easily localizable. We'd like to change them to support the webL10n plurals as described here: https://wiki.mozilla.org/L10n:B2G/Developers
Attached file master PR
Theo, can you sanity check my .properties changes?
Attachment #8438761 - Flags: review?(yor)
Attachment #8438761 - Flags: feedback?(tchevalier)
Comment on attachment 8438761 [details] [review]
master PR

Thanks Dylan, the .properties looks good to me.

However, have you checked if "Just now" is ever displayed?

I think that if diff / 60 is equal to something < 1, then Math.floor() will return 1 instead of 0.
And, if Math.floor returns 1, "1 minute ago" will be displayed instead of "Just now".

But maybe I'm totally wrong, this is just a guess :)
Attachment #8438761 - Flags: feedback?(tchevalier) → feedback+
(In reply to Théo Chevalier [:tchevalier] from comment #2)
> Comment on attachment 8438761 [details] [review]
> master PR
> 
> Thanks Dylan, the .properties looks good to me.
> 
> However, have you checked if "Just now" is ever displayed?
> 
> I think that if diff / 60 is equal to something < 1, then Math.floor() will
> return 1 instead of 0.
> And, if Math.floor returns 1, "1 minute ago" will be displayed instead of
> "Just now".
> 
> But maybe I'm totally wrong, this is just a guess :)

Actually, Math.floor() should return 0 when the value is between 0 and 1, so it should be fine
Comment on attachment 8438761 [details] [review]
master PR

I'm not too familiar with plural variance for different languages.  Having said that, the js seems to be doing the right thing.  Some unit tests here would be nice.
Attachment #8438761 - Flags: review?(yor) → review+
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/notes/commit/f6cfd6c6ae0207620cf6c9d6c03aac926f4fa992
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
See Also: → 1044142
Hi Reporter,
    Could you provide the detailed reproduce steps,or which system language I should set to verify this bug??

Thank you!
Flags: needinfo?(doliver)
This issue has been failed verified on Flame v2.1(Português(Europeu)).
See attachments: v2.1_1721.mp4 and logcat_v2.1_1721.txt.
Reproduce rate: 5/5

Repro STR:
1.Install Notes from Marketplace.
2.New a note and then modify it in Notes app.
3.Select these lanauage and check the date in the note:
1)Español
**The date strings on the notes is localized.(See attach:verified_ES&FR&PTG(DB)&PLK.zip)
2)Français
**The date strings on the notes is localized.(See attach:verified_ES&FR&PTG(DB)&PLK.zip)
3)Português(Europeu)
**The date strings on the notes is not localized.
4)Português(do Brasil)
**The date strings on the notes is localized.(See attach:verified_ES&FR&PTG(DB)&PLK.zip)
5)Polski
**The date strings on the notes is localized.(See attach:verified_ES&FR&PTG(DB)&PLK.zip)

Flame 2.1  build:
Gaia-Rev        c226db212db4d824c09617cd6dc407b2d4258d9b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/cf8bebfa4703
Build-ID        20141209170126
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141209.212104
FW-Date         Tue Dec  9 21:21:15 EST 2014
Bootloader      L1TC00011880
Flags: needinfo?(doliver) → needinfo?(mlien)
Verified again with today's v2.1 gaia/gecko, Notes only support following L10n: bn-BD, de, en-US, es, fr, nl, pl, pt-BR
As comment 7's result, it's the expected result.

Gaia-Rev        97873dca486abf4162a3345e71b375806937bdec
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/9faa165ac85d
Build-ID        20141211161201
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141211.195557
FW-Date         Thu Dec 11 19:56:08 EST 2014
Bootloader      L1TC000118B0
Status: RESOLVED → VERIFIED
Flags: needinfo?(mlien)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: