KeePassXC does not use the primary preferred language of macOS and use multiples languages
KeePassXC uses only the primary preferred language (English).
KeePassXC uses a mix of primary and secondary preferred language.

macOS 10.14.5
Preferred languagues: English, French, Dutch.

Keeping only English as preferred language makes KeePassXC use only English.
KeePassXC - Version 2.4.2
Revision: a775031
Qt 5.12.3
Debugging mode is disabled.
Operating system: macOS Mojave (10.14)
CPU architecture: x86_64
Kernel: darwin 18.6.0
Enabled extensions:
Cryptographic libraries:
libgcrypt 1.8.4
I need some help because I only know English. Can you add arrows to where the French AND Dutch is mixing in the UI?
Mixing English and another language is normal. Since English is the default, if the string has not been translated then it will show the default.
Mixing English and another language is normal. Since English is the default, if the string has not been translated then it will show the default.
Since English is the primary language, I expect that English will be used everywhere.

Red lines are in English, the rest of the text is in French.
At this time I recommend just setting your desired language using the option at the bottom of that settings window. We changed the auto select to use Qt's built-in hierarchy resolution. It seems that might be broken on macOS.
Same here. Setting the language to English (United Kingdom) brings back proper strings.

Hm, this is weird, I suspected bbe7e8a45, but if I compile the 2.4.2 tag (a775031fe) on my own Mac, the default dialogs and menu do not switch to Dutch, which is the second language selected in my regional system preferences.
The only difference is that I haven't enabled all the optional features yet, e.g. my build has these:
KeePassXC - Version 2.4.2
Revision: a775031
Qt 5.12.3
Debugging mode is disabled.
Operating system: macOS Mojave (10.14)
CPU architecture: x86_64
Kernel: darwin 18.6.0
Enabled extensions:
- Auto-Type
Cryptographic libraries:
libgcrypt 1.8.4
while the official 2.4.2 build has:
KeePassXC - Version 2.4.2
Revision: a775031
Qt 5.12.3
Debugging mode is disabled.
Operating system: macOS Mojave (10.14)
CPU architecture: x86_64
Kernel: darwin 18.6.0
Enabled extensions:
- Auto-Type
- Browserintegratie
- SSH-agent
- KeeShare (signed and unsigned sharing)
- YubiKey
- TouchID
Cryptographic libraries:
libgcrypt 1.8.4
So maybe one of the additional extensions is messing things up?
Not likely, I wonder if it only happens to a signed application.
At this time I recommend just setting your desired language using the option at the bottom of that settings window. We changed the auto select to use Qt's built-in hierarchy resolution. It seems that might be broken on macOS.
The language option works just fine for the main GUI program (KeePassXC.app), but seems keepassxc-cli does not honor that option? On my machine keepassxc-cli uses Japanese while I choose Traditional Chinese from the GUI.
In Windows 10 is similar troubles. I updated from 2.3.4 to 2.4.3 and I got english UI in KeePassXC. Language settings is System default as was, but in 2.3.4 this setting was worked as my local language.
If I will switch Language settings in Basic Settings to my local language manually it will fix problem, but some problem with automatic system language detection is exist anyway.
There is not a problem, it was actually fixed. The old behavior was not correct. We now rely on the built-in language detection from Qt.
@droidmonkey correct behavior will be in the future version?
2.4.3 has the correct behavior. It obeys the order of your operating systems language preferences based on how Qt determines it. If there is a bug, it is on Qt's side not ours.
I have the same issue on two Windows 10 machines: they are set to german language. After switching the language in KeepassXC manually to "german" (the automatic language recognitation doesn't work, see #3375 ), some dialogues are displayed mixed german and english:
Debug info:
KeePassXC - Version 2.4.3
Revision: 5d6ef0c
Qt 5.12.3
Debugging mode is disabled.
Operating system: Windows 10 (10.0)
CPU architecture: x86_64
Kernel: winnt 10.0.17763
Enabled extensions:
Cryptographic libraries:
libgcrypt 1.8.4
@markusd112 that just means those phrases have not been translated in German.
Ok, can I help translating it?
@markusd112 yes absolutely, please head over to https://transifex.com/keepassxc
I figured out the problem and it is a Qt issue. When Qt polls the system for languages to use the return looks like {"de-DE", "en-US"} for example. Qt then tries to find the translation files in the following order:
Since the country-specific translation file (de-DE) does not exist in our translation batch the english translation is always loaded. I suspect there is also a bug in the way Qt builds the file list such that the "step down" search never occurs properly.
Nevertheless, I have figured out an elegant workaround that still uses the UI languages but avoids the awkward way Qt tries to load the right language.
@markusd112 that just means those phrases have not been translated in German.
All strings have been translated in transifex... Maybe still a bug?!
The translations are local to your computer and part of a release. They won't update until the next release
Hi everyone! I'm on v2.5.0 and experience the same behaviour as @yan12125. I have two languages on my macOS Mojave, where English is primary and it works perfectly in GUI (it's also set as a language in the settings instead of System Default), while keepassxc-cli has a mixture of languages (keepassxc-cli -h). Not a big problem as I can read both, but I think it's worth to be mentioned. :)
It is likely because if incomplete translations
@droidmonkey Even if I'd like it to be 100% English? In case of incomplete translations, I'd be happy to contribute missing ones then, just wanted to clarify that moment. :)
Ohhhhh, gotcha. Yah cli might be pulling a different language setting
@droidmonkey Yeah, I have a feeling that cli doesn't respect primary/secondary languages in macOS and probably picks the last one. And in my case it really takes the language with incomplete translations (I'm on it already btw), so it ends up being mixed.
It's interesting how it behaves in Linux, I'll try it out.
But overall, I don't know how many KeepassXC users besides me use cli so far, so not a big deal anyway and thank you for a quick reply. :)
Welcome! Language selection is a real PITA between the operating systems.
@droidmonkey I was able to find a solution to fix it. I'll provide a PR shortly to discuss, it's a minor fix :)
@droidmonkey
Well, I realised it's better to explain here yet before making any unnecessary contributions.
As you've mentioned a few comments above, there's an order on how QT loads translation files.
In my case, I have rather uncommon locales, which I fetch with the following command in macOS:
$ defaults read .GlobalPreferences AppleLanguages
(
"en-DE",
"ru-DE"
)
Since there's no keepassx_en_DE.qm nor keepassx_ru_DE.qm, QT tries to find keepassx_en.qm - no success - and eventually falls back to keepassx_ru.qm, which is the only existing among these.
So in order to fallback to a proper language family, I basically created a copy of keepassx_en_US.qm as keepassx_en.qm within Resources folder and it worked out immediately.
Then I found out that in CMakeLists.txt keepassx_en.ts is excluded. I think if we could return it back, then we could fix all the cases where English is the language and the region is different (another words en-DE|AT|CH|*)
What do you think?
P.S. After creating this file I don't see any regressions on GUI or CLI yet.
I would prefer keepassx_en_US.qm be explicitly copied to keepassx_en.qm on install from cmake. The share/translations/keepassx_en.ts is the source file to Transifex and not meant for deployment.
@droidmonkey Got it. I might work it out as a PR then if you don't mind. :)
@burningalchemist please do! Make sure you branch off of release/2.5.1