Extension:LocalisationUpdate

From MediaWiki.org
Jump to: navigation, search
This extension is bundled with MediaWiki 1.21 and above. Thus you do not have to download it again.
MediaWiki extensions manual
Crystal Clear action run.png
LocalisationUpdate

Release status: stable

Implementation Database
Description Allows to keep the localized messages as up to date as possible
Author(s) Tom Maaswinkel (12wiki), Niklas Laxström (maintainer)
Latest version 1.2.0 (2014-03-28)
MediaWiki 1.19+
Database changes No
License GPL v2 or later
Download Included in Language Extension Bundle

Readme
Example Wikipedia
Hooks used
MessageNotInMwNs

LocalisationCacheRecache

Translate the LocalisationUpdate extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

The LocalisationUpdate extension allows to update the localizations for MediaWiki messages at any time, without needing to upgrade the MediaWiki software.

Installation[edit | edit source]

  • Download and extract the file(s) in a directory called LocalisationUpdate in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository using:
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LocalisationUpdate.git
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php";
$wgLocalisationUpdateDirectory = "$IP/cache";
  • Create a cache folder in the installation directory, and be sure the server has permissions to write on it.
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Note Note: If localization updates don't seem to come through, you may need to run php maintenance/rebuildLocalisationCache.php --force.

Configuration[edit | edit source]

$wgLocalisationUpdateDirectory

Directory to store cache files in, if not set then it uses default $wgCacheDirectory. LocalisationUpdate requires some place to store files in to work; if neither $wgLocalisationUpdateDirectory nor $wgCacheDirectory is set, LocalisationUpdate's update.php script will not work.

$wgLocalisationUpdateDirectory is set to false by default.

$wgLocalisationUpdateRepository

Default repository source to fetch translation. Github is set to default repository. This is added with version 1.1.

$wgLocalisationUpdateRepositories

Array of repositories URLs from which to retrieve localisations for core MediaWiki and extensions. Default is set to Github's MediaWiki Git repositories and you should not change this unless you're using this performance improvement or otherwise know what you're doing. This is added with version 1.1.

Usage[edit | edit source]

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 setup a cron job yourself.

Script parameters[edit | edit source]

With version 1.1,

--repoid: Fetch translations from repositories identified by this

Known issues[edit | edit source]

If you enable this extension directly from the web installer, it doesn't configure the $wgLocalisationUpdateDirectory variable, so if you don't configure it explicitly, it would throw an exception when viewing any page (bug 46885). You must manually configure that variable after installing the extension.

See also[edit | edit source]


Language: English  • 日本語