Wikimedia

Translate extension: Duplicated error message for duplicated translation unit

The translate extension for MediaWiki allows users to have multiple different translations for a single article. The extension cust the page content into different sections, called translation units, which get a unique ID. A translator can then translate the translation units independently to form the new, translated page.

As these translation unit markers (with the unique ID) are saved in the Wikitext markup of the page, they can be changed and can therefor be non-unique anymore. When marking such a page as translateable, the Translate extension will print an error message for the user. However, if the translation unit is duplicated, then this error message is duplicated as well.

Your task is to investigate why this error message is duplicated (setup the translation extension on your local environment and try to reproduce the problem first before looking at the code to understand what users are doing on the wiki). Afterwards, find a suitable solution for this problem, so that the error message is only showed once per duplicated translation unit.

Task tags

  • i18n
  • php

Students who completed this task

pppery

Task type

  • code Code
close

2019