From f473a2bc36eaccf7c9b5499fa81d17cae1496e03 Mon Sep 17 00:00:00 2001 From: Paladox Date: Sun, 13 Dec 2015 21:05:21 +0000 Subject: [PATCH] Allow the signature wikitext to be overridden locally Bug: T26191 Depends-On: I33de58e9729a51ae73a13853ffcfcbb2d2305111 Change-Id: I43f5bbaee007bbd038f2e118b3ffb8690753afb8 --- WikiEditor.hooks.php | 2 ++ modules/jquery.wikiEditor.toolbar.config.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WikiEditor.hooks.php b/WikiEditor.hooks.php index b9c46602..6673d58c 100644 --- a/WikiEditor.hooks.php +++ b/WikiEditor.hooks.php @@ -312,6 +312,8 @@ class WikiEditorHooks { // expose magic words for use by the wikieditor toolbar WikiEditorHooks::getMagicWords( $vars ); + $vars['mw.msg.wikieditor'] = wfMessage( 'sig-text', '~~~~' )->inContentLanguage()->text(); + return true; } diff --git a/modules/jquery.wikiEditor.toolbar.config.js b/modules/jquery.wikiEditor.toolbar.config.js index d42f86eb..933402ce 100644 --- a/modules/jquery.wikiEditor.toolbar.config.js +++ b/modules/jquery.wikiEditor.toolbar.config.js @@ -195,7 +195,7 @@ $.wikiEditor.modules.toolbar.config = { action: { type: 'encapsulate', options: { - pre: '--~~~~' + pre: mw.config.get( 'mw.msg.wikieditor' ) } } }