Module talk:Template translation
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
problem: language subpage is not created after its items have been translated
editRESOLVED | |
- palliative solution is ok ; thanks all. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
French translations have been done for this page but corresponding page "Module:Template_translation/doc/fr" has not been created neither appear in the list of languages (always only 3 remain)
Christian 🇫🇷 FR (talk) 09:45, 1 July 2021 (UTC)
- This is already tracked in T258756. — ExE Boss (talk) 00:06, 2 July 2021 (UTC)
- I've applied a workaround to get the translations to show up. * Pppery * it has begun 00:16, 2 July 2021 (UTC)
Translatable template name not working
editI'm trying to use TNTN to include a translatable template in another template here: https://wiki.documentfoundation.org/Template:Documentation/Calc_Functions/COUP_Functions_Arguments
MW version is 1.39.
I also tried this in a MW docker locally and while Scribunto itself works, I can't get the module to work. In my docker, it returns
{{ {{#if:|{{{template}}}|Documentation/Calc_Functions/FinancialFunction_Basis}} }} Buovjaga (talk) 09:11, 27 February 2023 (UTC)
- 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. Tacsipacsi (talk) 23:05, 27 February 2023 (UTC) - 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. Buovjaga (talk) 06:38, 28 February 2023 (UTC)
- 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. Tacsipacsi (talk) 22:07, 1 March 2023 (UTC)
Can it be removed?
editI'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? Amir E. Aharoni {{🌎🌍🌏}} 01:44, 10 April 2024 (UTC)
- 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. * Pppery * it has begun 03:32, 10 April 2024 (UTC)
- 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? Amir E. Aharoni {{🌎🌍🌏}} 10:38, 10 April 2024 (UTC)
- Probably because translation-aware transclusion was already enabled, preventing the hack from running. And there are plenty of pages using the interface language * Pppery * it has begun 14:30, 10 April 2024 (UTC)
- 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). Tacsipacsi (talk) 19:40, 10 April 2024 (UTC)
- @Tacsipacsi, thanks for the detailed response, and for reverting my wrong edit there. I agree with everything. Amir E. Aharoni {{🌎🌍🌏}} 19:49, 10 April 2024 (UTC)