Page MenuHomePhabricator

Mustache renderer needs to support i18n
Closed, ResolvedPublic


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 [ | Milkshake ] library somehow.

See the following solution, for the Flow extension:

10:10 < ejegg> Flow uses extensions via lightncandy to do their i18n:

Event Timeline

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.

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

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

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