Closed Bug 1210196 Opened 9 years ago Closed 9 years ago

Support minUnit, maxUnit and negative values in mozIntl.DurationFormat

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(1 file)

DurationFormat should handle negative values.
Comment on attachment 8668158 [details] [review]
[gaia] zbraniecki:1210196-support-negative-values-in-durationformat > mozilla-b2g:master

I thought I can wait with enabling more duration patterns, but Music could use "mm:ss" right now, so I expanded it.

I also added naive ability to put negative sign. I thought about adding negative sign to the pattern in l10n file, but so far it seems that no locale needs it (scanning through CLDR) and I decided it would just confuse localizers.

I expect that if I'm wrong, we'll update it once we get an algorithm in the spec (which may end up being part of UnitFormat anyway).

For now, this should handle all use cases that we need it for and I don't plan on adding UnitFormat to mozIntl in 2.5 because it seems like a major task and lots of new strings for localizers.
Attachment #8668158 - Flags: review?(stas)
Summary: Support negative values in mozIntl.DurationFormat → Support minUnit, maxUnit and negative values in mozIntl.DurationFormat
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Comment on attachment 8668158 [details] [review]
[gaia] zbraniecki:1210196-support-negative-values-in-durationformat > mozilla-b2g:master

lgtm, r=me, thanks!
Attachment #8668158 - Flags: review?(stas) → review+
Commit: https://github.com/mozilla-b2g/gaia/commit/bda68b65184e09957a2170ca01c25bdb9b0cfc41
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 1210234
Backed out for preventing to revert bug 1207044, which was causing bug 1210234. The merge[1] and the follow up[2] were backed out.

[1] https://github.com/mozilla-b2g/gaia/commit/0333858eeccf285be53826ef43c3a9c8ca3714ec
[2] https://github.com/mozilla-b2g/gaia/commit/1aacacc9df5ff349b4653b235e96d7141faabbe0
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Relanded in bug 1207044
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: