Erweiterung:LocalisationUpdate

This page is a translated version of the page Extension:LocalisationUpdate and the translation is 13% complete.
Diese Erweiterung ist üblicherweise in MediaWiki 1.21 und darüber enthalten. Daher muss sie nicht erneut heruntergeladen werden. Allerdings müssen die folgenden Anweisungen trotzdem beachtet werden.
MediaWiki-Erweiterungen
OOjs UI icon advanced-invert.svg
LocalisationUpdate
Freigabestatus: stabil
Einbindung Datenbank
Beschreibung Ermöglicht es, die ortsbezogenen Nachrichten so aktuell wie möglich zu halten
Autor(en) Tom Maaswinkel (12wiki), Niklas Laxström (maintainer)
Letzte Version 1.4.0 (2016-10-13)
Kompatibilitätspolitik Master maintains backward compatibility.
MediaWiki 1.30+
Lizenz GNU General Public License 2.0 oder später
Herunterladen Included in Language Extension Bundle

Readme
Beispiel Wikipedia
  • $wgLocalisationUpdateRepository
  • $wgLocalisationUpdateDirectory
  • $wgLocalisationUpdateHttpRequestOptions
  • $wgLocalisationUpdateRepositories
Übersetze die LocalisationUpdate-Erweiterung, wenn sie auf translatewiki.net verfügbar ist

Prüfe die Benutzungs- und Versionsmatrix.

Probleme Offene Aufgaben · Einen Fehler melden

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

Installation

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens LocalisationUpdate im Ordner extensions/ ablegen.
  • Folgenden Code am Ende der LocalSettings.php hinzufügen:
    wfLoadExtension( 'LocalisationUpdate' );
    $wgLocalisationUpdateDirectory = "$IP/cache";
    
  • Create a cache folder in the installation directory, and be sure the server has permissions to write on it.
  •   Erledigt – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.

Konfiguration

$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 know what you're doing. This is added with version 1.1.

Example for using github

$wgLocalisationUpdateRepositories['github'] = array(
	'mediawiki' =>
		'https://raw.github.com/wikimedia/mediawiki/master/%PATH%',
	'extension' =>
		'https://raw.github.com/wikimedia/mediawiki-extensions-%NAME%/master/%PATH%',
	'skin' =>
		'https://raw.github.com/wikimedia/mediawiki-skins-%NAME%/master/%PATH%'
);

Example for local filesystem configuration

$wgLocalisationUpdateRepositories['local'] = array(
	'mediawiki' =>
		'file:///resources/projects/mediawiki/master/%PATH%',
	'extension' =>
		'file:///resources/projects/mediawiki-extensions/extensions/%NAME%/%PATH%',
	'skin' =>
		'file:///resources/projects/mediawiki-skins/skins/%NAME%/%PATH%'
);

$wgLocalisationUpdateHttpRequestOptions

MediaWiki Version:
1.35

Options to pass to Http::get(). Possible keys for the array: (see HttpRequestFactory::create()).

timeout
Timeout length in seconds or 'default'
connectTimeout
Timeout for connection, in seconds (curl only) or 'default'
postData
An array of key-value pairs or a url-encoded form data
proxy
The proxy to use. Otherwise it will use $wgHTTPProxy (if set) Otherwise it will use the environment variable "http_proxy" (if set)
noProxy
Don't use any proxy at all. Takes precedence over proxy value(s).
sslVerifyHost
Verify hostname against certificate
sslVerifyCert
Verify SSL certificate
caInfo
Provide CA information
maxRedirects
Maximum number of redirects to follow (defaults to 5)
followRedirects
Whether to follow redirects (defaults to false). Note: this should only be used when the target URL is trusted, to avoid attacks on intranet services accessible by HTTP.
userAgent
A user agent, if you want to override the default MediaWiki/$wgVersion
logger
A \Psr\Logger\LoggerInterface instance for debug logging
username
Username for HTTP Basic Authentication
password
Password for HTTP Basic Authentication
originalRequest
Information about the original request (as a WebRequest object or an associative array with 'ip' and 'userAgent').

Example for using GitHub with HTTP Basic Authentication

$wgLocalisationUpdateHttpRequestOptions = array(
	'followRedirects' => true,
	'username' => 'YOUR_GITHUB_USERNAME',
	'password' => 'YOUR_GITHUB_PERSONAL_ACCESS_TOKEN'
);

Verwendung

Whenever you want to run an update, run php extensions/LocalisationUpdate/update.php on the command line, or set up a cron job.

LocalisationUpdate does not update translations automatically

If you are on a unix-like system, you should add LocalisationUpdate to crontab:

crontab -e
# Add the following line
@daily php /path/to/your/wiki/extensions/LocalisationUpdate/update.php --quiet
If localization updates don't seem to come through, you may need to run php maintenance/rebuildLocalisationCache.php --force.

Script parameters

--repoid: Fetch translations from repositories identified by this

Siehe auch