Page MenuHomePhabricator

Incorrect code is used for Hebrew in External Guidance
Closed, ResolvedPublic

Description

To reproduce:

  1. In a private window, open https://translate.google.com/#view=home&op=translate&sl=en&tl=iw&text=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FASCII
  2. Click the https://en.wikipedia.org/wiki/ASCII link in the translation panel.
  3. In the opened machine-translated page, click the "🤖 Automatic translation" link. (It's not localized now, but it may become localized at some point.)
  4. Examine the "Learn how you can contribute" link at the bottom of the page. The target URL is https://iw.wikipedia.org/w/index.php?title=Special:ExternalGuidance&from=en&to=iw&page=ASCII&targettitle=&service=Google
  5. If you click this link, you'll see a browser error message because the domain https://iw.wikipedia.org doesn't exist.

Note that the code "iw" is used twice in the target URL in step #4. This is incorrect. The first time it definitely has to be "he", and probably the second time as well ("to=iw" -> "to=he").

Google products often use the deprecated code iw for Hebrew instead of "he". This also often happens with Indonesian (in/id) and with Yiddish (ji/yi), but both of these appear to work correctly with ExternalGuidance, whereas Hebrew is broken.

Event Timeline

santhosh triaged this task as Medium priority.

Change 499586 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ExternalGuidance@master] Handle non-standard language codes from Google Translate

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

Change 499586 merged by jenkins-bot:
[mediawiki/extensions/ExternalGuidance@master] Handle non-standard language codes from Google Translate

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