Page MenuHomePhabricator

Hide block templates in Section Translation until they can be properly supported
Closed, DeclinedPublic

Description

I tried translating the article "Metabolism" from English to Yoruba using SX. This is a new article, so SX suggested translating the opening section. This includes the navigation box, which is the {{Biochemistry sidebar}} template in the English Wikipedia. It did it string by string: "Part of a series on", "Biochemistry", "Chemistry of life", "Index", "Outline", "History", as if each of these things was a sentence in the prose.

I also tried translating "John McCain", and it tried to translate strings in the Infobox ({{Infobox officeholder}}).

Section Translation shouldn't try to translate these templates at all. At best, it should try to adapt the template (T275374), and if it can't be done, it should just be silently skipped. This ticket proposes to hide block templates until they are properly supported. In this, users won't waste their time translating pieces of rendered content of templates that have no effect in the published article.

For the creation of new articles (promoted by the new entry point in T286645) template such as infoboxes are quite common. So the issue may become quite visible.

Event Timeline

Amire80 renamed this task from Section Translation tries to translate strings inside the navigation box, even though it's not even shown on mobile screens to Section Translation tries to translate strings inside the navigation box and infobox, even though it's not even shown on mobile screens.Oct 22 2021, 4:42 AM
Amire80 updated the task description. (Show Details)

I guess it can be its subtask.

If true template adaptation is difficult, then as a quick interim solution to make things less messy, we should just ignore infoboxes and navboxes. There is logic or special handling of these two kinds of templates in MobileFrontend and perhaps we can reuse it.

As I note in the description: if we promote this as a good solution for starting new articles by translating the lead section, this should be a priority.

Pginer-WMF renamed this task from Section Translation tries to translate strings inside the navigation box and infobox, even though it's not even shown on mobile screens to Hide block templates in Section Translation until they can be properly supported.Oct 22 2021, 7:42 AM
Pginer-WMF updated the task description. (Show Details)

I guess it can be its subtask.

If true template adaptation is difficult, then as a quick interim solution to make things less messy, we should just ignore infoboxes and navboxes. There is logic or special handling of these two kinds of templates in MobileFrontend and perhaps we can reuse it.

As I note in the description: if we promote this as a good solution for starting new articles by translating the lead section, this should be a priority.

Makes sense. I adjusted the description to make the task about hiding block templates until they get properly supported, making it a sub-task of T275374.
Thanks a lot for testing and reporting, Amir!

Section Translation already provides some basic support for block templates. So no need to hide them. Efforts may be better spend in improving such support.