Last modified: 2013-01-16 08:07:45 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 T43475, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41475 - Unknown language code should fallback to site default instead of "en"
Unknown language code should fallback to site default instead of "en"
Status: NEW
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 41348
  Show dependency treegraph
 
Reported: 2012-10-28 18:16 UTC by Siddhartha Ghai
Modified: 2013-01-16 08:07 UTC (History)
11 users (show)

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


Attachments

Description Siddhartha Ghai 2012-10-28 18:16:41 UTC
Currently, using a non-existent/incorrect uselang parameter defaults the interface back to en. E.g [1] This is not good/graceful behaviour. Mediawiki should rather first revert to the site's default interface language.

Stumbled upon this while using the hi-wp upload form. One of the links used in the form is [2], which uses the uselang hack to display an appropriate subpage of Mediawiki:Uploadtext to the user per the selected option. However, when the option doesn't exist, Mediawiki defaults back the entire interface to en, which is very inconvenient.

[1]: https://ar.wikipedia.org/?uselang=nonexistent

[2]: http://hi.wikipedia.org/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:Upload&uselang=hi-nonfree&wpUploadDescription={{%E0%A4%89%E0%A4%9A%E0%A4%BF%E0%A4%A4+%E0%A4%89%E0%A4%AA%E0%A4%AF%E0%A5%8B%E0%A4%97+%E0%A4%94%E0%A4%9A%E0%A4%BF%E0%A4%A4%E0%A5%8D%E0%A4%AF%0A+%7C%E0%A4%B5%E0%A4%BF%E0%A4%B5%E0%A4%B0%E0%A4%A3++++++++=+%0A+%7C%E0%A4%B8%E0%A5%8D%E0%A4%B0%E0%A5%8B%E0%A4%A4++++++++++=+%0A+%7C%E0%A4%B2%E0%A5%87%E0%A4%96++++++++++=+%0A+%7C%E0%A4%AD%E0%A4%BE%E0%A4%97++++++++++=+%0A+%7C%E0%A4%95%E0%A4%AE_%E0%A4%B0%E0%A4%BF%E0%A4%B8%E0%A5%8B%E0%A4%B2%E0%A5%8D%E0%A4%AF%E0%A5%82%E0%A4%B6%E0%A4%A8++=+%0A+%7C%E0%A4%89%E0%A4%A6%E0%A5%8D%E0%A4%A6%E0%A5%87%E0%A4%B6%E0%A5%8D%E0%A4%AF+++++++++=+%0A+%7C%E0%A4%AC%E0%A4%A6%E0%A4%B2%E0%A4%BE%E0%A4%B5_%E0%A4%B8%E0%A4%82%E0%A4%AD%E0%A4%B5++++=+%0A+%7C%E0%A4%85%E0%A4%A8%E0%A5%8D%E0%A4%AF_%E0%A4%9C%E0%A4%BE%E0%A4%A8%E0%A4%95%E0%A4%BE%E0%A4%B0%E0%A5%80+++=+%0A}}
Comment 1 Siddhartha Ghai 2012-10-28 18:39:09 UTC
Further clarification: When opening [1], I would expect Mediawiki to display the source of [2], not [3]; i.e use the site's interface message, not the default message for that language.

1: http://hi.wikipedia.org/w/index.php?title=Mediawiki:Uploadtext/hi-nonfree&action=edit

2: http://hi.wikipedia.org/wiki/Mediawiki:Uploadtext

3: http://hi.wikipedia.org/wiki/Mediawiki:Uploadtext/hi
Comment 2 Nemo 2012-10-28 21:01:29 UTC
So is this about uselang, language subpages or language codes in general? Uselang is only for debugging and http://hi.wikipedia.org/w/index.php?title=Mediawiki:Uploadtext/hi-nonfree&action=edit doesn't seem a plausible usecase.
Comment 3 Siddhartha Ghai 2012-10-28 21:12:27 UTC
(In reply to comment #2)
> So is this about uselang, language subpages or language codes in general?
> Uselang is only for debugging and
> http://hi.wikipedia.org/w/index.php?title=Mediawiki:Uploadtext/hi-nonfree&action=edit
> doesn't seem a plausible usecase.

This is about how mediawiki handles fallback language for interface if a non-existent uselang is given, and how mediawiki detects the message for interface subpages. (Aren't they the same thing at work?)

Its not often that the uselang hack is used (like in the upload form), but if someone (mis)types a non-existent uselang, mediawiki should fall back to the default site interface language, not to en.
Comment 4 Krinkle 2012-10-29 11:55:50 UTC
Does this only affect the fallback as shown on MediaWiki-namespace subpages, or the underlying system for the actual interfaces as well?
Comment 5 Liangent 2012-10-29 12:01:17 UTC
btw for the original issue of Special:Upload: to workaround it, I'm hacking special page parameter instead of &uselang= currently. See the solution on http://zh.wikipedia.org/w/index.php?title=MediaWiki:Uploadtext&action=edit&uselang=en and its usage on http://zh.wikipedia.org/wiki/Wikipedia:%E4%B8%8A%E4%BC%A0 .
Comment 6 Siddhartha Ghai 2012-11-01 11:19:05 UTC
(In reply to comment #4)
> Does this only affect the fallback as shown on MediaWiki-namespace subpages, or
> the underlying system for the actual interfaces as well?

Its the underlying system for the actual interface. See the first link in the original report for an example.
Comment 7 Matt Walker 2013-01-16 08:07:45 UTC
Siddhartha -- I'm not sure if this patch entirely solves the issue you're reporting, but it seems like it might go some way.

Re bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=1495
https://gerrit.wikimedia.org/r/#/c/44224/1

Because I'm not totally sure if this will completely solve what you're reporting I'll leave this open.

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


Navigation
Links