summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-18 09:25:38 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-18 11:32:25 (GMT)
commitf3f979cbd37f47892cd0c0a9fc23b802ed6f7890 (patch)
tree40b4f9f6c38cd47e90b0e0355467a2c28583e2c7 /src/gui/kernel
parentf3ea09192a6f17d2f2b607272eb5ad2ba47536e5 (diff)
downloadQt-f3f979cbd37f47892cd0c0a9fc23b802ed6f7890.zip
Qt-f3f979cbd37f47892cd0c0a9fc23b802ed6f7890.tar.gz
Qt-f3f979cbd37f47892cd0c0a9fc23b802ed6f7890.tar.bz2
Incorrect translation for Application menu items in Mac.
A behavior change was introduced by the commit 97b8727635a73197fac4f5edb8a1122733933db4. The menu items with menuRoles will now be translated like Native Mac applications. Translations/merging of menu items are done as follows: 1) AboutRole ==> "About <Application>" 2) PreferencesRole ==> "Preferences..." 3) QuitRole ==> "Quit <Application>" Task-number: QTBUG-4463 Reviewed-by: mortens
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp7
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index fea8c37..a2666f7 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2309,12 +2309,14 @@ static bool qt_detectRTLLanguage()
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
}
-#if defined(QT_MAC_USE_COCOA)
static const char *application_menu_strings[] = {
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","Show All"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1")
};
QString qt_mac_applicationmenu_string(int type)
{
@@ -2322,7 +2324,6 @@ QString qt_mac_applicationmenu_string(int type)
application_menu_strings[type]);
}
#endif
-#endif
/*!\reimp
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm
index 35d156a..b58fd7c 100644
--- a/src/gui/kernel/qcocoamenuloader_mac.mm
+++ b/src/gui/kernel/qcocoamenuloader_mac.mm
@@ -231,6 +231,9 @@ QT_USE_NAMESPACE
[hideItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(1).arg(qAppName()))];
[hideAllOthersItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(2))];
[showAllItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(3))];
+ [preferencesItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(4))];
+ [quitItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(5).arg(qAppName()))];
+ [aboutItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(6).arg(qAppName()))];
#endif
}