From 3e04196b79e8249d6dc23edbeed69721c50eb1e0 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Mon, 8 Dec 2014 12:20:46 +0100 Subject: [PATCH] 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 --- i18n/en.json | 2 +- i18n/qqq.json | 2 +- modules/jquery.wikiEditor.toolbar.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index 221bde59..56cf9ed5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -206,7 +206,7 @@ "wikieditor-toolbar-help-content-olist-syntax": "# List item
# List item", "wikieditor-toolbar-help-content-olist-result": "
  1. List item
  2. List item
", "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": "
Caption text
", "wikieditor-toolbar-help-content-reference-description": "Reference", "wikieditor-toolbar-help-content-reference-syntax": "Page text.<ref name=\"test\">[http://www.example.org Link text], additional text.</ref>", diff --git a/i18n/qqq.json b/i18n/qqq.json index bb4beece..e9cd8e29 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 name=\"test\" 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 17a219af..ba3a75a4 100644 --- a/modules/jquery.wikiEditor.toolbar.config.js +++ b/modules/jquery.wikiEditor.toolbar.config.js @@ -1369,7 +1369,7 @@ getDefaultConfig: function () { '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' ) ] } } ]