Page MenuHomePhabricator

i18n overrides to messages for a family of sites (e.g. all Wikipedias or all Wiktionaries)
Closed, DeclinedPublic

Description

In some cases, a message needs to be different for all languages wikis in a certain family. For instance, all Wikipedias might use 'article', while all Wiktionaries would use 'entry'.

If the order (highest precedence to lowest) was:

Local wiki
Family overrides
Code

that could solve this issue.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz62940

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:52 AM
bzimport set Reference to bz62940.
bzimport added a subscriber: Unknown Object (MLST).

This should be relatively easy to implement with https://gerrit.wikimedia.org/r/#/c/98078/

Create a new i18n file in WikimediaMessages extension called i18n/wikipedia/en.json

Add a new variable to InitializeSettings, something like wmgUseWikipediaMessages. Set it true for Wikipedias. (Or make it generic like wmgSiteSpecificMessages.)

In CommonSettings, if that variable is set, add a hook similar to the one in the linked commit, but adapted for JSON and perhaps with additional performance tweaks if needed.

Thanks.

Done at https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FGettingStarted.git/9be5988183fd7ef4a7e36423ef55876043510ccc/Hooks.php#L473 and https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FGettingStarted.git/9be5988183fd7ef4a7e36423ef55876043510ccc/GettingStarted.php#L447 a while back.

Currently it only has custom behavior for Wikipedia, but it can be done for further families.

It's not a general solution, but I'm not planning on implementing a general one right now, so marking WORKSFORME. If you think there should be a general one, reopen.