The example in the "help" section of the toolbar uses the canonical "thumb" in the example. Since the localized value now is available, it should be used there, too.
Version: unspecified
Severity: enhancement
The example in the "help" section of the toolbar uses the canonical "thumb" in the example. Since the localized value now is available, it should be used there, too.
Version: unspecified
Severity: enhancement
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Toolbar help: Make magic word from help string a param | mediawiki/extensions/WikiEditor | master | +3 -3 |
No, since "thumb" must be localized in the wiki's language, while the help text is in the user's language. This is the same as for the namespace, this too is localized in the wiki's language.
Namespaces in JS are exposed trough wgFormattedNamespaces, but most parts of the localized wiki syntax is not exposed in any way whatsoever and this includes things like the 'thumb' param.
To do so would probably require a new ResourceLoader module specifically for this, as we also have a specific mediawiki.language.months module.
The localization for thumb is already available:
mw.config.get('wgWikiEditorMagicWords').img_thumbnail
Change 178180 had a related patch set uploaded (by TheDJ):
Toolbar help: Make magic word from help string a param
https://gerrit.wikimedia.org/r/178180
Change 178180 merged by jenkins-bot:
Toolbar help: Make magic word from help string a param
https://gerrit.wikimedia.org/r/178180
Checked in betalabs:
English: <span>[[File:Example.png|thumb|Caption text]]</span>
German: <span>[[Datei:Beispiel.png|miniatur|Beschreibung]]</span>