Page MenuHomePhabricator

WikiBhasha uses wrong language code for Portuguese (there is no pt-br.wikipedia.org)
Closed, ResolvedPublic

Description

pt-BR bug

Here are the steps to reproduce the bug:

  1. Log in an account having 'pt-br' as user lang on pt.wikipedia.org (or just add &uselang=pt-br to the url of the 3rd step). I did this using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16pre) Gecko/20110310 Ubuntu/10.10 (maverick) Namoroka/3.6.16pre.
  2. Go to an article of English Wikipedia. I went to "Test".
  3. Click in the bookmarklet and In the next screen, select "Português" in the list, and type some title for the new article. I typed "TestPagePt".

The script will open the URL above. After the page is loaded:

  1. Click again in the bookmarklet[1] and the script will look for something from 'pt-br.wikipedia.org'. See the screenshot.

PS: Nothing else happens after this (probably because there is nothing on pt-br.wikipedia...) and there is no console errors.


Version: unspecified
Severity: major
URL: http://pt.wikipedia.org/w/index.php?title=TestPagePt&action=edit&wbTitle=Test&wbAutoLaunch=true&mltCode=pt&uselang=pt-br

Attached:

pt-br_bug.png (562×706 px, 116 KB)

Details

Reference
bz28094

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:36 PM
bzimport set Reference to bz28094.

Created attachment 8307
Bokmarklet code

[1] The current bookmarklet code

Attached:

anil_ande wrote:

i checked the details shared above and was able to recreate the issue.
after doing some debugging, i saw that if the userlang URL parameter is available then wikipedia updates the wgUserLanguage parameter as the userlang URL parameter.
since we are using wgUserLanguage parameter to determine to which wikipedia api to call.
hence the script is making calls to pt-br.wikipedia.org api and failing.
we will work on this.

anil_ande wrote:

the issue is resolved with r-87245.
previously we were using the user language as the translation language.
now we are considering the article content language as the translation language