Last modified: 2014-09-05 00:43:33 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 T64940, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62940 - i18n overrides to messages for a family of sites (e.g. all Wikipedias or all Wiktionaries)
i18n overrides to messages for a family of sites (e.g. all Wikipedias or all ...
Status: RESOLVED WORKSFORME
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-21 21:54 UTC by Matthew Flaschen
Modified: 2014-09-05 00:43 UTC (History)
7 users (show)

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


Attachments

Description Matthew Flaschen 2014-03-21 21:54:43 UTC
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.
Comment 1 Niklas Laxström 2014-03-22 09:39:37 UTC
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.
Comment 2 Matthew Flaschen 2014-09-05 00:43:33 UTC
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.

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


Navigation
Links