openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.37k stars 1.21k forks source link

No longer able to translate many plural messages in Vietnamese #8147

Open 1ec5 opened 4 years ago

1ec5 commented 4 years ago

As I finally started digging into the Vietnamese localization after #7991, I realized that Transifex doesn’t let me completely translate all the messages that PR made pluralizable, because Unicode’s CLDR project insists that Vietnamese has no plural form, and Transifex takes CLDR at face value. Previously, the Vietnamese localization had been taking advantage of the anglocentric one/other messages formerly hard-coded in this codebase:

Category English Vietnamese
one Copied a feature. sao chép đối tượng
other Copied {n} features. sao chép {n} đối tượng

Perhaps other ostensibly unpluralized languages have been taking advantage of these strings the same way.

For now, the Vietnamese localization will only be able to specify the “sao chép {n} đối tượng”, so the singular will read like “Copied 1 feature”. That’ll be a regression compared to v2.18 but only an aesthetic issue. Some messages with determiners but no numbers, such as “These can’t be straightened…”, have remained as two separate one and other messages, so I won’t have to put in clunky translations equivalent to “object(s)”, but others have been collapsed into a single message that can no longer be translated completely.

CLDR v38 came out just a few days ago, so it could be months before a new release comes out, and still longer before Transifex updates to the latest version. This documentation implies that Transifex may be able to put in a temporary override in the meantime.

1ec5 commented 4 years ago

For now, the Vietnamese localization will only be able to specify the “sao chép {n} đối tượng”, so the singular will read like “Copied 1 feature”. That’ll be a regression compared to v2.18 but only an aesthetic issue. Some messages with determiners but no numbers, such as “These can’t be straightened…”, have remained as two separate one and other messages, so I won’t have to put in clunky translations equivalent to “object(s)”, but others have been collapsed into a single message that can no longer be translated completely.

There ended up being a few messages where I had to write “(các) đối tượng” in parentheses in Vietnamese, the equivalent of “object(s)” in English.