Last modified: 2014-08-23 01:19:00 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 T71285, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69285 - Expose language fallback chain for user language in JS
Expose language fallback chain for user language in JS
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.24rc
All All
: Normal enhancement (vote)
: 1.24.0 release
Assigned To: Krinkle
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-08 08:50 UTC by Michael M.
Modified: 2014-08-23 01:19 UTC (History)
4 users (show)

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


Attachments

Description Michael M. 2014-08-08 08:50:14 UTC
Currently, there is only wgUserLanguage in the JS for the user language. Many user scripts use it to show the proper localization, but many don't use the correct fallback if localization is missing for that language (in most cases they just fall back to English). Just one example: https://www.wikidata.org/wiki/MediaWiki:Gadget-Merge.js has many localizations, but none for de-at or pfl. The script tries hard to provide good fallbacks, and will use German for de-at, but for pfl it will fall back to English. If the fallback chain (e.g. ['de-at', 'de', 'en'] or ['pfl', 'de', 'en']) would be exposed as JS variable, this would make localization of gadgets and user scripts much easier.
Comment 1 Gerrit Notification Bot 2014-08-09 00:27:31 UTC
Change 153002 had a related patch set uploaded by Bartosz Dziewoński:
[WIP] Expose language fallback chain in JavaScript

https://gerrit.wikimedia.org/r/153002
Comment 2 Bartosz Dziewoński 2014-08-09 00:30:38 UTC
I wrote that patch for now because this seemed interesting :), but I probably won't have time to finish it soon (see commit message for the issues). If anyone wants to pick it up, feel free to.
Comment 3 Nemo 2014-08-09 10:13:13 UTC
(In reply to Bartosz Dziewoński from comment #2)
> I wrote that patch for now because this seemed interesting :)

It is! Thanks.
Comment 4 Gerrit Notification Bot 2014-08-09 14:29:17 UTC
Change 153075 had a related patch set uploaded by Bartosz Dziewoński:
Expose language fallback chain in JavaScript

https://gerrit.wikimedia.org/r/153075
Comment 5 Gerrit Notification Bot 2014-08-22 01:22:58 UTC
Change 153075 merged by jenkins-bot:
mediawiki.language: Expose language fallback chain

https://gerrit.wikimedia.org/r/153075
Comment 6 Gerrit Notification Bot 2014-08-23 01:19:00 UTC
Change 153002 abandoned by Bartosz Dziewoński:
[WIP] Add utility methods for language fallback chain handling in JavaScript

Reason:
Doesn't seem anybody is terribly interested in these. If anyone cares, please pick this up under your own name.

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

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


Navigation
Links