Verified Commit a3e6fd43 authored by Xuetian Weng's avatar Xuetian Weng
Browse files

Make action label string with & for explicit accelerator.

Due to explicitly using Kirigami.MnemonicData in ActionListItem, the
i18n string should explicitly set the accelerator. Otherwise it won't
work propertly for locale like CJK.

For example, &Settings should be translated to 设置(&S) to ensure
accelerator is preserved. Without explicit accelerator translator won't
know it can be accessed with accelerator.
parent b35b0128
......@@ -49,7 +49,7 @@ Kirigami.ApplicationWindow
TopLevelPageData {
id: featuredAction
iconName: "go-home"
text: i18n("Home")
text: i18n("&Home")
enabled: !window.wideScreen
component: topBrowsingComp
objectName: "discover"
......@@ -60,7 +60,7 @@ Kirigami.ApplicationWindow
visible: enabled
enabled: !window.wideScreen
iconName: "search"
text: i18n("Search")
text: i18n("&Search")
component: topSearchComp
objectName: "discover"
shortcut: "Ctrl+F"
......@@ -68,28 +68,28 @@ Kirigami.ApplicationWindow
TopLevelPageData {
id: installedAction
iconName: "view-list-details"
text: i18n("Installed")
text: i18n("&Installed")
component: topInstalledComp
objectName: "installed"
TopLevelPageData {
id: updateAction
iconName: ResourcesModel.updatesCount>0 ? ResourcesModel.hasSecurityUpdates ? "update-high" : "update-low" : "update-none"
text: ResourcesModel.updatesCount<=0 ? (ResourcesModel.isFetching ? i18n("Fetching updates...") : i18n("Up to date") ) : i18nc("Update section name", "Update (%1)", ResourcesModel.updatesCount)
text: ResourcesModel.updatesCount<=0 ? (ResourcesModel.isFetching ? i18n("Fetching &updates...") : i18n("&Up to date") ) : i18nc("Update section name", "&Update (%1)", ResourcesModel.updatesCount)
component: topUpdateComp
objectName: "update"
TopLevelPageData {
id: aboutAction
iconName: "help-feedback"
text: i18n("About")
text: i18n("&About")
component: topAboutComp
objectName: "about"
TopLevelPageData {
id: sourcesAction
iconName: "configure"
text: i18n("Settings")
text: i18n("S&ettings")
component: topSourcesComp
objectName: "sources"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment