1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-17 00:52:02 +00:00

Internationalize button titles (#34549).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@20743 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2021-02-10 00:49:54 +00:00
parent fb15a9eee4
commit af4c608251

View File

@ -250,10 +250,16 @@ jsToolBar.prototype = {
return b;
},
buttonTitleWithShortcut: function(title, shortcutKey) {
if (isMac) {
return title + " (⌘" + shortcutKey.toUpperCase() + ")";
if(typeof jsToolBar.strings == 'undefined') {
var i18nTitle = title || null;
} else {
return title + " (Ctrl+" + shortcutKey.toUpperCase() + ")";
var i18nTitle = jsToolBar.strings[title] || title || null;
}
if (isMac) {
return i18nTitle + " (⌘" + shortcutKey.toUpperCase() + ")";
} else {
return i18nTitle + " (Ctrl+" + shortcutKey.toUpperCase() + ")";
}
},
space: function(toolName) {