-
Notifications
You must be signed in to change notification settings - Fork 671
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
Make language configurable #8493
Conversation
|
I only would expect technically advanced settings there not ui settings.
Do you see issues caused by the feature?
We currently have Austrian and German in here I guess, we could add explicit translations for some of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Better move to "Advanced" section?
I only would expect technically advanced settings there not ui settings.
2. I think we'd need a branding option to hide this. (default=on)
Do you see issues caused by the feature?
I'd rather see it as an accessibility feature.
I see we have, enforcedLocale but I'd expect that was rather a workaround for a lack of a language selection?
3. Regarding displaying the language name, in oC10, the name of the language is part of the language file itself: ` "__language_name__" : "Deutsch (Förmlich: Sie)",` (Source: https://github.com/owncloud/core/blob/621a09501d9afd81afcc5f62765b9858ed5a7cce/lib/l10n/de_DE.json#L45) 4. In the desktop sync app, we only have [`client_de.ts`](https://github.com/owncloud/client/blob/master/translations/client_de.ts). With the selection in the UI, we could also make the other German translations available?
We currently have Austrian and German in here I guess, we could add explicit translations for some of them.
Currently the code is translating the short language code de_DE to its official name.
src/gui/CMakeLists.txt
Outdated
@@ -86,6 +86,8 @@ set(client_SRCS | |||
servernotificationhandler.cpp | |||
guiutility.cpp | |||
elidedlabel.cpp | |||
translationshelper.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't add the header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good :)
UX wise, I think it makes sense to make this setting as accessible as possible. The reason you want to change language through the UI is, usually, because an application is using the wrong language by default. Imagine someone has to find this dropdown while the application is in a foreign language they don't understand. |
Can be used by users to overwrite the language, e.g., for testing, or if the auto-detection doesn't work.
Stores language user can select in the GUI's settings.
Allows users to specify their preferred language, similar to --language. If not set, the existing auto-detection will be used.
This is a lot more user friendly than having to work with locale names, which often can't easily be associated with the language they represent. There is also a fallback for cases when Qt cannot provide the native name for a locale provided by the translations helper. This usually indicates an issue in the filename of the translations. Right now, this is the case with "client_TW.qm".
Last bit missing to make the language picker functional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog entry is missing
Kudos, SonarCloud Quality Gate passed! |
Closes #8466.
This PR adds two new methods to select the language within the GUI application: a config option in the general settings page, and a
--language
parameter.The current implementation of listing all available locales relies on the translation file's filenames. It extracts the locale part and tries to resolve the native language name using
QLocale::nativeLanguageName
. This seems to work relatively well, except for one file calledTW
. I suspect we have to rename that file totw
.