Page MenuHomePhabricator

Fix GuidedTour i18n approach
Closed, ResolvedPublic


We need to allow proper GuidedTour localization right away. Even after bug 43143 is fixed, I don't think it's reasonable to ask translators to translate a JS file with English throughout.

We should discuss this. So far, I think the best approach is:

Wrap initGuider so you can pass in message names to use for the description and they will be served by ResourceLoader. (We need to look at how user-defined GuidedTour messages can be served correctly so mw.msg will work, and caching works right).

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:48 AM
bzimport set Reference to bz43144.

This also applies to the title and button text. Even though some tours will be single-wiki, I think there is plenty that applies to every wiki (register, look at the last change in history, edit the sandbox, post on someone's talk page, add an image to an article). The ones that can be should be pre-installed and translated through TranslateWiki so they work out of the box.

We want i18n for built-in tours and user-defined ones to work essentially the same
way. That will allow a local tour to easily be copied to the extension
itself with minimal fuss.

Ori and I talked for a while yesterday, and came up with an idea that
should work for both pre-defined and user tours. Basically, each tour
would have a group of i18n messages with a defined prefix schema. E.g.
MediaWiki:GuidedTour/mytour/othermessage, where mytour is the tour name.
The actual tour would be MediaWiki:GuidedTour/mytour.js, and that would
refer to required messages (message, othermessage) by key.

The pre-defined tours would also fit this naming scheme, but the
messages would be installed by the extension, and should be translatable through TranslateWiki.

This prefix scheme may require hooking into ResourceLoader.

We have decided that on-wiki tours will not be localizable, at least initially, due to technical issues (related to dynamically creating ResourceLoader modules for each tour).

However, I am planning to implement i18n for built-in tours as my next task.

That's merged. I'm marking this as fixed. As stated above, on-wiki tours will not be localizable for now.