Extension:LocalisationUpdate
From MediaWiki.org
|
Release status: stable |
||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Implementation | Database | |||||||||||||||||||||||||||||||
| Description | Extension to keep the localized messages as up to date as possible | |||||||||||||||||||||||||||||||
| Author(s) | Tom Maaswinkel (TheDevilOnLineTalk) | |||||||||||||||||||||||||||||||
| Last Version | 0.3 | |||||||||||||||||||||||||||||||
| MediaWiki | 1.15 | |||||||||||||||||||||||||||||||
| License | GPL v2 or later | |||||||||||||||||||||||||||||||
| Download | Download snapshot |
|||||||||||||||||||||||||||||||
| Example | Wikipedia | |||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
check usage (experimental) |
||||||||||||||||||||||||||||||||
Contents |
[edit] What does this extension do
This extension can update the localizations for MediaWiki messages at any time, without needing to upgrade the MediaWiki software.
[edit] Installation
Add the following to LocalSettings.php
require_once("$IP/extensions/LocalisationUpdate/LocalisationUpdate.php");
If localization updates don't seem to come through, you may need to run php maintenance/rebuildLocalisationCache.php --force.
[edit] Configuration
[edit] $wgLocalisationUpdateDirectory
Directory to store cache files in, defaults to $wgCacheDirectory. LocalisationUpdate requires some place to store files in to work; if neither $wgLocalisationUpdateDirectory nor $wgCacheDirectory is set, LocalisationUpdate's update.php script will die with an error.
[edit] $wgLocalisationUpdateSVNURL
URL to the SVN repository to get localizations from. Can be a http:// URL or an absolute path within the file system. By default, it points to the MediaWiki SVN repository and you should not change this unless you're using this performance improvement or otherwise know what you're doing.
[edit] $wgLocalisationUpdateRetryAttempts
LocalisationUpdate will retry to get the file contents (after a second) if it couldn't get the contents the first time. With $wgLocalisationUpdateRetryAttempts you can set the amount of attempts the script will make (defaults to 5).
[edit] Running an update
Whenever you want to run an update, run php extensions/LocalisationUpdate/update.php on the command line, or set up a cron job.
NOTE: LocalisationUpdate does not update automatically. If you want to update your localizations regularly, you need to set up a cron job yourself.
[edit] Improve performance with a local checkout
You can make the update script faster by having it grab localizations from a local checkout. This requires that the SVN command line client be installed.
- Checkout MediaWiki core and extension from SVN with:
cd /path/to/my/checkoutsvn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions
- Set
$wgLocalisationUpdateSVNURL = '/path/to/my/checkout';in LocalSettings.php - Make sure that you run
svn up /path/to/my/checkout/{phase3,extensions}before updating LocalisationUpdate