Page MenuHomePhabricator

Document how (if it is possible) we can avoid translation of the text output from templates
Closed, ResolvedPublic

Description

Given that I have an article with a template
And the template has a translated version in the target language
When I translate the paragraph containing the template
Then I want the template from the target language
And the arguments to the template should be translated

As a fallback I want a redlink for the template, not the translated output of the template.

I'm not sure what is supposed to happen, there are no documentation I'm aware of about this (mw:Content translation). Still it seems like it happen sometimes. (Is mw:Content translation/Templates partly implemented? Sould this list be constructed from data stored at Wikidata?)

An example of the problem is shown in the history of w:no:Nordenskjöld Coast.

Event Timeline

jeblad renamed this task from Document how (if it is possible) we can avoid translation of the text from templates to Document how (if it is possible) we can avoid translation of the text output from templates.Apr 17 2016, 12:01 PM
jeblad added a subscriber: Amire80.
Amire80 triaged this task as Medium priority.Apr 20 2016, 1:20 PM

It's not quite possible at the moment and will require development, but we do have improving template support as one of the goals for this quarter, so I'm adding it to the quarter's board for consideration.

I am interested in seeing some Visual Editor-like support for Templates. (Well there is no wikitext editing so that's the best I can ask for…)

I am interested in seeing some Visual Editor-like support for Templates. (Well there is no wikitext editing so that's the best I can ask for…)

Hi,

This will be done in T105447: [Epic] replace plain contenteditable with VisualEditor in ContentTranslation, but it won't happen very soon.

For this bug in general:

What we really need to do is to rethink the policy about template adaptation. When we first developed CX, we decided to do the following:

  1. completely skip all the block-level templates under the assumption that they are mostly infoboxes, which are hard to adapt
  2. adapt the inline templates to the corresponding template in the target language.
  3. if there is no corresponding inline template, do something like a subst.

All of these points need revision, especially 1 and 3. Some block-level templates can actually be safely adapted (see T104005). The substing in point 3 often creates a lot of mess.

Point 2 is works wonderfully when it actually works, but often it doesn't—there are bugs (e.g. T125579, T98018) or it falls through to point 3.

One idea is to communicate to the user that it's a template that was adapted and substed, and allow removing it.

We have update https://www.mediawiki.org/wiki/Content_translation/Templates and exploring some approaches to improve template adaptation. Please see T139332: CX1 Template editor (tracking) (deprecated) some first steps.

This task is a pretty good description of the problem from the user perspective.

I'll close it when the implementation of the new templates infrastructure is done, hopefully in September 2016.

Amire80 claimed this task.

This is largely done by the new CX template editor, which was deployed last week. It's still not fully handled for footnotes, so there's a follow-up bug for this: T152444.