Template talk:Translatable template

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Template Loop Detected[edit]

It looks like a call to this template is causing a template loop at Help:Link#Interwiki_links, this template may have a bug, unless that call is somehow malformed. —The preceding unsigned comment was added by 205.237.115.100 (talk)

Template:Main is broken. See my notice to User:Verdy_p in Template talk:Main. --Kaganer (talk) 00:58, 28 March 2014 (UTC)

Making changes to the source of a translated template?[edit]

I tried to remove the message "this portal is under construction" from Template:Evaluation/Header which is transcluded on Evaluation portal pages with TNT (example). The changes aren't showing up: the template still reads "This portal is under construction" even after I purge the page. What's the easiest way to make changes like this take effect? I'm still getting up to speed on the translation extension and its attendant templates & workflows. Jmorgan (WMF) (talk) 00:47, 5 December 2013 (UTC)

This is not a bug of TNT, but a bug of the "translate" extension itself, which forbids editing Template:Evaluation/Header/en containing the initial imported English translation (without the "translate" tags), which was needed for several weeks to avoid breaking pages including the prepared template (as long as it was not validated for the translate tool).
It thinks that this is not needed as English is supposed to be the source language used in the base template : this is correct, but before this template was activated for the translate extension, the translate extension also refused to drop silently the "translate" tags (another bug). I already spoke about this issue of the "translate" extension but you've found another bug: it restrict editing an existing page that it DOES NOT generate itself.
In my opinion, the translate extension should always:
  • reference the /en page as the prefered target of the "English" (source language) link in the languages bars created with the "languages" tag (this is what it already does, when the /en page exists and it's OK, otherwise it links English to the base page).
  • keep the base page (containing the "template" tags) editable (this is OK now).
  • render the base page by dropping "translate" tags silently (it does not for now : bug #1): this will allow preparing existing pages easily and testing them before we submit them to the translate tool.
  • create or refresh automatically the /en page without these translate tags when the base page (or a new version of it) has been submitted to it. This page will be not directly editable, like all other generated translated pages). (it does not for now: bug #2).
For now, all that can be done is that a wiki administrator removes/hides the "/en" subpage which is not refreshed by the tool, but also not editable (so that we can now change it to a redirect to the base page).
We'll encounter again the case alter when we convert translated pages created without the translate tool, to use the translate tool, including pages that currently use LangSwitch that we should convert to use the Translate tool instead. verdy_p (talk) 01:55, 5 December 2013 (UTC)
Not creating of the subpage sometimes is a known thing but some magic and rite dances are helpful usually. --Base (talk) 06:08, 5 December 2013 (UTC)
I don't now what you want to mean here. There's a bug yes, but it can be solved in the Translate extension.
In the interim, a wiki admin may bypass the existing edit-protection on the /en subpage by replacing its content by a redirect to the base page.
I'm convinced that the two bugs above should be corrected to facilitate the seamless use of the Translate extension and the conversion of existing pages using other methods, notably those complex templates currently using Template:LangSwitch
You cannot currently prepare these templates to convert them using the Translate tool (which allows easier translatin than editing the complex templates or pages using LangSwitch) as it will immediately break many existing pages
  1. You have first to create immediately all subpages for all languages currently used in the LangSwitch, including the subpage for the default English language; this allows TNT to work correctly without breaking any other pages;
  2. But once you've done that, as soon as you'll have validated it and submitted the base template to the Translate tool, the English subpage will be edit-protected but never updated by the Translate tool, notably when the base page (containing the "translate" tags) will be updated: all languages other thn English will be rendered OK, but not English which will permanently keep the initial version. And this is the current problem in this discussion.
If you want to avoid this bug #2 for now, the Translate-admin must first redirect the existing /en subpage to the base page immediately before submitting the base page to the Translate-tool (but not after this submission, and also not too soon because in the interim the English transclusions via TNT will not render correctly the "translate" tags present in the base page, due to bug #1 of the Translate extension). The time between creating the redirect and the submission must be short, there's no ward if something stops you in the middle, or if the submission to the Translate extension fails (you'll have to revert your own redirection if you need more work on the base page to have it accepted by the translate tool).
I hope you better understand why creating subpages is needed initially, it is unavoidable (unless all these conversion steps are being performed fast by the same Translate-admin.
But note that the first step, creating subpages is not restricted to the few Translate-admins, all wiki-editors can do this, i.e. almost all Wikimedian users without specific privileges, including IP-only users, at any time, and it is then impossible for them or for any other people (except the very few wiki admins), to delete/hide these subpages (these pages can only be blanked by them or redirected, but this does not solve the problem).
For this reason, I would like to see the Translate tool corrected so that:
  • it will NOT edit-protect the existing /en subpage (or that it will protect it after replacing its content immediately and automatically by a redirect to the base page as soon as the new base page as been submitted to the tool)
  • it will completely check pages containing "translate" tags, by not only displaying the top banner, but also checking the correct closure of translate tags, displaying a status when the page is effectively submittable.
  • the template transclusion mechanism should not render the "translate" tags left visible by the activated translate tool, the translate tool should discard them from the transcluded content silently, as long as the transcluded page is not an active member of the Translate database.
verdy_p (talk) 20:25, 5 December 2013 (UTC)
Thanks for your help, Verdy p. It sounds like for now the most efficient way to prevent the "under construction" message from displaying on pages that include the Evaluation/Header template is to delete the Evaluation/Header/en subpage. Is that correct? If so, I currently have the necessary user rights to perform this action and will do so. As for a more permanent solution, please post the links of any bug reports you have logged related to these issues and I will join you in requesting these fixes to the Translation extension! Best regards, Jmorgan (WMF) (talk) 20:43, 6 December 2013 (UTC)
Correct, just delete the /en subpage which is not refreshed (it will be no longer seen by the TNT template, so it will link to its default base page instead for English).
It won't be recreatable accidentally by any user, given the existing protection set by the translate tool as soon as any base page is submitted to the translate tool.
But the two bugs of the Translate tool will remain, and I really suggest their correction to facilitate the transistions/conversion to use the Translate tool (notably for translatable templates where it is not viable to instruct translators to edit the wikicode to modify only the LangSwitch'es, and not break it by some missing or forgotten braces or vertical bars). verdy_p (talk) 21:07, 6 December 2013 (UTC)
Note: I don't know who manages the implementation of the Tranlate extension, and where to file a bug or RFE. So I've still not filed any bug about these two issues because of this.
If you can, point them to this discussion. verdy_p (talk) 21:11, 6 December 2013 (UTC)
I may however implement a modification of the TNT template to indicate what to do for the default English language: "use /en subpage or the base page ?"
Both methods are currently used on this wiki. Currently when the /en subpage exists, it is used in priority (because the base page does not contain any english but renders some page according to some language parameter or UI language).
The problem is that English is not always the language used in the base page, and lots of autotranslated pages still to not use the translate extension. This would require an additional parameter specifying the language used in the base template, or a dummy language code to force all language codes to use the /en subpage as default if their subpage does not exist. verdy_p (talk) 21:17, 6 December 2013 (UTC)

┌─────────────────────────────────┘
I hunted around and it looks like the list of bugs for the translate extension is here, and you can file a new bug here. I spent about an hour hunting through this list and found many, many bugs that seem to be related to the problem we're talking about (sample: [1], [2], [3], [4], [5], [6]), but no indication of whether these bugs would be fixed. Eventually, I deleted the translation unit subpage for the "under construction" message (Translations:Template:Evaluation/Header/11/en). That wasn't enough though: I had to then made a null edit to one of the other translation unit subpages. That seemed to work: the message no longer appears on Template:Evaluation/Header/en. Overall, this is a obviously a real pain, especially since most of us can't delete pages, and also because this "fix" isn't documented anywhere. But like I said, I don't know what we can expect in terms of fixes--tho it's encouraging that the devs are aware and responding to bug requests. Let me know if you decide to follow up on the issue and I'll participate in any discussions. Thanks again, Jmorgan (WMF) (talk) 22:59, 6 December 2013 (UTC)

Template is not working at the "Category:" namespace[edit]

Template {{TNT}} with Module:Template translation is not working at the "Category:" namespace - translated versions is not substituted. See example in Category:Templates - in all subpages seen english version of {{How add to category note}}. --Kaganer (talk) 11:48, 15 January 2014 (UTC)

It DOES work, categories are being filled actively, it will take time for them to appear. Yes the translated versions ARE substituted (see French for example whose description is fully filled).
Note that you should know that substitutions are not synced immediately (this is true for ALL translated pages, not just categories: it is always late by the last edit performed, whose substituion is delayed up to the next edit; unless you reconfirm this last translation, due to a limitation/bug of the Translate extension; this bug/limtiation has a workaround, but it exists n ALL translatable pages).
Note that many translated pages currently use translated categories displaying red links, many of them are still to be created. This is what the modification attempts to do, by sorting them and automating a bit the creation of categories (the translation of descriptions is optional, but translating at least one item allows creating them with the correct parent categories, as defined in the non-translated base categories. verdy_p (talk) 18:42, 16 January 2014 (UTC)
OK, thanks for explanation ;) --Kaganer (talk) 13:28, 17 January 2014 (UTC)
However, in Category:Templates/fr I seen english version of {{How add to category note}}, rather than translated version. In my opinion, this is not due to substitution lag. Please try place text {{TNT|How add to category note}} into Test/fr and Category:Test/fr, and please compare result in preview mode. --Kaganer (talk) 13:38, 17 January 2014 (UTC)
OK the category pages DO work with the Translate tool that translated them into subpages, even of there is still no subpages in the Category namespace. My changes before your message did not change this, we already had categories created with "/lang" suffixes (that's why I assumed that there was subpages, and this was confirmed later when the Translate tool also created suffixed page names, but the category namespace still has no real subpages).
Ths is a strange misconfiguration in my opinion; only the main namespace of Wikipedia or Wiktionary for articles has no subpages because the "/" may be part of the name without restriction like "//" or "/../" occurences in names impossible if subpages are enabled. But here in Meta-Wiki, we have subpages enabled in the main namespace, and in templates, all of them being translatable, and needing per-language categories. Here the Category namespace should then allow subpages.
I found a work-around for TNT, which previously assumed the MediaWiki rules (not obeyed by lots of templates and the Translate tool). I don't think there's any case on Meta-Wiki where we'll ever need "//" in names, or "." and .. in titleparts, or "/" at end of a pagename. Note that this only affected the categories, and category pages were never translated on Meta-Wiki except very few ones (including the few that are now translated with the Translate extension and not by using TNT templates.
Meta-Wiki is inconsistant here because its "#titleparts" function does not check the namespace status and always splits the given title in multiple part (this function in fact does not check that the given name is an actual title, because some templates use #titlepart to split joined values oassed in a single template parameter (and the Translate tool also does not check the namespace for its naming rules). Media-Wiki is also inconsistant here in the builtin BASEPAGENAME and SUBPAGENAME pseudo-template (SUBPAGENAME should be emty for a root pagename without any "/" suffix), and in the core Lua modules for Scribunto as well ! verdy_p (talk) 15:46, 19 January 2014 (UTC)

.

BiDi issues[edit]

Hi! I noted some bidirectional issues related to the rendering of untranslated LTR type messages in RTL wikis:

  1. b:ar:user:MediaWiki message delivery
  2. n:fa:user:MediaWiki message delivery
  3. q:he:user:MediaWiki message delivery
  4. s:yi:user:MediaWiki message delivery
  5. v:ar:user:MediaWiki message delivery
  6. w:yi:user:MediaWiki message delivery
  7. wikivoyage:ur:user:MediaWiki message delivery at incubator:user:MediaWiki message delivery
  8. wikt:yi:user:MediaWiki message delivery
  9. w:de:user:MediaWiki message delivery

Please look at

  1. user:MediaWiki message delivery

and search the most appropriate places / pages to include dir="ltr" in the relevant parts (div's and / or span's). One candidate might be

  1. Template:Mass message userpage/en.

Please compare with:

  1. q:he:user:MediaWiki message delivery it seems that not all lines are translated yet
  2. w:he:user:MediaWiki message delivery it seems that all lines have been translated
    q:he behaves different then w:he:
  3. w:fa:user:MediaWiki message delivery it seems that all lines have been translated

Note: Please note that the rendering might depend / depends both on the directionality of the wiki content and on the directionality of the selected "GUI interface language"

added: 01:29, 16 August 2015 (UTC)

Beside the translations of user:MediaWiki message delivery many other pages may render odd in RTL wikis.
list of RTL and / or BiDi WMF subdomains:

BiDi workgroup · interwiki map · special:SiteMatrix
Arab: ar:, arz:, azb:, ckb:, dv:, fa:, glk:, ha: BiDi, ks:, ku: BiDi, lrc:, mzn:, pnb:, ps:, sd: BiDi, tk: BiDi ?, ug:, ur:, etc.
Aram: arc:
Hebr: he:, lad: BiDi, yi: etc.
Please complete the list! Thanks in advance!.

I am not often at meta: (most of my work was deleted here until my birthday in 2007; see meta:Requests for deletion#multiscript_collaboration).
In order to notify me please use testwiki:user talk:MediaWiki message delivery#BiDi_issues. Thanks in advance! lɛʁi ʁɑjnhɑʁt (Leri Reinhart)
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 16:39, 15 August 2015 (UTC)
CC: attention to: user:GerardM: Please get the relevant people informed and involved. Thanks!

handling Global user pages[edit]

cc: user:Nemo bis At ?diff=13150075&oldid=11328084 I added

<div dir="ltr" text: style="text-align:left" >
...
</div>

because I was "unhappy" with the rendering of the RTL ps:user:Nemo bis page which now looks better (???).
Please try to meke similar edits at your special:MyPage (and relevant subpages) and report here related results, issues and / or concerns. Regards lɛʁi ʁɑjnhɑʁt (Leri Reinhart)
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 01:20, 16 August 2015 (UTC)

Please see also talk:User language#BiDi_issues. Best regards lɛʁi ʁɑjnhɑʁt (leri raynhart)
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 21:16, 22 August 2015 (UTC)

additional comments[edit]

1. attention to: user:Nikerabbit: Please note the red links at testwiki:file:2152085cab.png.
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 20:06, 15 August 2015 (UTC)
2. attention to: user:Nikerabbit: links from testwiki:Most-perfect magic square#BiDi_issues to various "local"' (transcluded) pages from: c:file:2152085cab.png
Arab: ar:, arz:, azb:, ckb:, dv:, fa:, glk:, ha: BiDi, ks:, ku: BiDi, lrc:, mzn:, pnb:, ps:, sd: BiDi, tk: BiDi ?, ug:, ur:, etc.
Aram: arc:
Hebr: he:, lad: BiDi, yi:, etc.
2.1. When looking at the "diff" implementation / configuration (relevant also wit "action=submit") on some WMF projects the "original" (using "-) is at the left side of the screen and the "new modified eikisource" (using "+) is at the right side of the screen as at he:, where I am using the en LTR GUI. However if I change to the he: RTL GUI the sides will swithc.
This seems to work as intended; however it might be confusing especially for newbies attemting to make ther first BiDi edits.
A new user baraneter in special:Preferences#mw-prefsection-editing could offer a solution to this "matter".
2.2. the BiDi pagenames as arc:file:2152085cab.png, he:file:2152085cab.png etc. render optically as a "BiDi mess"; I saw this today as a known bug at "phabricator": phab:T30411 ;-)
Best regards and greetings from Munich, Germany from "Gangleri"!
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 23:28, 15 August 2015 (UTC)
3.1. attention to: user:Nikerabbit:ref: testwiki the "diff" implementation / configuration (relevant also wit "action=submit") does not show / use:
"Latest revision" maybe MediaWiki:Currentrevisionlink found with betawiki:special:Search/Latest+revision [7]
"Your text" maybe MediaWiki:Yourtext
The main issue is that neither "(No difference) is used at testwiki!
3.2. neither does special:Allmessages support a full search nor is it possibler to finf in the contributions back to 2007
regards ‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 00:22, 16 August 2015 (UTC)

other comments[edit]

  1. ...