User:KartikMistry/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) |
Latest version | 1.0 |
MediaWiki | 1.19+ |
License | GPL v2 or later |
Download | Included in Language Extension Bundle
Readme |
Example | Wikipedia |
Translate the KartikMistry/Extension:LocalisationUpdate extension if it is available at translatewiki.net |
What does this extension do
editThis extension can update the localizations for MediaWiki messages at any time, without needing to upgrade the MediaWiki software.
Download
editThe extension can be retrieved directly from Git [?]:
- Browse code
- Some extensions have tags for stable releases.
- Browse tags
- Select the tag
- Click "snapshot"
- Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
- Browse branches
- Select a branch name
- Click "Continue"
Extract the snapshot and place it in the extensions/KartikMistry/Extension:LocalisationUpdate/ directory of your MediaWiki installation.
If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/KartikMistry%2FExtension%3ALocalisationUpdate.git
Installation
edit- Download and move the extracted
KartikMistry
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/KartikMistry - Add the following code at the bottom of your LocalSettings.php file:
require_once "$IP/extensions/KartikMistry/KartikMistry.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: If localization updates don't seem to come through, you may need to run php maintenance/rebuildLocalisationCache.php --force
.
Configuration
edit$wgLocalisationUpdateDirectory
editDirectory to store serialized 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
editDefault repository source to fetch translation. Github is set to default repository. This is added with version 1.1.
$wgLocalisationUpdateRepositories
editArray 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.
Running an update
editWhenever 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
editWith version 1.1,
:--repoid: Fetch translations from repositories identified by this
Known issues
editIf 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- Localisation
- Technical details about how this runs on Wikimedia projects.
This skin is being used on one or more Wikimedia projects. This probably means that the skin is stable and works well enough to be used by such high-traffic websites. Look for this skin's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the skins installed on a particular wiki can be seen on the wiki's Special:Version page. |