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)

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)

VERIFIED FIXED
2.0 S4 (20june)
blocking-b2g 2.0+
Tracking Status
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.
Attached image Keon, Italian
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
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]".
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
Attached file Pull request on Github
Attachment #8438362 - Flags: review?(ejchen)
Comment on attachment 8438362 [details] [review]
Pull request on Github

Thanks Francesco, nice catch !
Attachment #8438362 - Flags: review?(ejchen) → review+
I think we need this also on 2.0 at this point, setting flag + keyword for checkin.
blocking-b2g: --- → 2.0?
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/gaia/commit/eb5b999efaad112f2dbfcf6122bade2ffc8fb361
Assignee: nobody → francesco.lodolo
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S4 (20june)
blocking-b2g: 2.0? → 2.0+
Verified on last Flame master build. French now says "2 Go disponibles".

Build ID: 20140612160203
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: