Template talk:Tunit
Add topicSensible cases
[edit]Hi all, useful and I just begin to use it. I see 2 sensible cases:
1. to use <!--T:XXX--> you have to know XXX. If XXX is a new translation unit you dont know the value in advance and have to correct it in a second pass later (after the page will be set 'to be translated'). A workaround would be to use a name and to refer it later, someting like <translate name="bool">Boolean</translate> and then to use the name as XXXX in Tunit.
2. during the life of the page, there is no guarantee that the XXX will last. If this unit disappears what becomes with the remaining references using it ?
Any comment ? Thanks. -- Christian 🇫🇷 FR (talk) 10:54, 9 May 2024 (UTC)
- This template is clearly a hack. There is an official feature request for an explicit support.
- We can add a custom marker in the source (
<!--T:video-->
, then{{Tunit|video|Video:}}
), but it is a bad practice. - Translations admins should indeed ensure the original unit has not been removed before marking the page for translation. If they miss it, the remaining Tunit uses remain because the unit pages are not removed, but translators cannot translate or edit translations further anymore. Note we can restore the marker manually later.
- We can add a custom marker in the source (
- I recommend only translations admins use this template, and to use it carefully. 🙂
- -- Pols12 (talk) 14:02, 29 May 2024 (UTC)
tunit does not render when used in syntaxhighlight
[edit]on pages like -> https://www.mediawiki.org/wiki/Help:Advanced_editing it would be nice to use tunit to synchronize the same strings in the script and on the rendered one. I just try a simple test below Not important is the value of T:12 since it is undefined and the default provided text, once with a dash, once with an underline allows to track what happens. We see that tunit is not rendered in the synaxhighlight, and well rendered in the table cell. So how to make syntaxhighlight interpret the T:12 instead of highlighting the command line itself ? Thanks.
{| class="wikitable" |- ! Rendering ! Wikitext |- | <syntaxhighlight lang="wikitext"> {{tunit|id=12|2=A_section}} </syntaxhighlight> | {{tunit|id=12|2=A-section}} |}
Rendering | Wikitext |
---|---|
{{tunit|id=12|2=A_section}}
|
A-section |