merge msg script now detects extensions main files
authorAntoine Musso <hashar@free.fr>
Thu, 31 May 2012 10:29:05 +0000 (12:29 +0200)
committerAntoine Musso <hashar@free.fr>
Fri, 6 Jul 2012 18:16:01 +0000 (20:16 +0200)
commitad1609059f1d4e5a1e4a748fd2779837316d1f96
tree33e0c3b6d53bb5c3363b7a8cd0e621351068505c
parent9770c6832cf17c3aab807a9e8328cac861c734ce
merge msg script now detects extensions main files

maintenance/mergeMessageFileList.php is used by `scap` to establish a
list of message files to load. To do that, it read extensions paths from
a manually maintained list: wmf-config/extension-list.

This patch adds an optional automatic detection system to add extension
messages. That will reduce the risk of forgetting to update the
extension-list file and will be of good use on labs.

The new parameter is named --extensions-dir and takes a path holding
MediaWiki extensions. The script will take the directory names there and
attempt to load a file named `Foobar/Foobar.php`. --list-file is still
required, you can skip it using /dev/null.

Synopsis:

php maintenance/mergeMessageFileList.php \
 --list-file /dev/null \
 --extensions-dir /srv/mw-trunk/extensions

Script will bail out whenever an expected PHP file is not found and will
list all of those "missing" files.

Change-Id: I8ab15f899f0333428fd8b2a98c58c07c2fce2962
maintenance/mergeMessageFileList.php