Module talk:Template translation/Flow

About this board

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?"

Translatable template name not working

4
Buovjaga (talkcontribs)
Tacsipacsi (talkcontribs)

I see no issue on wiki.documentfoundation.org except that there’s no output because you (accidentally?) put the whole template in <noinclude>. However, I see no reason to use this legacy template there in the first place – you could just take advantage of translation-aware transclusion, and simply write {{Documentation/Calc Functions/FinancialFunction Basis}}, which automatically transcludes the template in the right language.

Buovjaga (talkcontribs)

Thanks a lot, that was indeed a costly mistake.

In my tests the transclusion was not working as expected, so I thought I need to use that module. Now I see everything is working, though. The waste of time is unfortunate, but I'm happy it works now.

Tacsipacsi (talkcontribs)

Actually translation-aware transclusion looks pretty broken until the page is actually marked for translation, so it’s not your fault, but rather a software limitation. Anyways, you’re welcome.

Reply to "Translatable template name not working"

problem: language subpage is not created after its items have been translated

3
Summary last edited by Wladek92 07:27, 2 July 2021 3 years ago

- palliative solution is ok ; thanks all.

Wladek92 (talkcontribs)
ExE Boss (talkcontribs)

This is already tracked in T258756.

Pppery (talkcontribs)

I've applied a workaround to get the translations to show up.

There are no older topics
Return to "Template translation/Flow" page.