Page MenuHomePhabricator

ContentTranslation fails to properly convert mandatory Cite web parameter
Closed, DuplicatePublic

Description

I have encountered a really annoying bug in ContentTranslation tool.

The equivalent of Cite web template on Polish Wikipedia is Cytuj stronę. It has two mandatory parameters: url and tytuł (title). The latter one does not get transferred properly to the translation although title exists. This reduces the usefulness of the translation tool significantly (conversion of templates is quite mundane)

Here are the screenshots. I am translating https://en.wikipedia.org/wiki/Grič_Tunnel_(Zagreb)

  1. References are visible on the list with a note about missing tytuł (title) parameter
  2. Reference is shown in the side bar upon clicking
  3. Its edit fails because of allegedly missing tytuł= parameter (the message translates as: Error in the syntax of Cytuj stronę template. Missing title of the cited page)
  4. Please note that the source code of the original page has title parameter filled in correctly.

I wish I had:
(a) the conversion itself fixed
(b) possibility to add missing / mismatched parameters manually if the automatic conversion failed for some mandatory parameters, apart from the error message.

May be related to bug T209473
May be also related to the change that explicitly excluded title parameter from automatic translation of its content (which is correct - the titles of articles, books etc. should not be translated unless edition in other language is available)

Event Timeline

Bonvol created this task.Jun 18 2019, 7:15 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 18 2019, 7:15 AM

Templates are created independently in each wiki. In order for Content translation to know how to copy the parameters from one in the source article to the equivalent one in the target wiki, metadata is needed. Currently Content translation relies on templateData to know which parameters to copy the information of the template over. The "url" parameter works because it has the same name in both languages. For "tytuł", Polish Wikipedia editors can edit the templateData to add a "title" alias that help the tool to know they are equivalent.

We are working on improving these mappings automatically (T224721), surfacing the errors when that is not possible (T209473, T206310), and providing a cleaner way for users to fix the mappings (T221534, T222059). With so many templates in each language, the tool cannot provide specific support for all possible combinations but we are trying to provide general mechanisms to provide a better support and tools for editors to improving it when needed.

Since the ticket focuses on mandatory parameters, I think it makes sense to mark it as a duplicate of T206310: CX2: Highlight references with a template that is missing mandatory parameters after being adapted but I wanted to provide some additional context.

Thank you, I have requested introduction of aliases to Cytuj stronę (= Cite web) on Polish Wikipedia. This is a critical template, so I'd rather let to do it other people that already have done changes in it before.

Wargo added a subscriber: Wargo.Jun 21 2019, 1:09 PM

For "tytuł", Polish Wikipedia editors can edit the templateData to add a "title" alias that help the tool to know they are equivalent.

Aliases suggests that these alternative parameter names can be passed in code. So when we add "title" as alias for "tytuł" something can suggest "title" can be written in code. This is how I understand aliases. So, it may be work for CT but may make confusion elsewhere.

Good solution is to create mappings using mechanism used to match citoid fields.

For "tytuł", Polish Wikipedia editors can edit the templateData to add a "title" alias that help the tool to know they are equivalent.

Aliases suggests that these alternative parameter names can be passed in code. So when we add "title" as alias for "tytuł" something can suggest "title" can be written in code. This is how I understand aliases. So, it may be work for CT but may make confusion elsewhere.

Yes, mapping templates based on parameter names and aliases is a limited approach based on the information about templates that exists today. As mentioned in T225989#5273626, we plan to provide cleaner and more scalable mechanisms.

Regarding the use of aliases, I'm not familiar with potential problematic side-effects, but it is up to the community to decide whether it is acceptable as a solution, even if it is a temporary one.

Good solution is to create mappings using mechanism used to match citoid fields.

Citoid information is already integrated. If such information is present for a template but not working as expected when being mapped we are interested in the details to investigate it further.

Thanks!

Adding aliases to a one of the most used templates because of a bug in translation tool was assessed on Polish Wikipedia as not clean and indeed, it is kind of workaround. I checked the options inbetween and I am able to get into Polish version of Cite web template from the ContentTranslation tool in error cases, but anyway, the single parameter transferred to the translation was url. Other parameters (publisher, language, date, access date, author etc...) were ignored.

Due to relelavnce of Cite* templates I consider it a blocker.for ContentTranslation extension.