Extension:LocalisationUpdate
|
LocalisationUpdate Release status: stable |
|||
|---|---|---|---|
| Implementation | Database | ||
| Description | Extension to keep the localized messages as up to date as possible | ||
| Author(s) | Tom Maaswinkel (12wiki), Niklas Laxström (maintainer) | ||
| Last version | 1.0 | ||
| MediaWiki | 1.19+ | ||
| License | GPL v2 or later | ||
| Download | Included in Language Extension Bundle Readme First |
||
| Example | Wikipedia | ||
|
|||
| Check usage and version matrix | |||
Contents |
What does this extension do [edit]
This extension can update the localizations for MediaWiki messages at any time, without needing to upgrade the MediaWiki software.
Download [edit]
You can download the extension directly from the MediaWiki source code repository (browse code). You can get:
- One of the extensions tags
Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag
- Go to the tags list
- Click the name of the tag you want to download
- Click "snapshot"
- The latest version of one of the extensions branches
Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.
- Go to the branches list
- Click the branch name
- Click "snapshot"
- A snapshot made during the release of a MediaWiki version.
This might be unstable and is not guaranteed to work with the associated MediaWiki version.
After you've got the code, save it into the extensions/LocalisationUpdate directory of your wiki.
If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:
cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LocalisationUpdate.git
Installation [edit]
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.
Configuration [edit]
$wgLocalisationUpdateDirectory [edit]
Directory to store cache files in, if not set then it uses $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.
$wgLocalisationUpdateCoreURL, $wgLocalisationUpdateExtensionURL [edit]
Parameterized URLs to the repositories from which to retrieve localizations for core MediaWiki and extensions. They can be a http:// URL or an absolute path within the file system. They default to the MediaWiki Git repository and you should not change this unless you're using this performance improvement or otherwise know what you're doing.
$wgLocalisationUpdateRetryAttempts [edit]
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).
Running an update [edit]
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.
Improve performance with a local checkout [edit]
| IMPORTANT: The content of this page is outdated. If you have checked or updated this page and found the content to be suitable, please remove this notice. |
Update this section: The SVN repositories do no longer contain the current code. Change commands to point to the Git repositories and use a Git client instead of an SVN client.
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
See also [edit]
- Localisation
- Technical details about how this runs on Wikimedia projects.
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |