Extension:LocalisationUpdate

From MediaWiki.org

Jump to: navigation, search

               

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
LocalisationUpdate

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

Subversion [Help]
Browse source code

Readme First

Example  Wikipedia
Extension (Results)
1.13.5 1.14.0 trunk
r50786
MediaWiki 1.13.5 - - No
1.14.0 - - No
trunk
r50605
- - Yes
Configure Not currently supported.
MediaWiki Testing

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.

  1. Checkout MediaWiki core and extension from SVN with:
    cd /path/to/my/checkout
    svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3
    svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions
  2. Set $wgLocalisationUpdateSVNURL = '/path/to/my/checkout'; in LocalSettings.php
  3. Make sure that you run svn up /path/to/my/checkout/{phase3,extensions} before updating LocalisationUpdate