Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update / refactor translations / i18n #741

Open
matthijskooijman opened this issue Nov 19, 2023 · 2 comments
Open

Update / refactor translations / i18n #741

matthijskooijman opened this issue Nov 19, 2023 · 2 comments

Comments

@matthijskooijman
Copy link
Member

matthijskooijman commented Nov 19, 2023

Hamster currently has translations, but:

  • The desktop file is no longer translated
  • A lot of translations are still for an older version of the UI (so e.g. "Description: " is translated, but the UI now uses "description", so that remains untranslated).
  • The entire i18n approach might be using older tools and could maybe use an overhaul.

There might be some things to be learned from #559 (which is old and no longer applies, but probably does have some useful bits).

It seems that the current translations that are present do still work as expected. Note that translations do not work when running directly from the source tree (see this code). The easiest way to test is to use the flatpak build and run:

flatpak run --env=LANG=nl_NL.UTF-8 org.gnome.Hamster

Note that flatpak config --user --set languages "nl;en" should apparently also work, but does not seem to on my system.

@DirkHoffmann
Copy link
Member

I expect it to work, if the system language is defined accordingly or by preceeding a commandline argument by LANG=fr_FR.UTF-8 hamster (for example).

The few strings, which do have translations, work indeed. Even the l10n seems to be OK. I get local dates. We probably have to check, if all inputs are still handled correctly in those modes.

Amazingly, the in-code manual still works in many languages.

Do you know, which tool was used to extract the po files from the code? There is a structure in the po./ directory, but I don't recognise how it works. It seems to be a GNU standard (gettext?) though. Maybe the translation is still automatic with waf? What I saw in more recent i18n'd project does not have much in common with what I see here.

@matthijskooijman
Copy link
Member Author

Do you know, which tool was used to extract the po files from the code? There is a structure in the po./ directory, but I don't recognise how it works. It seems to be a GNU standard (gettext?) though.

I think #559 adds some custom waf script for this.

Maybe the translation is still automatic with waf? What I saw in more recent i18n'd project does not have much in common with what I see here.

I suspect that the waf build actually compiles .po to .mo, probably triggered by po/wscript and help/wscript, which is why everything still works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants