Last modified: 2012-08-22 23:18:17 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 T28342, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26342 - Tutorial language should use the usual language fallback mechanisms
Tutorial language should use the usual language fallback mechanisms
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
: 38807 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-15 11:03 UTC by Neil Kandalgaonkar
Modified: 2012-08-22 23:18 UTC (History)
10 users (show)

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


Attachments

Description Neil Kandalgaonkar 2010-12-15 11:03:55 UTC
In UploadWizardTutorial, the method of obtaining the localized tutorial file is overly naive; if the exact language is not available it shows an apology and error.

However, there are fallbacks mechanisms for dialects that are well known within MediaWiki code (for instance en-gb can fall back to en without much difficulty).

Since the fallbacks can sometimes involve trying multiple dialects, and looking up the existence of a file can be potentially time-consuming, the mapping of a language dialect to the best available tutorial may need to be cached.
Comment 1 Niklas Laxström 2010-12-15 11:12:13 UTC
Let's not talk about dialects, since it's confusing and misleading. The concept is fallback languages in MediaWiki, which can with little effort be extracted (it's a reverse tree with all paths ending in the root node 'en').

It's a wholly different question how to get the messages in the correct language. Again, MediaWiki already does it automatically, but I don't which method (=way of doing) you are using.
Comment 2 Neil Kandalgaonkar 2010-12-15 11:21:14 UTC
The tutorial images are created manually. Guillaume extracted all the strings into translatewiki, and then when entire languages were done he created SVG files with those strings, and from there PNG files. It's probably not feasible to do such translation automatically as there are always things to massage.

So, we have a few options, I guess.

We could create aliases? redirects? copies? of a tutorial image for every language for which is was appropriate. That seems wrong to me.

The other way to is to do a lookup of some kind when the UploadWizard page is fetched. In other words, chopping off parts of the language code recursively, checking for the existence of files, and finally substituing 'en' when all else fails.

Or maybe there's a standard way to do this for localized images?
Comment 3 Niklas Laxström 2010-12-15 11:27:47 UTC
We can walk the fallback chain until image in that languages exists. You just have to decide which is the place to do that.
Comment 4 Bugmeister Bot 2011-08-19 19:12:35 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 5 Saibo 2012-01-13 02:38:31 UTC
Yeay, this bug is one year old! Do something (raised form "enhancement" (wtf... that is a bug) to normal) with this.
Could have saved be some time (the answer below) and some time for the chinese user to report...


from [[:commons:Commons:Upload_Wizard_feedback#.E4.B8.8D.E8.83.BD.E6.98.BE.E7.A4.BA.E4.B8.AD.E6.96.87]]

== 不能显示中文 ==

<small>User agent: Mozilla/5.0 (iPad; U; CPU OS 4_3 like Mac OS X; zh-cn) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F191 Safari/6533.18.5</small>

明明有图片[[:File:Licensing tutorial zh-hans.svg]]的,怎么不能显示中文教程呢? [[User:一个|一个]] ([[User talk:一个|<span class="signature-talk">talk</span>]]) 08:53, 10 January 2012 (UTC)

:@Eloquence: Apparently a i18n error (don't know where this need to be corrected... you know: off-wiki...) [//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&uselang=zh-cn zh-cn] version errors and loads the english tutorial as a fallback. As the user tells us the zh-hans tutorial would be okay. Note: this fallback was also done in [[MediaWiki:RotateRequest.js]]: one class: "zh, zh-hans, zh-cn, zh-my, zh-sg", another class: "zh-hant, zh-hk, zh-mo, zh-tw". Note2: the tutorial is available in [[:File:Licensing tutorial zh-hans.svg|zh-hans]] and [[:File:Licensing tutorial zh-hant.svg|zh-hant]].
:Similar fail for [//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&uselang=de-at de-at]. Displays the English tutorial instead of the proper fallback to "de". Cheers --[[User:Saibo|Saibo]]&nbsp;([[User talk:Saibo|<small>Δ</small>]]) 14:41, 10 January 2012 (UTC)
Comment 6 Saibo 2012-01-13 03:17:11 UTC
Probably we could just create onwiki redirects - but that is not really the solution. A simple fallback at least for the xx-yy languages should be done (like in RotateRequest.js). Not that hard.
Comment 7 Mark Holmquist 2012-07-30 16:03:58 UTC
*** Bug 38807 has been marked as a duplicate of this bug. ***
Comment 8 Maarten Dammers 2012-07-30 20:11:22 UTC
What about solving this server side in MediaWiki? MediaWiki is pretty good at all this i18n fallback things.

Api call: Please give me the tutorial for language de-at in campaign wlm-nl. It would go down the usual de-at -> de -> en chain and return the first success.
Comment 9 Liangent 2012-08-10 11:21:52 UTC
Gerrit change #18461

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


Navigation
Links