Shortcut: WD:TN

Wikidata:Translators' noticeboard

From Wikidata
Jump to navigation Jump to search

Translators' noticeboard
This is a noticeboard for all matters regarding translation of pages via the Translate extension, and a meeting place for the translation administrators. Useful links: Documentation for the translation extension, Tutorial for translators. See also the sisterpage m:Meta talk:Babylon.
On this page, old discussions are archived. An overview of all archives can be found at this page's archive index. The current archive is located at 2024/04.

Main page is broken in most languages[edit]

The main page is broken in most languages, e.g. https://www.wikidata.org/wiki/Wikidata:Main_Page?uselang=mi shows "Template:Help translate messages/Content/mi" instead of the message that is supposed to be there. I first noticed it on the 9th, someone else reported it on Telegram on the 13th.

The way the main page is set up is too complicated for me, so I don't know what is causing it. @Ameisenigel, GVarnum-WMF, Tacsipacsi: you have all made changes this month to pages used in the main page.

- Nikki (talk) 07:57, 17 March 2024 (UTC)[reply]

I think the problem here is that Template:Help translate messages/Content/mi does not exist. Translatable pages should be included in a way that there is a fallback if something like that happens. Since there are so many pages transcluded on the main page I am not sure where we need to change something. --Ameisenigel (talk) 08:08, 17 March 2024 (UTC)[reply]
It seems it's not specific to the main page, even the examples on Template:Help translate messages are broken. The first one always displays English, the second one displays a broken link. - Nikki (talk) 14:50, 17 March 2024 (UTC)[reply]
Main page appears not translated into "mi" but the default should fall back in English even after the stuff being not-translated? ─ Aafī (talk) 18:20, 17 March 2024 (UTC)[reply]
Template:Help translate messages is used in Template:Main Page/Header new. --Ameisenigel (talk) 08:13, 17 March 2024 (UTC)[reply]
Translating this string mitigates the issue but doesn't solve the problem. The fallback should be English, like it is for other language versions. I believe there's something wrong with this edit but I'm really unsure because I'm not a too-much-of-a-tech person. ─ Aafī (talk) 18:37, 17 March 2024 (UTC)[reply]
There’s nothing wrong with that particular edit, only with the ones before and after it. 🙂 My December 2022 edit eliminated the explicit existence check on the assumption that the Translate extension does the check anyway. However, GVarnum-WMF removed the page from the Translate system (which broke this assumption), without proper migration – the code path that runs on the main page, which uses the user interface language, wasn’t taken care of:
  • {{Help translate messages/Content}} unconditionally uses {{Int}}, which depends on the page language, rather than using the {{int:}} magic word when the mode parameter is set to auto.
  • The main template wasn’t updated to always use {{Help translate messages/Content}}, even when the mode is set to auto. (Another option would be simply merging the two templates, the /Content subtemplate doesn’t serve much purpose anymore.)
Tacsipacsi (talk) 00:51, 18 March 2024 (UTC)[reply]
Apologies for this breaking. The template is setup differently than on the other wikis, so was not 100% sure best way to merge the two - but think I was able to sort it out. If someone wants to verify the merger and if things are now repaired on homepage. GVarnum-WMF (talk) 22:32, 18 March 2024 (UTC)[reply]
@GVarnum-WMF: You now made it work the same as on Meta – which is better than the previous situation in that there are no red links on the main page, but still not how it looked like before you switched to the Translatewiki translation: https://www.wikidata.org/wiki/Wikidata:Main_Page?uselang=de should (and used to) display the message in German, but now shows it in English. The #switch that was on {{Help translate messages}} should be restored: the first branch (auto|1|yes) should use {{int:…}}, while the second (default) branch should continue to use {{int|…}}. I hope we could avoid duplicating the (somewhat complicated) way of assembling the URL, but I’m not sure how to achieve this. Maybe reuse Template:Help translate messages/Content to create the URL?
You made another mistake that I’ve already corrected on Wikidata but can’t fix on Meta due to page protection: Module:Caller title (and its newer magic word alternative {{TRANSLATIONLANGUAGE}}) work only with the Translate extension, not with Translatewiki-based translations. Translatewiki-based translations, in fact, provide AFAIK no way to determine the language of the translation. This is why you need to replace any lang="{{#invoke:Caller title|lang|base=…}}", lang="{{BCP47|{{#invoke:Caller title|lang|base=…}}}}" or lang="{{BCP47|{{TRANSLATIONLANGUAGE}}}}" with lang="", as well as any dir="{{dir|{{#invoke:Caller title|lang|base=…}}}}" or dir="{{dir|{{TRANSLATIONLANGUAGE}}}}" with dir="auto", on all wikis. lang="" and dir="auto" mean “we have no idea which language this text is in or which directionality it has, but probably not the same as the surrounding text”, which is all what we know. class="mw-content-{{dir|{{#invoke:Caller title|lang|base=…}}}}" and class="mw-content-{{dir|{{TRANSLATIONLANGUAGE}}}}" need to be removed without replacement, hoping for the best. —Tacsipacsi (talk) 13:36, 19 March 2024 (UTC)[reply]
@Tacsipacsi: Have made that change to the template on Meta-Wiki (and elsewhere it is used) - thank you for that note. I have also switched the template here on Wikidata to use switch in a way I think you were getting at - but please let me know if it was something else you were getting at. The translation seems to work now on the homepage. Thank you again for your help in figuring this out. GVarnum-WMF (talk) 17:30, 20 March 2024 (UTC)[reply]