Closed
Bug 1018042
Opened 10 years ago
Closed 10 years ago
[l10n] Plural form for Application storage available space is sometimes wrong
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: theo, Assigned: flod)
Details
Attachments
(4 files)
When there is 2GB available for App storage, the plural form is wrong. On the screenshot you can see "2 Go disponible". But if we take a look at the French localization, we can see that when {{size}} equals 2, it should display "2 Go disponibles" https://hg.mozilla.org/gaia-l10n/fr/file/44205165ad6c/apps/settings/settings.properties#l673 You can also notice that for Media storage, the plural form is working as expected: "3.8 Go disponibles". https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/storage.js#L178 The variable freespace here probably contains numeric format that l10n.js doesn't appreciate.
Assignee | ||
Comment 1•10 years ago
|
||
That's strange: on Keon I get "1.5 disponibili", with the right plural form. One first step would probably be to display or log that value on a flame, to see what is passed to l10n.js
Assignee | ||
Comment 2•10 years ago
|
||
Note: could be related to the issue we discovered in bug 1022445. "2", if passed a string instead of a number, use the form for "[one]" instead of "[other]".
Assignee | ||
Comment 3•10 years ago
|
||
Looks like size is passed as a string in the helper function https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/utils.js#L143
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8438362 -
Flags: review?(ejchen)
Assignee | ||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Comment on attachment 8438362 [details] [review] Pull request on Github Thanks Francesco, nice catch !
Attachment #8438362 -
Flags: review?(ejchen) → review+
Comment 7•10 years ago
|
||
Here comes the code why this bug would happen: https://github.com/mozilla-b2g/gaia/blob/master/shared/js/l10n.js#L837
Assignee | ||
Comment 8•10 years ago
|
||
I think we need this also on 2.0 at this point, setting flag + keyword for checkin.
blocking-b2g: --- → 2.0?
Keywords: checkin-needed
Comment 9•10 years ago
|
||
Master: https://github.com/mozilla-b2g/gaia/commit/eb5b999efaad112f2dbfcf6122bade2ffc8fb361
Assignee: nobody → francesco.lodolo
Status: NEW → RESOLVED
Closed: 10 years ago
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S4 (20june)
Updated•10 years ago
|
blocking-b2g: 2.0? → 2.0+
Assignee | ||
Comment 10•10 years ago
|
||
Verified on last Flame master build. French now says "2 Go disponibles". Build ID: 20140612160203
Status: RESOLVED → VERIFIED
Thanks Francesco :)
Comment 12•10 years ago
|
||
v2.0: https://github.com/mozilla-b2g/gaia/commit/d5b60532d493207d2f1670a2dd4f19d9498b5262
You need to log in
before you can comment on or make changes to this bug.
Description
•