Page MenuHomePhabricator

"Link to this message" in Special:Translate does not work when translating Recent additions or translations
Open, MediumPublicBUG REPORT

Description

Steps to Reproduce:

  1. Go to Special:Translate
  2. Choose to translate Recent additions or Recent translations ( Dynamic message groups )
  3. Open a message and click the "Link to this message" tool in the dropdown on the message key

Actual Results:

You will see a message stating - "The message group is empty".

Expected Results:

Expect to see the actual message linked to in the respective message group, with the respective target language.

Additional details:
Link when copying from Recent additions message group,
http://127.0.0.1:8080/w/index.php?title=Special:Translate&showMessage=1198%3A1300%3AHelp%2FPage_display_title&group=page-1300%3AHelp&language=en-gb

Link when copying from the appropriate message group,
http://127.0.0.1:8080/w/index.php?title=Special:Translate&showMessage=1300%3AHelp%2FPage_display_title&group=page-1300%3AHelp&language=en-gb&filter=&optional=1&action=translate

If you look at the text after showMessage query parameter, you'll notice that the link generated on the recent additions page has a 1198: prefix. This is the NS_TRANSLATION namespace.

Possible solutions

  1. Replace the 1198: before generating the link. This might cause problems with Translatable pages that start with 1198:
  2. In the link instead of setting the message group as the actual group in which the message is present, the group can be set to the dynamic message group ( Recent additions / translations). The issue with this approach is that after a few days, the link will become invalid.

Event Timeline

Where does 1300 come from in your example? Is it a custom namespace (id or name) or just page prefix?

Where does 1300 come from in your example? Is it a custom namespace (id or name) or just page prefix?

Just a page title prefix.

Pginer-WMF moved this task from Backlog to tux on the MediaWiki-extensions-Translate board.