diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index b76965b8b..f9a330464 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -1679,6 +1679,37 @@ Klik her: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + Om %1 + + + Preferences... + Indstillinger + + + Services + Tjenester + + + Hide %1 + Skjul %1 + + + Hide Others + Skjul andre + + + Show All + Vis alle + + + Quit %1 + Afslut %1 + + MainWindow diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index 8102592ad..b9b8c6a23 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -1679,6 +1679,37 @@ Klicken Sie hier: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + Über %1 + + + Preferences... + Einstellungen + + + Services + Dienste + + + Hide %1 + %1 ausblenden + + + Hide Others + Andere Ausblenden + + + Show All + Alle Einblenden + + + Quit %1 + %1 beenden + + MainWindow diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index 5b0f16ced..15a8f91f6 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -1679,6 +1679,37 @@ Click here: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + About %1 + + + Preferences... + Preferences + + + Services + Services + + + Hide %1 + Hide %1 + + + Hide Others + Hide Others + + + Show All + Show All + + + Quit %1 + Quit %1 + + MainWindow diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index f3a543a26..5bb94af49 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -1679,6 +1679,37 @@ Haga clic aquí: <a href="%1">%1 </a> + + MAC_APPLICATION_MENU + + About %1 + Acerca De %1 + + + Preferences... + Preferencias + + + Services + Servicios + + + Hide %1 + Ocultar %1 + + + Hide Others + Ocultar Otros + + + Show All + Mostrar Todo + + + Quit %1 + Salir de %1 + + MainWindow diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index 9753a7634..349bd8c2f 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -1679,6 +1679,37 @@ Cliquez ici : <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + À propos de %1 + + + Preferences... + Préférences + + + Services + Services + + + Hide %1 + Masquer %1 + + + Hide Others + Masquer les autres + + + Show All + Tout afficher + + + Quit %1 + Quitter %1 + + MainWindow diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 95f5d769d..3df0e22c0 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -1669,6 +1669,37 @@ Kattintson ide: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + A %1 névjegye + + + Preferences... + Beállítások + + + Services + Szolgáltatások + + + Hide %1 + A %1 Elrejtése + + + Hide Others + A több Elrejtése + + + Show All + Mindet Mutat + + + Quit %1 + Kilépés %1 + + MainWindow diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index e2500506b..203a2e411 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -1679,6 +1679,37 @@ Clicca: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + Informazioni su %1 + + + Preferences... + Preferenze + + + Services + Servizi + + + Hide %1 + Nascondi %1 + + + Hide Others + Nascondi Altre + + + Show All + Mostra Tutte + + + Quit %1 + Esci da %1 + + MainWindow diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 26588c8ca..9b57f1f13 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -1669,6 +1669,37 @@ + + MAC_APPLICATION_MENU + + About %1 + %1 バージョン情報 + + + Preferences... + 設定 + + + Services + サービス + + + Hide %1 + %1 を隠す + + + Hide Others + 他の人を隠す + + + Show All + すべて表示する + + + Quit %1 + %1 を終了 + + MainWindow diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index ce51bd3e9..977bd6910 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -1689,6 +1689,37 @@ Spustelėkite čia: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + + + + Preferences... + + + + Services + + + + Hide %1 + + + + Hide Others + + + + Show All + + + + Quit %1 + + + MainWindow diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index 3c3ad948c..a4012b78e 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -1679,6 +1679,37 @@ Clique aqui: <a href="%1">%1 </a> + + MAC_APPLICATION_MENU + + About %1 + Sobre o %1 + + + Preferences... + Preferências + + + Services + Serviços + + + Hide %1 + Ocultar o %1 + + + Hide Others + Ocultar Outros + + + Show All + Mostrar Tudo + + + Quit %1 + Encerrar %1 + + MainWindow diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index 7aca69290..ae9a04f34 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -1689,6 +1689,37 @@ + + MAC_APPLICATION_MENU + + About %1 + О %1 + + + Preferences... + настройки + + + Services + + + + Hide %1 + Скрывать %1 + + + Hide Others + Скрыть другие + + + Show All + Показать все + + + Quit %1 + Выйти из %1 + + MainWindow diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 96db9cf76..f67766c17 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -1679,6 +1679,37 @@ Klicka här: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + Om %1 + + + Preferences... + Inställningar + + + Services + Tjänster + + + Hide %1 + Göm %1 + + + Hide Others + Göm Övriga + + + Show All + Visa Alla + + + Quit %1 + Avsluta %1 + + MainWindow diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 4f87c08fe..70e628278 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -1669,6 +1669,37 @@ Buraya tıklayın: <a href="%1">%1</a> + + MAC_APPLICATION_MENU + + About %1 + %1 Hakkında + + + Preferences... + Tercihler + + + Services + Servisler + + + Hide %1 + %1 uygulamas gizle + + + Hide Others + Diğerlerini gizle + + + Show All + Tümünü göster + + + Quit %1 + %1 Uygulamadan Çık + + MainWindow diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 95e95e695..f1672a6f6 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -1689,6 +1689,37 @@ + + MAC_APPLICATION_MENU + + About %1 + Про %1 + + + Preferences... + Налаштування + + + Services + Послуги + + + Hide %1 + Приховати %1 + + + Hide Others + Приховати інші + + + Show All + показати все + + + Quit %1 + Вийти %1 + + MainWindow diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index a986aaada..7acc7faee 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -1669,6 +1669,37 @@ + + MAC_APPLICATION_MENU + + About %1 + %1 关于 + + + Preferences... + + + + Services + + + + Hide %1 + + + + Hide Others + + + + Show All + + + + Quit %1 + %1 退出 + + MainWindow diff --git a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp index 45da5437a..21bb3f7ed 100644 --- a/linphone-app/src/app/App.cpp +++ b/linphone-app/src/app/App.cpp @@ -144,7 +144,10 @@ static inline bool autoStartEnabled () { // ----------------------------------------------------------------------------- static inline bool installLocale (App &app, QTranslator &translator, const QLocale &locale) { - return translator.load(locale, Constants::LanguagePath) && app.installTranslator(&translator); + bool ok = translator.load(locale, Constants::LanguagePath) && app.installTranslator(&translator); + if(ok) + QLocale::setDefault(locale); + return ok; } static inline string getConfigPathIfExists (const QCommandLineParser &parser) { diff --git a/linphone-app/src/app/translator/DefaultTranslator.hpp b/linphone-app/src/app/translator/DefaultTranslator.hpp index 2d8b1262a..10924e8db 100644 --- a/linphone-app/src/app/translator/DefaultTranslator.hpp +++ b/linphone-app/src/app/translator/DefaultTranslator.hpp @@ -41,4 +41,23 @@ private: QSet mContexts; }; +// Workaround for bad Application Menu translation on Mac: +// Overwrite Qt source by our translations : +//static const char *application_menu_strings[] = +//{ +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1"), +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."), +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"), +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"), +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"), +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All"), +// QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1") +//}; + +class MAC_APPLICATION_MENU : public QObject{ + QString forcedTranslation(){ + return tr("About %1") + tr("Preferences...") + tr("Services") + tr("Hide %1") + tr("Hide Others") + tr("Show All") + tr("Quit %1"); + } +}; + #endif // DEFAULT_TRANSLATOR_H_ diff --git a/linphone-app/ui/views/App/Main/MainWindowTopMenuBar.qml b/linphone-app/ui/views/App/Main/MainWindowTopMenuBar.qml index d97b6950b..34a6ddee2 100644 --- a/linphone-app/ui/views/App/Main/MainWindowTopMenuBar.qml +++ b/linphone-app/ui/views/App/Main/MainWindowTopMenuBar.qml @@ -1,5 +1,4 @@ import QtQuick 2.7 -import QtQuick.Controls 2.3 import Qt.labs.platform 1.0 import Linphone 1.0 @@ -14,17 +13,18 @@ MenuBar { // --------------------------------------------------------------------------- // Menu. // --------------------------------------------------------------------------- - + // Menu { id: menu title: qsTr('settings') MenuItem { text: qsTr('settings') - role: MenuItem.ApplicationSpecificRole //PreferencesRole doesn't seems to work with Qt 5.15.2 + role: MenuItem.PreferencesRole onTriggered: App.smartShowWindow(App.getSettingsWindow()) shortcut: StandardKey.Preferences } + MenuItem { //: 'Check for updates' : Item menu for checking updates @@ -35,7 +35,7 @@ MenuBar { MenuItem { text: qsTr('about') - + role: MenuItem.AboutRole onTriggered: { window.detachVirtualWindow() window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/About.qml')) @@ -45,9 +45,10 @@ MenuBar { MenuItem { text: qsTr('quit') - + role: MenuItem.QuitRole onTriggered: Qt.quit() shortcut: StandardKey.Quit + } } }