Closed Bug 1437583 Opened 2 years ago Closed 2 years ago
Split improper plural forms for Delete/Add bookmarks in separate strings
59 bytes, text/x-review-board-request
https://searchfox.org/mozilla-central/rev/b9f1a4ecba48b2d8c686669e32d109c40e927b48/browser/components/places/content/controller.js#623-631 cmd.deletePages.label=Delete Page;Delete Pages cmd.deletePages.accesskey=D cmd.bookmarkPages.label=Bookmark Page;Bookmark Pages cmd.bookmarkPages.accesskey=B These should not be plural forms. Plural forms need to display the number explicitly in the string, and they shouldn't be used for a "1 vs many" situation. Think for example of locales like Arabic, with 6 plural forms. They only make sense if the number if displayed in the string.
I'm not sure what the proposed solution for these strings would be since they seem to make a reasonable amount of sense to me in the English form, but I would like to point out that L10n can currently insert the numbers if they want/need to, e.g. https://searchfox.org/mozilla-central/rev/b9f1a4ecba48b2d8c686669e32d109c40e927b48/browser/components/places/PlacesUIUtils.jsm#244 Unfortunately that's not documented in the .properties file.
Summary: Split improper plural forms in separate strings → Split improper plural forms for Delete/Add bookmarks in separate strings
(In reply to Mark Banner (:standard8) from comment #1) > I'm not sure what the proposed solution for these strings would be since > they seem to make a reasonable amount of sense to me in the English form, > but I would like to point out that L10n can currently insert the numbers if > they want/need to, e.g. > > https://searchfox.org/mozilla-central/rev/ > b9f1a4ecba48b2d8c686669e32d109c40e927b48/browser/components/places/ > PlacesUIUtils.jsm#244 Interesting, I completely missed that. Still, bug 1196395 seems to make a call about not displaying such number in the UI (for English), and I think it's worth giving all languages that chance, even if it means multiplying the strings for translation. So, there are two issues here, from a localization point of view: 1) (minor) The shared accesskey. That's safe-ish, since the label is going to be very similar, but far from intuitive from a localizer point of view. Each string should have its own accesskey. That's also what's going to happen with Fluent, since accesskeys are an attribute of a message. 2) The "fake" plural. Consider for example how this string was translate in Sorbian Bok lašowaś;Boka lašowaś;Boki lašowaś;Boki lašowaś That's likely wrong, because without the number the declinations don't make a lot of sense. Czech likely translated it correctly, with 2nd and 3rd form identical Smazat stránku;Smazat stránky;Smazat stránky As said, it would be solved by adding the number, but I think it makes sense to split them instead in 2 separate strings, with their accesskeys.
Comment on attachment 8950298 [details] Bug 1437583 - Split plural forms for Delete/Add bookmarks in separate strings Pike, what do you think, also based on comments about adding the number to l10n files? Given that we know some translations are wrong, I prefer this approach.
Attachment #8950298 - Flags: feedback?(l10n)
Comment on attachment 8950298 [details] Bug 1437583 - Split plural forms for Delete/Add bookmarks in separate strings lgtm.
Attachment #8950298 - Flags: feedback?(l10n) → feedback+
These strings were added in bug 1196395, with Philipp doing the UX. Philipp? What's your take on showing the number of deleted pages/bookmarks, in particular for languages where the plural form depends on delicate things like "it's 3 or 6". The assertion is that all languages have a grammatical form for "can't count these", so this is really about the UX, not our technical ability to implement it.
Depends on: 1196395
(Clearing r? in the meantime)
To give more context on the NI: these strings ("Delete Page", "Delete Pages", "Bookmark Page", "Bookmark Pages") are displayed in the context menu of items in Library->History
@Pike Just had a quick chat on Vidyo with Michelle about this bug for UX. She says that it's OK for languages to display the number in these commands. If needed, even for English. So, we could just add a localization note and keep the existing code/strings. Having said that, I believe that the proposed approach (separate strings) is cleaner, and would get rid of completely wrong translations that are already in tree. Thoughts?
Flags: needinfo?(philipp) → needinfo?(l10n)
I favor separating the two out, too.
Attachment #8950298 - Flags: review?(mak77) → review?(standard8)
Comment on attachment 8950298 [details] Bug 1437583 - Split plural forms for Delete/Add bookmarks in separate strings https://reviewboard.mozilla.org/r/219550/#review227396 Looks good, thanks.
Attachment #8950298 - Flags: review?(standard8) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/a13152330b64 Split plural forms for Delete/Add bookmarks in separate strings r=standard8
You need to log in before you can comment on or make changes to this bug.