LeastAuthority / destiny

Destiny – Cross-platform Magic Wormhole graphical client
MIT License
257 stars 14 forks source link

L10n proof of concept for Easy Localization #205

Closed wuan closed 1 year ago

wuan commented 1 year ago

This PR introduces Easy Localization and adds some translated texts.


Code Review Checklist

donpui commented 1 year ago

How the best organise UI language changes?

Several options to discuss:

  1. Generate different language version apps;
  2. Make initial screen to select language and change it from settings;
  3. Try to detect language from platforms and change automatically (some platforms, have limited language interface support);
wuan commented 1 year ago

For macOS, iOS, Android the best match against the system language settings is being used. This is basically option 3 without the need to add the selection logic. I assume this will be similar on Windows and Linux, which we should test as well.

donpui commented 1 year ago

Run some testing. I get issue if I select Lithuania language on Android phone and then try to run app:

image

Probably we should push to default English.

Also, not all places are translated in German language.

Overall I think few things additionally we need:

donpui commented 1 year ago

Pushed LT language to check: https://github.com/wuan/destiny/pull/1

wuan commented 1 year ago

... Overall I think few things additionally we need:

  • solve flutter-intro-slider plugin/changes as there are some translations and logic tight to English.
  • add settings to change language not depending on locale. For example, this is helpful very much for small popularity languages, which are not fully supported on various OS and also helps when people use PC with English locale, but still want to use some apps in native language.

That might be related to the fallback locale. But it should take en if no translation is found by default"

donpui commented 1 year ago

That might be related to the fallback locale.

Last commit helped, now default locale is loaded.