Use proper plural form in editor.searchResults and sourceSearch.resultsSummary
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: flod, Assigned: bmiriam1230)
References
(Blocks 1 open bug)
Details
Attachments
(1 obsolete file)
Problem was raised in https://bugzilla.mozilla.org/show_bug.cgi?id=1331654#c24 but I never filed a bug. editor.searchResults=%d of %d results Several languages require a proper plural form based on the second variable. https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Use_proper_plural_forms There's an additional problem though: plural form expects variables in the form #1, #2, etc. https://hg.mozilla.org/l10n/compare-locales/file/tip/compare_locales/checks.py#l63
Reporter | ||
Comment 1•7 years ago
|
||
Actually, there's another string in debugger sourceSearch.resultsSummary=%d instances of “%S”
Comment 2•6 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 3•5 years ago
|
||
Hey, David could you check and see if this is still relevant?
Reporter | ||
Comment 4•5 years ago
|
||
Did you forget a NI by any chance? Both strings are still there https://hg.mozilla.org/l10n/gecko-strings/file/default/devtools/client/debugger.properties#l452 https://hg.mozilla.org/l10n/gecko-strings/file/default/devtools/client/debugger.properties#l293
Updated•5 years ago
|
Comment 5•5 years ago
|
||
:flod Could you provide me the proper strings? I can get them changed ASAP.
Reporter | ||
Comment 6•5 years ago
|
||
Consider the first string.
# LOCALIZATION NOTE (editor.searchResults): Editor Search bar message
# for the summarizing the selected search result. e.g. 5 of 10 results.
editor.searchResults=%d of %d results
"results" needs to be a proper plural.
English has 2 plurals (for "1" and any other number), each one separated by a semicolon character. Also, you need to use #1 for the variable replace by the number, not %S or %d
editor.searchResultsMessage=%d of #1 result;%d of #1 results
If you really want, you can leave the first form empty, and start with a semicolon.
editor.searchResultsMessage=;%d of #1 results
You also need a specific comment (and a new ID), per https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Use_proper_plural_forms
# LOCALIZATION NOTE (editor.searchResultsMessage): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# Editor Search bar message to summarize the selected search result. e.g. 5 of 10 results.
editor.searchResultsMessage=%d of #1 result;%d of #1 results
You need to use the plural form code to:
- Identify the right substring to use based on #1 (
PluralForm.get()
), then replace #1 with the actual number of results. - Format the resulting string, replacing
%d
with the number.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Added proper plural form to editor.searchResults and sourceSearch.resultsSummary1. Updated the comments and IDs for the new strings as well. Replaced all instances of old string references with new string references.
Pushed by jlaster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/65258ed1ea60 Use proper plural form in editor.searchResults and sourceSearch.resultsSummary1 r=davidwalsh,flod
Comment 10•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•