From c9749f459e24d452de2bbdc43515ac71f3725fff Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 7 Nov 2023 13:16:10 +0100 Subject: [PATCH] Add GUI options to activate Spell Checker and change its language. --- linphone-app/assets/languages/cs.ts | 71 +++++++++++++++- linphone-app/assets/languages/da.ts | 69 ++++++++++++++- linphone-app/assets/languages/de.ts | 69 ++++++++++++++- linphone-app/assets/languages/en.ts | 83 +++++++++++++------ linphone-app/assets/languages/es.ts | 69 ++++++++++++++- linphone-app/assets/languages/fr_FR.ts | 83 +++++++++++++------ linphone-app/assets/languages/hu.ts | 69 ++++++++++++++- linphone-app/assets/languages/it.ts | 69 ++++++++++++++- linphone-app/assets/languages/ja.ts | 69 ++++++++++++++- linphone-app/assets/languages/lt.ts | 71 +++++++++++++++- linphone-app/assets/languages/pt_BR.ts | 69 ++++++++++++++- linphone-app/assets/languages/ru.ts | 69 ++++++++++++++- linphone-app/assets/languages/sv.ts | 69 ++++++++++++++- linphone-app/assets/languages/tr.ts | 69 ++++++++++++++- linphone-app/assets/languages/uk.ts | 68 +++++++++++++++ linphone-app/assets/languages/zh_CN.ts | 69 ++++++++++++++- .../other/spell-checker/SpellChecker.cpp | 5 +- .../other/spell-checker/SpellChecker.hpp | 6 +- .../src/components/settings/SettingsModel.cpp | 13 +++ .../src/components/settings/SettingsModel.hpp | 8 ++ .../ui/views/App/Settings/SettingsUi.qml | 35 ++++++++ 21 files changed, 1128 insertions(+), 74 deletions(-) diff --git a/linphone-app/assets/languages/cs.ts b/linphone-app/assets/languages/cs.ts index 3b6bc2ba7..cddd12a6d 100644 --- a/linphone-app/assets/languages/cs.ts +++ b/linphone-app/assets/languages/cs.ts @@ -1508,7 +1508,6 @@ Adresa URL není nakonfigurována. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1995,6 +1994,42 @@ Klikněte zde: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + Poslední vzdálené zajištění selhalo + + + newVersionAvailable + K dispozici je nová verze (%1)! + + + newVersionAvailableInstructions + + + + cancel + + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -2391,7 +2426,7 @@ Klikněte zde: <a href="%1">%1</a> newVersionAvailable K dispozici je nová verze (%1)! - + newFileMessage Obdržena nová příloha! @@ -3837,6 +3872,11 @@ Klikněte zde: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. Obnovení vyskakovacích oken + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -4024,6 +4064,29 @@ Klikněte zde: <a href="%1">%1</a> PŘIDAT KONTAKT + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5208,5 +5271,9 @@ Klikněte zde: <a href="%1">%1</a> %1 vteřin + + okButton + OK + diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index 9882e467b..5ec4d08ae 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -1497,7 +1497,6 @@ Server url ikke konfigureret. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1984,6 +1983,42 @@ Klik her: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + + + + newVersionAvailable + En ny version (%1) er tilgængelig! + + + newVersionAvailableInstructions + + + + cancel + ANNULLER + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3799,6 +3834,11 @@ Klik her: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3986,6 +4026,29 @@ Klik her: <a href="%1">%1</a> OPRET KONTAKT + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5163,5 +5226,9 @@ Klik her: <a href="%1">%1</a> + + okButton + + diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index fa01528d0..9b51c35b7 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -1497,7 +1497,6 @@ Server URL ist nicht konfiguriert. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1984,6 +1983,42 @@ Klicken Sie hier: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + Letzte Fernkonfiguration fehlgeschlagen + + + newVersionAvailable + Eine neue Version (%1) ist verfügbar! + + + newVersionAvailableInstructions + + + + cancel + + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3799,6 +3834,11 @@ Klicken Sie hier: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3986,6 +4026,29 @@ Klicken Sie hier: <a href="%1">%1</a> KONTAKT HINZUFÜGEN + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5163,5 +5226,9 @@ Klicken Sie hier: <a href="%1">%1</a> %1 Sekunden + + okButton + OK + diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index 258302fcf..123d79b63 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -1923,24 +1923,24 @@ Click here: <a href="%1">%1</a> MainWindow - newVersionCheckError - An error occured checking for a new version. Try again later or contact support if problem persists. + newVersionCheckError + An error occured checking for a new version. Try again later or contact support if problem persists. - newVersionAvailableInstructions - To upgrade to the new version, download the package and install it over the existing one + newVersionAvailableInstructions + To upgrade to the new version, download the package and install it over the existing one - downloadUpdate - Download + downloadUpdate + Download - noNewVersionAvailable - Your application is up to date. + noNewVersionAvailable + Your application is up to date. - newVersionInstalled - New application version successfully installed. + newVersionInstalled + New application version successfully installed. mainSearchBarPlaceholder @@ -2003,6 +2003,22 @@ Click here: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list Open meetings + + lastProvisioningFailed + Remote provisioning failed. The link might be used or expired. If it was provided to you, please contact your administrator. + + + newVersionAvailable + A new version (%1) is available! + + + cancel + Cancel + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. + MainWindowMenuBar @@ -3843,6 +3859,11 @@ Click here: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. Restore asking popups + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + Spell Checker + SettingsVideo @@ -4030,6 +4051,29 @@ Click here: <a href="%1">%1</a> ADD CONTACT + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + Did you mean ? + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + Add to Dictionnary + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + Ignore Once + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + Ignore All + + Timeline @@ -5207,24 +5251,9 @@ Click here: <a href="%1">%1</a> %1 seconds - - - SpellCheckerMenu - spellCheckingMenuDidYouMean - Did you mean ? - - - spellCheckingMenuAddToDictionary - Add to Dictionnary - - - spellCheckingMenuIgnoreOnce - Ignore Once - - - spellCheckingMenuIgnoreAll - Ignore All + okButton + OK diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 30371a639..85aa80cf4 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -1497,7 +1497,6 @@ URL del servidor no configurada. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1984,6 +1983,42 @@ Haga clic aquí: <a href="%1">%1 </a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + + + + newVersionAvailable + ¡Una nueva versión (%1) está disponible! + + + newVersionAvailableInstructions + + + + cancel + CANCELAR + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3799,6 +3834,11 @@ Haga clic aquí: <a href="%1">%1 </a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3986,6 +4026,29 @@ Haga clic aquí: <a href="%1">%1 </a> AÑADIR CONTACTO + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5163,5 +5226,9 @@ Haga clic aquí: <a href="%1">%1 </a> + + okButton + + diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index 3ac8eb623..2879dbe3e 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -1923,24 +1923,24 @@ Cliquez ici : <a href="%1">%1</a> MainWindow - newVersionCheckError - Une erreur est survenue. Merci de réessayer plus tard ou de contacter le support. + newVersionCheckError + Une erreur est survenue. Merci de réessayer plus tard ou de contacter le support. - newVersionAvailableInstructions - Pour mettre à jour télécharger l'application et lancer l'installeur. + newVersionAvailableInstructions + Pour mettre à jour télécharger l'application et lancer l'installeur. - downloadUpdate - Télécharger + downloadUpdate + Télécharger - noNewVersionAvailable - Votre application est à jour. + noNewVersionAvailable + Votre application est à jour. - newVersionInstalled - La nouvelle version de l'application a été installée avec succès. + newVersionInstalled + La nouvelle version de l'application a été installée avec succès. mainSearchBarPlaceholder @@ -2003,6 +2003,22 @@ Cliquez ici : <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + Erreur de récupération de la configuration distante. Le lien de configuration a peut-être déjà été utilisé ou a expiré. Merci de contacter un administrateur si ce lien vous a été fourni. + + + newVersionAvailable + Une nouvelle version (%1) est disponible ! + + + cancel + + + + remoteProvisioningWarnAccountOverwrite + Un compte est déjà configuré. Cette action effacera le compte existant. + MainWindowMenuBar @@ -3818,6 +3834,11 @@ Cliquez ici : <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. Restaurer les popups de confirmation + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -4005,6 +4026,29 @@ Cliquez ici : <a href="%1">%1</a> AJOUTER CE CONTACT + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + Voulez-vous dire ? + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + Ajouter au Dictionnaire + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + Ignorer une fois + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + Ignorer tout + + Timeline @@ -5182,24 +5226,9 @@ Cliquez ici : <a href="%1">%1</a> %1 secondes - - - SpellCheckerMenu - spellCheckingMenuDidYouMean - Voulez-vous dire ? - - - spellCheckingMenuAddToDictionary - Ajouter au Dictionnaire - - - spellCheckingMenuIgnoreOnce - Ignorer une fois - - - spellCheckingMenuIgnoreAll - Ignorer tout + okButton + OK diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index c5a7b8bfe..21679dc56 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -1486,7 +1486,6 @@ A kiszolgáló URL-je nincs konfigurálva. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1973,6 +1972,42 @@ Kattintson ide: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + Az utolsó távoli kiépítés nem sikerült + + + newVersionAvailable + Egy új frissítés (%1) érhető el! + + + newVersionAvailableInstructions + + + + cancel + Mégse + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3785,6 +3820,11 @@ Kattintson ide: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3972,6 +4012,29 @@ Kattintson ide: <a href="%1">%1</a> Névjegy hozzáadása + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5142,5 +5205,9 @@ Kattintson ide: <a href="%1">%1</a> + + okButton + Rendben + diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 85c9aa884..d2ed74cc4 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -1497,7 +1497,6 @@ URL del server non configurato. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1984,6 +1983,42 @@ Clicca: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + L'ultima configurazione remota è fallita + + + newVersionAvailable + È disponibile una nuova versione (%1)! + + + newVersionAvailableInstructions + + + + cancel + + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3799,6 +3834,11 @@ Clicca: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3986,6 +4026,29 @@ Clicca: <a href="%1">%1</a> AGGIUNGI UN CONTATTO + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5163,5 +5226,9 @@ Clicca: <a href="%1">%1</a> + + okButton + OK + diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index d328ac793..95ca61732 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -1486,7 +1486,6 @@ remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1973,6 +1972,42 @@ 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + 最後のリモートプロビジョニングに失敗 + + + newVersionAvailable + 新しいバージョン (%1) が利用可能です! + + + newVersionAvailableInstructions + + + + cancel + キャンセル + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3785,6 +3820,11 @@ 'Restore asking popups' : Text button for restoring asking popups. 質問ポップアップの復元 + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3972,6 +4012,29 @@ 連絡先に追加 + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5142,5 +5205,9 @@ %1 秒 + + okButton + OK + diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index fd8dac505..02e996761 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -1508,10 +1508,9 @@ Nesukonfigūruotas serverio url. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. - + lastProvisioningFailed 'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed. @@ -1995,6 +1994,42 @@ Spustelėkite čia: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + + + + newVersionAvailable + Yra prieinama nauja versija (%1)! + + + newVersionAvailableInstructions + + + + cancel + ATSISAKYTI + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3813,6 +3848,11 @@ Spustelėkite čia: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -4000,6 +4040,29 @@ Spustelėkite čia: <a href="%1">%1</a> PRIDĖTI KONTAKTĄ + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5184,5 +5247,9 @@ Spustelėkite čia: <a href="%1">%1</a> + + okButton + + diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index e32dc41d3..0d285739a 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -1497,7 +1497,6 @@ URL do servidor não configurado. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1984,6 +1983,42 @@ Clique aqui: <a href="%1">%1 </a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + O último provisionamento remoto falhou + + + newVersionAvailable + Está disponível uma nova versão (%1)! + + + newVersionAvailableInstructions + + + + cancel + + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3799,6 +3834,11 @@ Clique aqui: <a href="%1">%1 </a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3986,6 +4026,29 @@ Clique aqui: <a href="%1">%1 </a> ADICIONAR CONTATO + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5163,5 +5226,9 @@ Clique aqui: <a href="%1">%1 </a> %1 segundos + + okButton + OK + diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index d82f3df75..128692583 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -1508,7 +1508,6 @@ remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1995,6 +1994,42 @@ 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + Последняя удалённая инициализация не удалась + + + newVersionAvailable + Доступна новая (%1) версия! + + + newVersionAvailableInstructions + + + + cancel + + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3813,6 +3848,11 @@ 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -4000,6 +4040,29 @@ ДОБАВИТЬ КОНТАКТ + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5184,5 +5247,9 @@ %1 секунд + + okButton + ОК + diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 635c7d165..4d740b855 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -1497,7 +1497,6 @@ Serverwebbadressen är inte konfigurerad. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1984,6 +1983,42 @@ Klicka här: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + + + + newVersionAvailable + En ny version (%1) är tillgänglig! + + + newVersionAvailableInstructions + + + + cancel + AVBRYT + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3799,6 +3834,11 @@ Klicka här: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3986,6 +4026,29 @@ Klicka här: <a href="%1">%1</a> LÄGG TILL KONTAKT + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5163,5 +5226,9 @@ Klicka här: <a href="%1">%1</a> + + okButton + + diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index aa8513264..144eada19 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -1486,7 +1486,6 @@ Sunucu url'si yapılandırılmadı. remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1973,6 +1972,42 @@ Buraya tıklayın: <a href="%1">%1</a> 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + Son uzaktan ön hazırlık başarısız + + + newVersionAvailable + Yeni sürüm (%1) var! + + + newVersionAvailableInstructions + + + + cancel + + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3785,6 +3820,11 @@ Buraya tıklayın: <a href="%1">%1</a> 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3972,6 +4012,29 @@ Buraya tıklayın: <a href="%1">%1</a> KİŞİ EKLE + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5142,5 +5205,9 @@ Buraya tıklayın: <a href="%1">%1</a> + + okButton + TAMAM + diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 82ba1b1fd..96f0e2482 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -1994,6 +1994,42 @@ 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + + + + newVersionAvailable + Доступна нова (%1) версія! + + + newVersionAvailableInstructions + + + + cancel + СКАСУВАТИ + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3812,6 +3848,11 @@ 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3999,6 +4040,29 @@ ДОДАТИ КОНТАКТ + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5183,5 +5247,9 @@ + + okButton + + diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index 2e4ea1df0..63f1332ea 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -1486,7 +1486,6 @@ remoteProvisioningWarnAccountOverwrite - 'An account is already provisioned. This action will erase the existing account. : Warn user about it. An account is already provisioned. This action will erase the existing account. : Warn user about it. @@ -1973,6 +1972,42 @@ 'Open meetings' : Tooltip for a button that open the meetings list + + lastProvisioningFailed + + + + newVersionAvailable + 新版本( %1 )可用! + + + newVersionAvailableInstructions + + + + cancel + 取消 + + + downloadUpdate + + + + newVersionCheckError + + + + noNewVersionAvailable + + + + newVersionInstalled + + + + remoteProvisioningWarnAccountOverwrite + An account is already provisioned. This action will erase the existing account. : Warn user about it. + MainWindowMenuBar @@ -3785,6 +3820,11 @@ 'Restore asking popups' : Text button for restoring asking popups. + + spellCheckerLabel + 'Spell Checker' : label for spell checker settings + + SettingsVideo @@ -3972,6 +4012,29 @@ 添加联系人 + + SpellCheckerMenu + + spellCheckingMenuDidYouMean + 'Did you mean ?' : Suggest new words + + + + spellCheckingMenuAddToDictionary + 'Add to dictionary' : Add word to dictionary + + + + spellCheckingMenuIgnoreOnce + 'Ignore Once' : Ignore spell checking only for this occurences + + + + spellCheckingMenuIgnoreAll + 'Ignore All' : Ignore spell checking for all occurences + + + Timeline @@ -5142,5 +5205,9 @@ + + okButton + + diff --git a/linphone-app/src/components/other/spell-checker/SpellChecker.cpp b/linphone-app/src/components/other/spell-checker/SpellChecker.cpp index 37ef2c021..0bbda670d 100644 --- a/linphone-app/src/components/other/spell-checker/SpellChecker.cpp +++ b/linphone-app/src/components/other/spell-checker/SpellChecker.cpp @@ -51,6 +51,7 @@ SpellChecker::SpellChecker(QObject *parent) : QSyntaxHighlighter(parent) { graceTimer = new QTimer(this); graceTimer->setSingleShot(true); connect(graceTimer, SIGNAL(timeout()), SLOT(highlightAfterGracePeriod())); + connect(CoreManager::getInstance()->getSettingsModel(), &SettingsModel::spellCheckerOverrideLocaleChanged, this, &SpellChecker::setLanguage); mAvailable = false; if (CoreManager::getInstance()->getSettingsModel()->getSpellCheckerEnabled()) @@ -59,7 +60,7 @@ SpellChecker::SpellChecker(QObject *parent) : QSyntaxHighlighter(parent) { SpellChecker::~SpellChecker () { graceTimer->stop(); -#ifdef WIN32 +#ifdef _WIN32 if (mNativeSpellChecker != nullptr) mNativeSpellChecker->Release(); #endif @@ -91,7 +92,7 @@ QString SpellChecker::underLine(qreal minLength) { } void SpellChecker::highlightDocument() { - + if(!CoreManager::getInstance()->getSettingsModel()->getSpellCheckerEnabled()) return; if (!fromTimer && QDateTime::currentMSecsSinceEpoch() <= mLastHightlight + GRACE_PERIOD_SECS*1000) { scheduleHighlight(); return; diff --git a/linphone-app/src/components/other/spell-checker/SpellChecker.hpp b/linphone-app/src/components/other/spell-checker/SpellChecker.hpp index e2d7be64c..84d9abdfd 100644 --- a/linphone-app/src/components/other/spell-checker/SpellChecker.hpp +++ b/linphone-app/src/components/other/spell-checker/SpellChecker.hpp @@ -48,7 +48,7 @@ #define LOG_TAG "[SpellChecker]" #define WORD_DELIMITERS_REGEXP "[^\r\n\t\u2028 ]+" -#ifdef WIN32 +#ifdef _WIN32 class ISpellChecker; #endif @@ -57,7 +57,7 @@ class SpellChecker : public QSyntaxHighlighter { public: SpellChecker(QObject* parent = nullptr); ~SpellChecker(); - + // Common static QString currentLanguage() { QString overrideLocale = CoreManager::getInstance()->getSettingsModel()->getSpellCheckerOverrideLocale(); @@ -108,7 +108,7 @@ private: bool wasIgnoredOnce(QString word, int wordStartIndex, int wordEndIndex); void scheduleHighlight(); QString underLine(qreal minLength); -#ifdef WIN32 +#ifdef _WIN32 ISpellChecker* mNativeSpellChecker = nullptr; #endif diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index fc2be1dcb..e9ad82a2e 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -1570,10 +1570,23 @@ QString SettingsModel::getSpellCheckerOverrideLocale() const{ return Utils::coreStringToAppString(mConfig->getString(UiSection, "spell_checker_override_locale", "")); } +void SettingsModel::setSpellCheckerOverrideLocale (const QString &locale) { + CoreManager::getInstance()->getCore()->getConfig()->setString( + SettingsModel::UiSection, "spell_checker_override_locale", Utils::appStringToCoreString(locale) + ); + + emit spellCheckerOverrideLocaleChanged(); +} + bool SettingsModel::getSpellCheckerEnabled() const{ return mConfig->getBool(UiSection, "spell_checker_enabled", true); } +void SettingsModel::setSpellCheckerEnabled(bool enable){ + mConfig->setBool(UiSection, "spell_checker_enabled", enable); + emit spellCheckerEnabledChanged(); +} + // ----------------------------------------------------------------------------- static inline string getLegacySavedCallsFolder (const shared_ptr &config) { diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp index eb0e00bf7..d8db2e500 100644 --- a/linphone-app/src/components/settings/SettingsModel.hpp +++ b/linphone-app/src/components/settings/SettingsModel.hpp @@ -200,6 +200,9 @@ class SettingsModel : public QObject { // UI. ----------------------------------------------------------------------- + Q_PROPERTY(QString spellCheckerOverrideLocale READ getSpellCheckerOverrideLocale WRITE setSpellCheckerOverrideLocale NOTIFY spellCheckerOverrideLocaleChanged) + Q_PROPERTY(bool spellCheckerEnabled READ getSpellCheckerEnabled WRITE setSpellCheckerEnabled NOTIFY spellCheckerEnabledChanged) + Q_PROPERTY(QFont textMessageFont READ getTextMessageFont WRITE setTextMessageFont NOTIFY textMessageFontChanged) Q_PROPERTY(int textMessageFontSize READ getTextMessageFontSize WRITE setTextMessageFontSize NOTIFY textMessageFontSizeChanged) Q_PROPERTY(QFont emojiFont READ getEmojiFont WRITE setEmojiFont NOTIFY emojiFontChanged) @@ -590,7 +593,9 @@ public: void setEmojiFontSize(const int& size); QString getSpellCheckerOverrideLocale() const; + void setSpellCheckerOverrideLocale (const QString &locale); bool getSpellCheckerEnabled() const; + void setSpellCheckerEnabled(bool enable); QString getSavedScreenshotsFolder () const; void setSavedScreenshotsFolder (const QString &folder); @@ -861,6 +866,9 @@ signals: // UI. ----------------------------------------------------------------------- + void spellCheckerOverrideLocaleChanged(); + void spellCheckerEnabledChanged(); + void textMessageFontChanged(const QFont& font); void textMessageFontSizeChanged(const int& size); diff --git a/linphone-app/ui/views/App/Settings/SettingsUi.qml b/linphone-app/ui/views/App/Settings/SettingsUi.qml index 2334fd1c0..c9d35689c 100644 --- a/linphone-app/ui/views/App/Settings/SettingsUi.qml +++ b/linphone-app/ui/views/App/Settings/SettingsUi.qml @@ -55,6 +55,41 @@ TabContainer { } } } + FormLine { + FormGroup { + //: 'Spell Checker' : label for spell checker settings + label: qsTr('spellCheckerLabel') + RowLayout{ + ComboBox { + Layout.fillWidth: true + textRole: 'key' + + Component.onCompleted: { + var locales = Logic.getAvailableLocales() + model = locales + + var locale = SettingsModel.spellCheckerOverrideLocale + if (!locale.length) { + currentIndex = 0 + return + } + + var value = Qt.locale(locale).name + currentIndex = Number(Utils.findIndex(locales, function (locale) { + return locale.value === value + })) + } + + onActivated: SettingsModel.spellCheckerOverrideLocale = model[index].value + } + Switch { + checked: SettingsModel.spellCheckerEnabled + + onClicked: SettingsModel.spellCheckerEnabled = !checked + } + } + } + } Form { //: 'Fonts' : title of fonts section in settings title: qsTr('fontsTitle')