Add support for JSON i18n files
authorRoan Kattouw <roan.kattouw@gmail.com>
Tue, 17 Dec 2013 09:50:16 +0000 (10:50 +0100)
committerRoan Kattouw <roan.kattouw@gmail.com>
Fri, 20 Dec 2013 13:34:06 +0000 (14:34 +0100)
commit6380e81cd0c2dcfe387f2fcc8646a3ab1165b57d
tree42021f1336b180e248d9b770ae2a9fd188b7a290
parent38427bf5781a211dca97fa246667ffeed3173829
Add support for JSON i18n files

Implementation for https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format

Add $wgExtensionMessagesDirs, which tracks the directory
(or directories) where each extension stores it's JSON i18n files.
In this commit only support for messages is implemented, but adding
support for other i18n variables (e.g. magic words) is easy to do later.

To be backwards compatible, an extension can specify both
$wgExtensionMessagesFiles and $wgExtensionMessagesDirs. Older versions
of MediaWiki will just work, and newer versions will use the JSON files
while ignoring the PHP file (except if the PHP file contains non-message
data like magic words).

Misc changes:
* Updated mergeMessageFileList.php to output both
  $wgExtensionMessagesFiles and $wgExtensionMessagesDirs

Change-Id: I8d137e15e1670880a9847263e6ce796c62a4670d
includes/DefaultSettings.php
includes/cache/LocalisationCache.php
maintenance/mergeMessageFileList.php