Page MenuHomePhabricator

Mustache renderer needs to support i18n
Closed, ResolvedPublic

Description

The AstroPay forms will be translated into several languages. We should have MW i18n available, including parameterized messages, plural, and grammar. The obvious way to do this is to use template helper functions.

We're not using the MediaWiki-core renderer yet, so we're free to play with the lightncandy extensions--at the risk of becoming incompatible with future MW-core. Hopefully, we can work out what's needed, and add it to the MW-core templating engine.

Whatever is done should also be compatible with client-side rendering. I assume this will use the [ https://www.mediawiki.org/wiki/Milkshake | Milkshake ] library somehow.

See the following solution, for the Flow extension:

10:10 < ejegg> Flow uses extensions via lightncandy to do their i18n: https://github.com/wikimedia/mediawiki-extensions-Flow/blob/master/includes/TemplateHelper.php#L141

Details

Related Gerrit Patches:
mediawiki/extensions/DonationInterface : masterl10n for mustache

Event Timeline

awight created this task.Apr 24 2015, 5:25 PM
awight assigned this task to pizzzacat.
awight raised the priority of this task from to Medium.
awight updated the task description. (Show Details)
awight added subscribers: pizzzacat, K4-713, gerritbot and 5 others.
Ejegg set Security to None.

To throw an exciting wrench in, we have a special requirement for Fundraising, that we can l10n messages per-country. We currently kludge this in DonationInterface by searching for <msgkey>-<countrycode>, then falling back to plain <msgkey>.

This wouldn't have to be implemented in mw-core, but it would be nice if there were a simple override which would allow us to add the extra layer.

Change 212243 had a related patch set uploaded (by Ejegg):
l10n for mustache

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

Change 212243 merged by jenkins-bot:
l10n for mustache

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

atgo added a subscriber: Ejegg.May 27 2015, 3:16 PM

@Ejegg this one is blocking T97056 - should we put it int he sprint or close it or...?

Ejegg claimed this task.May 27 2015, 5:34 PM

Deployed, can close?

Ejegg added a comment.Jun 30 2015, 6:58 PM

Closing this one, might make another for the goal of extending mw core templating to support helper functions

Ejegg closed this task as Resolved.Jun 30 2015, 6:58 PM
mmodell removed a subscriber: awight.Jun 22 2017, 9:52 PM