Page MenuHomePhabricator

Inconsistent error messages when the language is disabled
Open, Needs TriagePublicBUG REPORT

Description

Steps to reproduce

Case 1: language disabled at message group level

  1. Open https://translatewiki.net/w/i.php?title=Special:Translate&group=oppia-android-app&language=es.
  2. Open https://translatewiki.net/w/i.php?title=Oppia:oppia-android-app-nav_header_desc/es&action=edit.
  3. Compare the error messages you get.

Case 2: language disabled at site level

  1. Open https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-$1&language=sr-el.
  2. Open https://meta.wikimedia.org/w/index.php?title=Translations:$1/1/sr-el&action=edit.
  3. Compare the error messages you get.

Actual result

In both cases, the respective error messages differ between Special:Translate and manual editing of translation units.

Expected result

Consistent error messages. Preferably, they would all mention the language (currently only the ones on Special:Translate do), and in the first case, they would make it clear that it’s a message group-level restriction (currently only the manual editing one does).

Other information

I think ConfigHelper::isTargetLanguageDisabled() should return a Status (or StatusValue) and have no by-ref parameter: that would make it obvious what the returned value means (I find it confusing that true means disabled) and make the connection between the error/success state and the error message clearer (namely that an error message is only possible if there is an error), but it would also force us to pick one message in that method, i.e. force us to use consistent error messages.