Page MenuHomePhabricator

"Link to this message" in Special:Translate can produce a link with wrong language code
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to Special:Translate
  2. Choose a message group
  3. Change a language using the language selector (X)
  4. Open a message and click the "Link to this message" tool in the dropdown on the message key

Observed:
Language is not the chosen language X

Expected:
I am seeing exactly the same message I was looking before, in the correct language.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 6 2019, 9:05 AM
Nikerabbit added a subscriber: abi_.
abi_ claimed this task.May 12 2019, 5:25 PM
abi_ triaged this task as Normal priority.
abi_ moved this task from Backlog to In Progress on the User-abi_ board.May 13 2019, 3:24 AM

Change 509842 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Fix incorrect link to the message on translate editor

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

abi_ moved this task from In Progress to Under Review on the User-abi_ board.May 13 2019, 7:36 PM

Fixes the incorrect link on Link to this message on the translate editor. Note that linking to a specific messages displays only that message on the message table.

Added code in the message table module to update the targetlangcode data attribute of the message table whenever the target language is updated using the ULS.

Test cases


TC #1 - Link to message should get the correct link

  1. Translate a page to French
  2. Copy the "Link to this message" link
  3. Open the link in a new tab
  4. Then change the target language to Spanish
  5. Copy the "Link to this message" link
  6. Open the link in a new tab

Expected behavior -
On step 3) you should see the French version of the message, and you should see the Spanish version of the message on step 6).

Change 509842 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Fix incorrect link to the message on translate editor

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

Nikerabbit moved this task from Under Review to QA on the User-abi_ board.
abi_ closed this task as Resolved.May 22 2019, 10:03 AM
abi_ moved this task from QA to Done on the User-abi_ board.

Tested this on mediawiki.org, and I see that the language is now part of the query string for Link to message