Page MenuHomePhabricator

Add fallback language support for translation-aware section transclusion
Open, LowPublic

Description

Follow-up of T47096: Add a way to transclude template or other page in the correct language

Currently, if [[Foo/pt]] does not exist, {{#section:Foo/pt|label}} transcludes [[Foo/en#label]] even if [[Foo/pt-br]] exists.

This is pretty amazing to see that {{#section:Foo/pt}} fallbacks to {{#section:Foo/en}}, but this would be even better if the fallback system follow usual language chain (so, for pt, fallbacking to pt-br before en).

Use case on Meta-Wiki.

Event Timeline

Nikerabbit subscribed.

This is already the case.

https://foundation.wikimedia.org/w/index.php?title=Universal_Code_of_Conduct/pt&action=info Has incorrect page language. Translate manages page language automatically, but if you are doing subpages manually, you have to set the language manually.

My bad, nice to know it! 🙂

Pols12 renamed this task from Add fallback language support for translation-aware transclusion to Add fallback language support for translation-aware section transclusion.May 7 2021, 8:09 PM
Pols12 reopened this task as Open.
Pols12 updated the task description. (Show Details)

I don’t know wether it is in Translate scope, but there actually seems to be an issue with #section transcluding. This parser function seems able to understand last subpage is a language code and to fallback to default /en, however it does not fallback to usual higher-priority fallback languages.