diff options
author | Go MAEDA <maeda@farend.jp> | 2021-02-10 00:49:54 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-02-10 00:49:54 +0000 |
commit | af4c60825180c732e3110489750649f0017f1dc0 (patch) | |
tree | 3658633552ec8c8a87582e92cfdf1223b8788a52 /public | |
parent | fb15a9eee4e76d0efb267078d2336ac693dcfd67 (diff) | |
download | redmine-af4c60825180c732e3110489750649f0017f1dc0.tar.gz redmine-af4c60825180c732e3110489750649f0017f1dc0.zip |
Internationalize button titles (#34549).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@20743 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/jstoolbar/jstoolbar.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/public/javascripts/jstoolbar/jstoolbar.js b/public/javascripts/jstoolbar/jstoolbar.js index ed6605965..532f9f8c9 100644 --- a/public/javascripts/jstoolbar/jstoolbar.js +++ b/public/javascripts/jstoolbar/jstoolbar.js @@ -250,10 +250,16 @@ jsToolBar.prototype = { return b; }, buttonTitleWithShortcut: function(title, shortcutKey) { + if(typeof jsToolBar.strings == 'undefined') { + var i18nTitle = title || null; + } else { + var i18nTitle = jsToolBar.strings[title] || title || null; + } + if (isMac) { - return title + " (⌘" + shortcutKey.toUpperCase() + ")"; + return i18nTitle + " (⌘" + shortcutKey.toUpperCase() + ")"; } else { - return title + " (Ctrl+" + shortcutKey.toUpperCase() + ")"; + return i18nTitle + " (Ctrl+" + shortcutKey.toUpperCase() + ")"; } }, space: function(toolName) { |