Closed Bug 896156 Opened 11 years ago Closed 11 years ago

Improper plural form and localization comments in download strings

Categories

(Firefox for Metro Graveyard :: Downloads, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: flod, Assigned: mbrubeck)

References

Details

Attachments

(1 file)

#'Files' refers to the Windows 8 file explorer
downloadShowInFiles=Show in Files

Please use the form 

# LOCALIZATION NOTE (downloadShowInFiles): 'Files' refers to the Windows 8 file explorer

-----

# LOCALIZATION NOTE (alertDownloadMultiple): Semicolon-separated list of plural forms.
# #1 is the number of files, #2 is (amount downloaded so far / total amount to download) and #3 is seconds remaining
alertDownloadMultiple=Downloading one file, #2, #3; Downloading #1 files, #2, #3

Localization note must read (keep the second line with the link). Also replace STRINGID with the real name ;-)

# LOCALIZATION NOTE (alertDownloadMultiple): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 is the number of files, #2 is (amount downloaded so far / total amount to download) and #3 is seconds remaining
alertDownloadMultiple=Downloading one file, #2, #3; Downloading #1 files, #2, #3

Again, keep the second line with the link.

# LOCALIZATION NOTE (alertMultipleDownloadsComplete): Semicolon-separated list of plural forms.
# #1 is the number of downloads completed
alertMultipleDownloadsComplete=One download has been completed;#1 downloads have been completed

Also: code wise I think that parameter #1 is always evaluated and passed to the string, so localizers are free to use #1 in all their plural forms. Can you confirm it?

-----

# LOCALIZATION NOTE (downloadsShowInFiles): Semicolon-separated list of plural forms.
# 'Files' refers to the Windows 8 file explorer
downloadsShowInFiles=Show download in Files;Show downloads in Files

As before: if you have a plural form, keep both lines in the localization comment.

But the main problem here is that you always need to pass the number of items to the string, and I must confess that I discovered this only recently thanks to Pike (and I'm going to track down all this kind of strings).

For example some languages use the same plural form for 1 and 11, and you need to display the number to make those strings grammatically correct. See for example this discussion: https://groups.google.com/forum/#!msg/mozilla.dev.l10n/sN8OfMIVk5A/vw82p1-BvuAJ or bug 476833.

downloadsShowInFiles2=Show #1 download in Files;Show #1 downloads in Files

I used downloadsShowInFiles2, but if you have another key name it would be even better.
Sorry, I forgot one note.

alertDownloadMultiple=Downloading one file, #2, #3; Downloading #1 files, #2, #3

You don't really want that space after ";"
Assignee: nobody → mbrubeck
Attached patch patchSplinter Review
(In reply to Francesco Lodolo [:flod] from comment #0)
> # #1 is the number of downloads completed
> alertMultipleDownloadsComplete=One download has been completed;#1 downloads
> have been completed
> 
> Also: code wise I think that parameter #1 is always evaluated and passed to
> the string, so localizers are free to use #1 in all their plural forms. Can
> you confirm it?

Yes, that's correct.

> downloadsShowInFiles=Show download in Files;Show downloads in Files
> 
> As before: if you have a plural form, keep both lines in the localization
> comment.
> 
> But the main problem here is that you always need to pass the number of
> items to the string, and I must confess that I discovered this only recently
> thanks to Pike (and I'm going to track down all this kind of strings).

In this case, I think we should just go back to a single string "Show in Files" because that's how the button is labeled in the designs from bug 876019.  In other cases, we could include an optional substitution variable even if we don't use it in the English string.

As always, thanks for your diligence and patience! I think I have a solid grasp of all of the rules now, and should be able to catch these problems during the review stage in the future.
Attachment #778867 - Flags: review?(msamuel)
Comment on attachment 778867 [details] [diff] [review]
patch

Review of attachment 778867 [details] [diff] [review]:
-----------------------------------------------------------------

Excellent. Thank you Francesco and Matt.
Attachment #778867 - Flags: review?(msamuel) → review+
https://hg.mozilla.org/mozilla-central/rev/daeeae8ab22a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: