Page MenuHomePhabricator

translate : error on array line occurs when the reference is declared later in the array
Open, Needs TriagePublicBUG REPORT

Description

Steps to Reproduce:

  1. open https://www.mediawiki.org/wiki/Translations:Help:Extension:TemplateWizard/19/fr

or https://www.mediawiki.org/w/index.php?title=Translations:Help:Extension:TemplateWizard/19/fr&diff=3516613&oldid=3516611&diffmode=source

  1. It is the translation of an array cell using reference not declared in the same translation unit.

Actual Results:

  1. see the error message :

Cite error: <ref> tags exist for a group named "fn", but no corresponding <references group="fn"/> tag was found, or a closing </ref> is missing

  1. observe on the root page, that the definition of the group in the reflist is done at the end of the array |colspan="5"|{{smaller|{{reflist|group=fn}}}}
  2. observe that this error is tracked in https://www.mediawiki.org/wiki/Special:RecentChanges 24 November 2019 00:04 Category:Pages with reference errors‎‎ 2 changes [Wladek92‎ (2×)] 00:04 Wladek92 talk contribs Translations:Help:Extension:TemplateWizard/19/fr added to category 00:03 Wladek92 talk contribs Translations:Help:Extension:TemplateWizard/18/fr added to category
  3. observe that the root page is not listed in error (which is ok, since it is coherent) - but (...?) neither are the translated pages above https://www.mediawiki.org/wiki/Category:Pages_with_reference_errors

Expected Results:

  1. do not show error at level of the translated message since error should appear only at the level of the root page if the group where really not defined

Reference;
Talk topic : https://www.mediawiki.org/wiki/Topic:Vbo3j4hagy6maa9u

Event Timeline

Wladek92 created this task.Sun, Nov 24, 9:53 AM
Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptSun, Nov 24, 9:53 AM
Wladek92 renamed this task from translate : line error on array line occurs when the reference is declared later in the array to translate : error on array line occurs when the reference is declared later in the array.Sun, Nov 24, 9:53 AM
Wladek92 updated the task description. (Show Details)

@Wladek92: Assuming this task is about the Translate extension itself, hence adding project tag so others can find this task when searching for tasks under that project or looking at that project workboard.

A potential solution to this is to disable parsing on Translations: namespace. Maybe there is a hook that can be used to set content type to plain text.