Last modified: 2013-01-16 08:07:45 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}}
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
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.
(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.
Does this only affect the fallback as shown on MediaWiki-namespace subpages, or the underlying system for the actual interfaces as well?
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 .
(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.
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.