mozilla / pontoon

Mozilla's Localization Platform
https://pontoon.mozilla.org
BSD 3-Clause "New" or "Revised" License
1.47k stars 528 forks source link

Consolidate plural forms used for the source string in the string list and the editor #2304

Open bugzilla-to-github opened 3 years ago

bugzilla-to-github commented 3 years ago

This issue was created automatically by a script.

Bug 1726610

Bug Reporter: @peiying2 CC: @Pike, @flodolo, @mathjazz

Created attachment 9237093 Screen Shot 2021-08-19 at 10.55.09 AM.png

Issue: This appears to happen to languages using the same translation for singular and plural terms: https://pontoon.mozilla.org/vi/amo/LC_MESSAGES/djangojs.po/?string=66616

Notice the left panel shows the source string with a variable in singular form. The Translation field in the middle shows the source string in plural form.

Random checked East Asian and Southeast Asian languages, they all appear to have the same issue.

bugzilla-to-github commented 3 years ago

Comment Author: @flodolo

I don't understand what the bug is. The variable is {0}, the original string has plurals, but this locale only has one form (with the correct variable). Even with one form, it's still a plural string for GetText.

Same string in Italian shows two forms https://pontoon.mozilla.org/it/amo/LC_MESSAGES/djangojs.po/?string=66616

bugzilla-to-github commented 3 years ago

Comment Author: @mathjazz

We show source string as singular in the string list and as plural in the editor.

We should consolidate and use the same form everywhere. Probably makes more sense to use singular form in the editor, if the locale doesn't have plurals. Although I worry there might be variables in the plural string that aren't included in the singular form, and that the locales without support for plurals would still need them in the translations.

bugzilla-to-github commented 3 years ago

Comment Author: @Pike

I think we should show other in a general sense for languages w/out plurals. Sadly, for gettext that's a lot less precisely defined, I guess.

Localizers that need to translate the string for all kinds of numbers should get the original version for all kinds of numbers, IMHO.