Last modified: 2011-05-02 12:15:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30094, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28094 - WikiBhasha uses wrong language code for Portuguese (there is no pt-br.wikipedia.org)
WikiBhasha uses wrong language code for Portuguese (there is no pt-br.wikiped...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikiBhasha (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: WikiBhasha.MSR
http://pt.wikipedia.org/w/index.php?t...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-17 12:16 UTC by Helder
Modified: 2011-05-02 12:15 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
pt-BR bug (116.46 KB, image/png)
2011-03-17 12:16 UTC, Helder
Details
Bokmarklet code (1.28 KB, application/javascript)
2011-03-17 12:17 UTC, Helder
Details

Description Helder 2011-03-17 12:16:41 UTC
Created attachment 8306 [details]
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:
4) 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.
Comment 1 Helder 2011-03-17 12:17:52 UTC
Created attachment 8307 [details]
Bokmarklet code

[1] The current bookmarklet code
Comment 2 Helder 2011-03-17 12:32:39 UTC
In the error console of Chrome (10.0.648.134) I see this error:

GET http://pt-br.wikipedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=TestPagePt&format=json&callback=jsonp1300364412360 undefined (undefined)
Comment 3 anil kumar ande 2011-03-17 12:47:36 UTC
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.
Comment 4 anil kumar ande 2011-05-02 12:15:12 UTC
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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links