jenkins-bot has submitted this change and it was merged.

Change subject: Toolbar help: Make magic word from help string a param
......................................................................


Toolbar help: Make magic word from help string a param

Instead of having this magic word in the translation message, make it a
parameter of the translation message and retrieve it from
wgWikiEditorMagicWords.

Bug: T40831
Change-Id: Id3155221aa61bc86da2d90000dedab36cbe9dd96
---
M i18n/en.json
M i18n/qqq.json
M modules/jquery.wikiEditor.toolbar.config.js
3 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  GOIII: Looks good to me, but someone else must approve
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index 221bde5..56cf9ed 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -206,7 +206,7 @@
     "wikieditor-toolbar-help-content-olist-syntax": "# List item<br /># List 
item",
     "wikieditor-toolbar-help-content-olist-result": "<ol><li>List 
item</li><li>List item</li></ol>",
     "wikieditor-toolbar-help-content-file-description": "Embedded file",
-    "wikieditor-toolbar-help-content-file-syntax": 
"[[$1:Example.png|thumb|Caption text]]",
+    "wikieditor-toolbar-help-content-file-syntax": 
"[[$1:Example.png|$2|Caption text]]",
     "wikieditor-toolbar-help-content-file-result": "<div style='width:104px;' 
class='thumbinner'><a title='Caption text' class='image' href='#'><img 
height='50' width='100' border='0' class='thumbimage' 
src='$2/WikiEditor/modules/images/toolbar/example-image.png' alt=''/></a><div 
class='thumbcaption'><div class='magnify'><a title='Enlarge' class='internal' 
href='#'><img height='11' width='15' alt='' 
src='$1/common/images/magnify-clip.png'/></a></div>Caption text</div></div>",
     "wikieditor-toolbar-help-content-reference-description": "Reference",
     "wikieditor-toolbar-help-content-reference-syntax": "Page text.&lt;ref 
name=\"test\"&gt;[http://www.example.org Link text], additional 
text.&lt;/ref&gt;",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bb4beec..e9cd8e2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -174,7 +174,7 @@
        "wikieditor-toolbar-help-content-ulist-description": 
"{{Identical|Bulleted list}}",
        "wikieditor-toolbar-help-content-olist-description": 
"{{Identical|Numbered list}}",
        "wikieditor-toolbar-help-content-file-description": 
"{{Identical|Embedded file}}",
-       "wikieditor-toolbar-help-content-file-syntax": 
"{{doc-important|''thumb'' is a magic word. Leave it 
untranslated!}}\nParameters:\n* $1 - \"File\" namespace name",
+       "wikieditor-toolbar-help-content-file-syntax": "Parameters:\n* $1 - 
\"File\" namespace name\n $2 - the image syntax parameter for a thumbnail",
        "wikieditor-toolbar-help-content-file-result": "{{doc-important|Do not 
translate anything except \"Caption text\" (twice) and \"Enlarge\" (to 
\"{{int:thumbnail-more}}\").}}\nParameters:\n* $1 - style path. e.g. 
\"/w/skins\"\n* $2 - extension assets path. e.g. \"/w/extensions\"",
        "wikieditor-toolbar-help-content-reference-description": 
"{{Identical|Reference}}",
        "wikieditor-toolbar-help-content-reference-syntax": "I suggest leaving 
the <code>name=\"test\"</code> string in English\n\nwww.example.org is not a 
real website, but it has been reserved to use in software documentation. If you 
translate the word example and try to go to that web address then you might get 
a message that it doesn't exist. But somebody may have created a commercial web 
page for that address, such as www.Beispiel.org, using the German word for 
example. It is therefore recommended that you do not translate 
http://www.example.org at all. If you do wish to translate it you should first 
check where the translated link takes you.",
diff --git a/modules/jquery.wikiEditor.toolbar.config.js 
b/modules/jquery.wikiEditor.toolbar.config.js
index 17a219a..ba3a75a 100644
--- a/modules/jquery.wikiEditor.toolbar.config.js
+++ b/modules/jquery.wikiEditor.toolbar.config.js
@@ -1369,7 +1369,7 @@
                                        'rows': [
                                                {
                                                        'description': { 
'htmlMsg': 'wikieditor-toolbar-help-content-file-description' },
-                                                       'syntax': { 'htmlMsg': 
[ 'wikieditor-toolbar-help-content-file-syntax', fileNamespace ] },
+                                                       'syntax': { 'htmlMsg': 
[ 'wikieditor-toolbar-help-content-file-syntax', fileNamespace, mw.config.get( 
'wgWikiEditorMagicWords' ).img_thumbnail ] },
                                                        'result': { 'htmlMsg': 
[ 'wikieditor-toolbar-help-content-file-result', mw.config.get( 'stylepath' ), 
mw.config.get( 'wgExtensionAssetsPath' ) ] }
                                                }
                                        ]

-- 
To view, visit https://gerrit.wikimedia.org/r/178180
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3155221aa61bc86da2d90000dedab36cbe9dd96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: GOIII <george.orwell....@outlook.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to