[go: up one dir, main page]

Page MenuHomePhabricator

Transcluding section by heading of a translatable page does not work with translation pages
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Given:
[[Translatable]]:

<translate>
== Header == <!--T:1-->
</translate>

[[Transcluder]]:

<translate><!--T:1-->
Hello
</translate>
{{lsth:Translatable|Header}}
  • Create [[Translatable]] page as above, mark it for translation and translate it.
  • Create a [[Transcluder]] page as above, mark it for translation and translate it.

What happens?:

  • In source language, [[Transcluder]] well displays [[Translatable]] section.
  • In translation pages (e.g. [[Transcluder/fr]]), lsth does not display anything.

What should have happened instead?:
In translation pages, the section should be actually transcluded.

Other information:
Follow-up of T47096 which allowed to transclude translatable pages without any hack.

The workaround is to manually add section labels, to use {{lst:}} instead.

Event Timeline

I don't think LSTH checks anchors, but if it does T62544: Automatically add anchor for original (English on Wikimedia) version of heading title might have solved this.

The main commit of T62544 has been merged before I submit this issue. #lsth seems to parse wikitext, looking for heading syntax.

We could look for added anchor when the heading is not found in wikitext. I wonder if that may create some issues.