Closed Bug 1063216 Opened 11 years ago Closed 11 years ago

Fix plural form in Usage widget

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(b2g-v2.1 fixed, b2g-v2.2 fixed)

RESOLVED FIXED
2.1 S4 (12sep)
Tracking Status
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed

People

(Reporter: theo, Assigned: theo)

References

Details

(Keywords: late-l10n)

Attachments

(1 file)

In bug 1038723, with :gmarty we quickly coded plural forms for Usage widget right before FL, basic testing showed it was working, but since then I did some additional testing and turns out they are not entirely. The value passed is a string while we need a float, so the case [other] is always picked up :/ Also, by looking at the code, we need a [zero] case for data-available2 when [0.00 <= value <= 0.99], so I'm adding it. However it's okay for over-limit.
Tested on Flame 2.2 with different values, to check that the right string was displayed. Marina, can you take a look please?
Assignee: nobody → tchevalier
Status: NEW → ASSIGNED
Attachment #8484613 - Flags: review?(mri)
Updated the PR, Marina made me notice the over limit string was not displayed, because the entity name was wrong (data-over-limit vs. over-limit). I also removed data-l10n-id="data-limit" from the template, because it contains a variable, and when you open the Utility Tray it briefly shows "Data limit ({{value}})". Now the string is added only at the time we get the value. I removed data-l10n-id="data-available" for the same reason, and because it was anyway replaced with data-available2 or over-limit string. This time, tested on device *both* strings.
Comment on attachment 8484613 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23746 Works fine, thanks for the effort! r+ Please land once TBPL is green
Attachment #8484613 - Flags: review?(mri) → review+
Comment on attachment 8484613 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23746 [Approval Request Comment] [Bug caused by] (feature/regressing bug #): Bug 1038723 [User impact] if declined: Over limit string won't be displayed, over-limit and data-available strings can't be localized properly (broken plurals). [Testing completed]: Tested on device with 2.2, both strings with different Data limit and Usage values. [Risk to taking this patch] (and alternatives if risky): very low [String changes made]: added one string to costcontrol.properties for plural
Attachment #8484613 - Flags: approval-gaia-v2.1?
(In reply to Théo Chevalier [:tchevalier] from comment #4) > Comment on attachment 8484613 [details] [review] > Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23746 > > [Approval Request Comment] > [Bug caused by] (feature/regressing bug #): Bug 1038723 > [User impact] if declined: Over limit string won't be displayed, over-limit > and data-available strings can't be localized properly (broken plurals). > [Testing completed]: Tested on device with 2.2, both strings with different > Data limit and Usage values. > [Risk to taking this patch] (and alternatives if risky): very low > [String changes made]: added one string to costcontrol.properties for plural waiting for master landing here, please seek approval only after the bug is Fixed on 2.2/master
Sorry Bhavana, let's land on master :) (TBPL errors looks unrelated)
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S4 (12sep)
Attachment #8484613 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
This appears to be a back end issue so we are unable to verify it.
QA Whiteboard: [QAnalyst-verify-]
QA Whiteboard: [QAnalyst-verify-] → [QAnalyst-verify-][QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-verify-][QAnalyst-Triage?] → [QAnalyst-verify-][QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: