Skip to content

Fix gettext issues on Linux - #2277

Open
cameronwhite wants to merge 5 commits into
masterfrom
fix/translation-test
Open

Fix gettext issues on Linux#2277
cameronwhite wants to merge 5 commits into
masterfrom
fix/translation-test

Conversation

@cameronwhite

Copy link
Copy Markdown
Member

Description of Changes

  • Fix the gettext library name for Linux, where these functions are provided by glibc rather than a separate libintl
  • Add a unit test for translations. I'm not sure yet why this test fails on Ubuntu, but when running Pinta interactively the translations work fine.
  • For extra safety, be more careful about not overriding the user's LANGUAGE environment variable.

Fixes: #2274

Checklist

- Since we have pinvoke bindings to gettext now, this adds some test coverage
- Ensure that translations are compiled in the CI builds.
- LANGUAGE is what we should be overriding for overriding the text language, and only do this if the env var isn't already set

- Formatting fixes
I'm not sure why this fails in the unit test, but the language setting is picked up properly when running interactively.
@Skif-off

Skif-off commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Works fine.

Forgive my curiosity, why LANGUAGE instead of LANG?
The LANG and LC_* values ​​look the same, but the LANGUAGE value is a little strange:

$ locale
LANG=ru_RU.UTF-8
LANGUAGE=ru_RU:en

:en ???

@cameronwhite

Copy link
Copy Markdown
Member Author

great, thanks for testing!
I'm not an expert on this, but I think ru_RU:en is specifying a sequence of fallback languages to use depending on what translations the application has

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

Successfully merging this pull request may close these issues.

After PR 2261 Pinta's translations doesn't work

2 participants