Jump to content

Topic on Module talk:Template translation

Amire80 (talkcontribs)

I've removed this from {{delete}} and {{MediaWiki Sites}} and I re-marked them for translation. Looks like they still work, and the translated versions of translatable pages that transclude them looks correctly after purging.

Am I missing anything?

Or can it really be removed from any template that is marked for translation and uses translation-aware transclusion?

Pppery (talkcontribs)

Some templates use this to render using the interface language rather than the page language. {{delete}} previously did that prior to your edit. But otherwise that principle is correct.

Amire80 (talkcontribs)

I think that I tested it and the Delete template didn't do it with the interface language, although I might be wrong. Do any other templates do it?

Pppery (talkcontribs)
Tacsipacsi (talkcontribs)

For translation-aware transclusion to work, two things are needed:

  • Obviously, the template needs to use the Translate extension (and needs to have already been marked for translation – pages that have been prepared but not yet marked for translation don’t have translation-aware transclusion).
  • The desired outcome needs to be that the template is transcluded in the page content language.
    • No usage of interface language.
    • No |lang= parameter to allow overriding the language.
    • The page content language needs to be properly set. Translate does this if the transcluding page uses Translate, but e.g. Sites using MediaWiki/hu doesn’t – and shouldn’t – use Translate, and its page content language is left at the default of English.

I’d love to see this module being used as little as possible, but I don’t think completely getting rid of it is possible (even in the longer term), due to pages like MediaWiki (interface language transclusion) or Sites using MediaWiki/hu (non-Extension:Translate language subpages).

Amire80 (talkcontribs)

@Tacsipacsi, thanks for the detailed response, and for reverting my wrong edit there. I agree with everything.

Reply to "Can it be removed?"