fix(profile): fix changing language

Fixes #4000
This commit is contained in:
Jonathan Rainville 2021-11-02 15:31:51 -04:00 committed by Iuri Matias
parent cd428678f7
commit ac823079ac
3 changed files with 2 additions and 4 deletions

View File

@ -260,6 +260,7 @@ proc load*(self: AppController) =
singletonInstance.engine.setRootContextProperty("localAccountSensitiveSettings", self.localAccountSensitiveSettingsVariant)
#################################################
self.languageService.init()
self.settingService.init()
self.contactsService.init()
self.chatService.init()

View File

@ -21,8 +21,6 @@ proc newService*(): Service =
method init*(self: Service) =
try:
echo "init"
self.i18nPath = ""
if defined(development):
self.i18nPath = joinPath(getAppDir(), "../ui/i18n")
@ -39,8 +37,6 @@ method init*(self: Service) =
return
method setLanguage*(self: Service, locale: string) =
echo "---------------"
echo "--- setting language"
if (locale == self.currentLanguageCode):
return
self.currentLanguageCode = locale

View File

@ -279,6 +279,7 @@ QtObject {
}
function changeLocale(l) {
localAppSettings.locale = l
languageModuleInst.changeLocale(l)
}