ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
758 stars 142 forks source link

Support translation of units in OONI Probe apps #1140

Open agrabeli opened 4 years ago

agrabeli commented 4 years ago

A translator shared the following feedback:

The unit "bytes" is being displayed in English in the localized UI (see screenshot below). Though unit localization libraries exist, the easier approach is to just push the units to Transifex for translation. Do make sure that the string is "%variable% unit" since different languages have different spacing rules.

 2020-04-24 Unit in English in the localized UI

hellais commented 4 years ago

This is maybe a duplicate of https://github.com/ooni/probe/issues/1146 or can at least be done during the same work.

hellais commented 4 years ago

Also consider the issue of s being part of the translation and the need for styling it.

See: https://github.com/ooni/probe-desktop/pull/155#issue-439514396

sarathms commented 4 years ago

the issue of s being part of the translation and the need for styling it

Backstory: When the key was first written for probe-desktop it was just the unit s and the value was being rendered directly. When adopted in probe-mobile @lorenzoPrimi changed it to the {var} s parameterized format, which I think is consistent with all other places where we used similar values. I dropped the special styling in probe-desktop to avoid a back and forth about this, especially since it has already been released. In hindsight, I could have spent some more time to explore ways to retain the styling despite this change.