Author: pr4tiklahoti
Description:
{{translate}} needs to be added as a magic word for it to be used by Special:PagePreparation, a tool for preparing the page for translation.
Version: unspecified
Severity: normal
Author: pr4tiklahoti
Description:
{{translate}} needs to be added as a magic word for it to be used by Special:PagePreparation, a tool for preparing the page for translation.
Version: unspecified
Severity: normal
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Feature | None | T48645 Tools for mass migration of legacy translated wiki content | ||
| Invalid | Feature | None | T67740 Special page for migration of legacy translation pages (tracking) | ||
| Resolved | Nikerabbit | T68880 [PagePreparation] Categories should be a part of page template and tagged with {{#translation}} | |||
| Resolved | None | T70385 Add {{#translation}} as parser function in the Translate extension |
Cc the creator of [[mw:Template:Translation]], Happy-melon, and some others, in case they want to specify some requirements for such a magic word.
Change 148759 had a related patch set uploaded by BPositive:
'translation' added as magic word in Translate extension
Niklas veto'ed any {{translation}} magic word for fear of incompatibility with existing templates, so it's useless to discuss about it. For now making a non-standard magic word prefixed by # is easiest.
As compatibility with existing wikitext is no longer an aim, should we also change the syntax from [[Category:A{{translation}}|B]] to {{#translation:Category:A|B}} (in a followup patch)?
The {{#translation}} parser function could also be used to transclude translatable templates in the future: is this in scope for Translate, Niklas? If the answer is yes, BPositive, please file a separate bug for that.
Change 148759 merged by jenkins-bot:
'#translation' added as magic word in Translate extension
(In reply to Nemo from comment #4)
As compatibility with existing wikitext is no longer an aim, should we also
change the syntax from [[Category:A{{translation}}|B]] to
{{#translation:Category:A|B}} (in a followup patch)?
Not a very good idea. In my opinion, '#translation' should not be generate wikilinks, only pagename in plain text.
Instead [[Category:A{{translation}}|B]] should be approximately next code: [[{{#translation:Category:A}}|B]]. By common way, pipe ("|") is traditionally used as delimanation simbol for parser functions; it may still be needed in this case.
Niklas, maybe update this feature, to make it work not only for currrent page, as {{#translation:}} (current state) - but also for specified target page, as {{#translation:pagename}} or {{#translation:namespace:pagename}} ?
This will be useful for eliminate widely used templates {{ifTranslation}}/{{ifNotTranslation}}, {{TNT}}/{{TNTN}} and {{Ll}}.
(In addition to comment #7)
Taret result for my proposal:
(In addition to comment #7 and comment #8)
maybe this should be separate magic word, as '#tlink' or '#tl'?
(In reply to Paul Kaganer from comment #8)
- if current page is translation, and {{#translation:}} is returned
"/code", then {{#translation:pagename}} should be return "pagename/code" (if
this page is exist) or "pagename" otherwise;
- if current page is _not_ a translation, and {{#translation:}} is returned
empty result, {{#translation:pagename}} should be return "pagename"
This sounds reasonable to me, and hopefully not too hard to implement (especially if reusing some Special:MyLanguage code to find the appropriate target subpage). Are you able to submit a patch (I don't think Pratik will have time during GSoC).
(In reply to Nemo from comment #10)
Are you able to submit a patch (I don't think Pratik will
have time during GSoC).
No, I do not have such skills. Let's wait for someone who can do it :(
1.24 was branched, let's have a closed bug against 1.24 for bugzilla searchers.
(In reply to Nemo from comment #10)
(In reply to Paul Kaganer from comment #8)
- if current page is translation, and {{#translation:}} is returned
"/code", then {{#translation:pagename}} should be return "pagename/code" (if
this page is exist) or "pagename" otherwise;
- if current page is _not_ a translation, and {{#translation:}} is returned
empty result, {{#translation:pagename}} should be return "pagename"
This sounds reasonable to me, and hopefully not too hard to implement
(especially if reusing some Special:MyLanguage code to find the appropriate
target subpage). Are you able to submit a patch (I don't think Pratik will
have time during GSoC).
Kaganer, can you file these as a separate bug?
Base noted that the feature had not been documented. I've corrected the manual where it said that there is no support for this feature: https://www.mediawiki.org/w/index.php?title=Help:Extension:Translate/Page_translation_administration&diff=prev&oldid=1779724