mathjazz / pontoon

In-place localization tool
https://pontoon.mozilla.org/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

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

Closed mathjazz closed 3 years ago

mathjazz commented 3 years ago

This issue was created automatically with bugzilla2github.

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.

mathjazz 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

mathjazz 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.

mathjazz 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.