Page MenuHomePhabricator

Do not show priority language notice when target language is message documentation
Closed, ResolvedPublic

Description

When a page is marked for translation with a priority language set, and the translator selects the target language as Message documentation, the priority notice is displayed. Please see the image below,

As per discussion in issue T217046, we've decided to hide the notice if target language is set to message documentation.

Event Timeline

abi_ triaged this task as Low priority.Mar 1 2019, 4:14 PM
abi_ created this task.

Change 497122 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Hide priority language notice when language is message documentation

https://gerrit.wikimedia.org/r/497122

Added a method in ext.translate.base.js to determine if a language code is message documentation code. Using this to then show / hide the priority language notice in ext.translate.special.translate.js. Had to use the string literal qqq(for message documentation). This method should be useful in the future.


Test cases

Preliminary steps

Please perform these before running the test case

  1. Create a page.
  2. Mark it for translation with a priority language set.

TC #1 - Priority language notice should appear when non-priority language is selected as target language

  1. Translate the page.
  2. Set the target language to a language that is not the priority language or message documentation.

Expected behavior - The priority language notice should appear stating that this is not the priority language.

TC #2 - Priority language notice should not appear when message documentation is selected as target language

  1. Translate the page.
  2. Set the target language to message documentation
  3. Refresh the page.

Expected behavior - You should not see any notice appear after step 2 or step 3.

TC #3 - Priority language notice should not appear when priority language is selected as target language

  1. Translate the page.
  2. Set the target language to the priority language.
  3. Refresh the page.

Expected behavior - You should not see any notice appear after step 2 or step 3.

TC #4 - If no priority language is set, no notice should be displayed

  1. Translate the page.
  2. Change the target language.

Expected behavior - You should not see any notice appear after step 1 or step 2.

Change 497122 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Hide priority language notice if target language = msg documentation

https://gerrit.wikimedia.org/r/497122

abi_ moved this task from QA to Done on the User-abi_ board.

This is working as expected. Tested on meta.wikimedia,

Translating to non-priority language,

Translating to message documentation,

Also tested on a page where Prevent translation to non-priority language was set.