Page MenuHomePhabricator

Labeled section transclusion shows translate tags when transcluding a page instead of its translation subpage
Closed, InvalidPublic

Description

Two problems emerged recently with transcluding sections from a page marked up for translation.
The markup was something like:

==Sectionname==  <!--T:nn-->
<translate> ... text ... </translate>

Problems:
*The #section-h function did not recognise the section at all, probably confused by the comment on the heading line.
*The #section function picked up the text between the <section begin> and <section end> tags, but did not process or drop the <translate> and </translate> tags.
See https://commons.wikimedia.org/w/index.php?oldid=334514388 for an example.

The problems are blocking translation of about 200 Help pages on Wikimedia Commons.

Event Timeline

Aymatth2 raised the priority of this task from Lowest to Needs Triage.Jan 26 2019, 1:01 PM
Aklapper triaged this task as Lowest priority.Jan 26 2019, 1:15 PM

@Aymatth2: Do you plan to work on this, or why did you change the priority of this task?

@Aymatth2: Do you plan to work on this, or why did you change the priority of this task?

@Aklapper: The initial description did not show the impact, which is to block translation of 200 help pages in Commons which hold information on whether files can be uploaded and are widely referenced in deletion discussions. I assume triage takes into account impact and difficulty of fixing, so put it back for review.

Aklapper raised the priority of this task from Lowest to Needs Triage.Jan 30 2019, 12:34 AM

Ah, thanks for the explanation!

Today I was struggling with a page on Commons, as there were some changes made to the original, so I had to restore the translation tags (wasn't aware of the problem), and mark the page for translation for the changes to apply to the translated pages. Then I saw that the sections of the page are being transcluded faultly. At first it said that "no information is available" under the relevant section. Then I removed the section header comment, and noticed that it's displaying the <translate> tags and refuses to display the rest of the transcluded sections (the ones that go below) on that page. So I removed the page from translation system. Indeed, it's impossible to work with those pages right now.

Aymatth2 closed this task as Resolved.EditedFeb 26 2019, 4:22 PM
Aymatth2 claimed this task.

Thanks to users @4nn1l2 and @Dalba a fix has been found: instead of having #section-h extract sections from pagename, it should extract them from pagename/en. This apparently returns the translated version of the page to #section-h, in this case translated from English to English with the <translate> tags and <!--T:nn--> comments removed. Possibly the #section-h documentation should be upgraded to point out this solution.

Aklapper renamed this task from Labeled section transclusion incompatible with translate extension to Labeled section transclusion shows translate tags when transcluding a page instead of its translation subpage.Nov 20 2020, 6:21 PM
Aklapper changed the task status from Resolved to Invalid.
Aklapper removed Aymatth2 as the assignee of this task.
Aklapper added subscribers: Reception123, dmehus.