From: Alexander Ebert Date: Tue, 14 Oct 2014 19:36:15 +0000 (+0200) Subject: Fixed button titles for non-core buttons X-Git-Tag: 2.1.0_Alpha_1~228 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4241648b656263a564fd96c412a5a157f76c2345;p=GitHub%2FWoltLab%2FWCF.git Fixed button titles for non-core buttons --- diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index 1281dd3d01..5375c3d4c7 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -9,8 +9,11 @@ $(function() { WCF.Language.addObject({ 'wcf.attachment.dragAndDrop.dropHere': '{lang}wcf.attachment.dragAndDrop.dropHere{/lang}', 'wcf.attachment.dragAndDrop.dropNow': '{lang}wcf.attachment.dragAndDrop.dropNow{/lang}', + 'wcf.bbcode.button.fontColor': '{lang}wcf.bbcode.button.fontColor{/lang}', 'wcf.bbcode.button.fontFamily': '{lang}wcf.bbcode.button.fontFamily{/lang}', 'wcf.bbcode.button.fontSize': '{lang}wcf.bbcode.button.fontSize{/lang}', + 'wcf.bbcode.button.subscript': '{lang}wcf.bbcode.button.subscript{/lang}', + 'wcf.bbcode.button.superscript': '{lang}wcf.bbcode.button.superscript{/lang}', 'wcf.bbcode.quote.edit': '{lang}wcf.bbcode.quote.edit{/lang}', 'wcf.bbcode.quote.edit.author': '{lang}wcf.bbcode.quote.edit.author{/lang}', 'wcf.bbcode.quote.edit.link': '{lang}wcf.bbcode.quote.edit.link{/lang}', diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js index 15f8a98389..d15d772d58 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js @@ -47,6 +47,14 @@ RedactorPlugins.wbutton = function() { 'table': 'fa-table' }; + var $buttonTitles = { + 'fontcolor': WCF.Language.get('wcf.bbcode.button.fontColor'), + 'fontfamily': WCF.Language.get('wcf.bbcode.button.fontFamily'), + 'fontsize': WCF.Language.get('wcf.bbcode.button.fontSize'), + 'subscript': WCF.Language.get('wcf.bbcode.button.subscript'), + 'superscript': WCF.Language.get('wcf.bbcode.button.superscript') + }; + var $buttons = this.wutil.getOption('buttons'); var $lastButton = ''; for (var $i = 0, $length = $buttons.length; $i < $length; $i++) { @@ -65,7 +73,7 @@ RedactorPlugins.wbutton = function() { } } else { - this.wbutton._addCoreButton($button, ($faIcons[$button] ? $faIcons[$button] : null), $lastButton); + this.wbutton._addCoreButton($button, ($buttonTitles[$button] ? $buttonTitles[$button] : null), ($faIcons[$button] ? $faIcons[$button] : null), $lastButton); } $lastButton = $button; @@ -75,8 +83,8 @@ RedactorPlugins.wbutton = function() { this.button.addCallback(this.button.get('image'), $.proxy(this.wbutton.insertImage, this)); }, - _addCoreButton: function(buttonName, faIcon, insertAfter) { - var $buttonObj = { title: buttonName }; + _addCoreButton: function(buttonName, buttonTitle, faIcon, insertAfter) { + var $buttonObj = { title: (buttonTitle === null ? buttonName : buttonTitle) }; if (buttonName === 'subscript' || buttonName === 'superscript') { $buttonObj.command = buttonName; } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 1c000e04eb..ec0339cd84 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1738,12 +1738,15 @@ Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getFormattedAllowedExt + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index f63a4e5837..a9601ba75a 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1736,12 +1736,15 @@ Allowed extensions: {', '|implode:$attachmentHandler->getFormattedAllowedExtensi + + +