Page MenuHomePhabricator

Categories are added to the wikitext when infoboxes are translated in Norwegian wiki
Open, In Progress, MediumPublicBUG REPORT

Description

Steps to replicate the issue:
Translate a page which includes an infobox template, from Norwegian Bokmal to English using the desktop editor, in Norwegian (no) wiki.
Check categories are correct
Publish page

What happens?:
Hidden categories that are included in the Norwegian infobox template are added to the target page wikitext, although they are not visible during the translation inside neither the source nor the target content.

What should have happened instead?:
They shouldn't have been added at all.

Other information:
Examples:
https://en.wikipedia.org/w/index.php?title=Selma_Ibrahim&direction=prev&oldid=1156992277
https://en.wikipedia.org/w/index.php?title=Siri_Kalvig&oldid=1157159580

I've found that it happens on every browser, I've tested Brave, Safari, and Chrome. I'm running Windows 11. I have cleared the cache multiple times.

Event Timeline

FWIW, these categories are added via templates and modules on the Norwegian Bokmål Wikipedia, so they are not present in the wikitext directly. But that still doesn't mean CX should be adding them to translated versions of those articles, of course. Is there something we should do differently on the Norwegian Bokmål Wikipedia to prevent this?

Thanks for the additional information. T338360: Content translation should not translate template-generated categories is a related request.

I don't remember this happening before, so maybe something changed how we handle this kind of content.

Change 983461 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX template translation: Only consider transclusion node for translation

https://gerrit.wikimedia.org/r/983461

ngkountas renamed this task from Categories are added to beginning of article with no apparent reason to Categories are added to the wikitext when infoboxes are translated in Norwegian wiki.Dec 18 2023, 10:48 AM
ngkountas claimed this task.
ngkountas updated the task description. (Show Details)

Change 983461 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX template translation: Only consider transclusion node for translation

https://gerrit.wikimedia.org/r/983461

Nikerabbit changed the task status from Open to In Progress.Jan 8 2024, 7:54 AM