fix: enforce locale provided by appSettings

Prior to this commit, we would only set the translation package for the
application's engine when `appSettings.locale !== "en"`.

This is problematic because it seems that `engine` is already provided with
a system default that may not be `en`. In practice, this means that, initially,
engine is loaded with, say `de`. `appSettings.locale` might be `en` but because
we're only loading the correct translation package when it's **not** `en`,
the application will stay in `de`.

Changing the language to `en` at runtime is fine, however once the application
is restarted, `engine` is again initialized with some other possible system default.

It seems that we should *always* load the translation packge when `appSettings` are
loaded.
This commit is contained in:
Pascal Precht 2021-03-25 10:57:02 +01:00 committed by Iuri Matias
parent 2336aa4e6f
commit dc9de1968f
1 changed files with 1 additions and 3 deletions

View File

@ -150,9 +150,7 @@ RowLayout {
Connections {
target: profileModel
onProfileSettingsFileChanged: {
if (appSettings.locale !== "en") {
profileModel.changeLocale(appSettings.locale)
}
profileModel.changeLocale(appSettings.locale)
// Since https://github.com/status-im/status-desktop/commit/93668ff75
// we're hiding the setting to change appearance for compact normal mode