Extension:LocalisationUpdate
この機能は、バージョン 1.38 で完全に除去されました。 This extension has been abandoned and thus no longer bundled in MediaWiki 1.38. See task T300498 for more information. |
![]() リリースの状態: 安定 |
|
---|---|
実装 | データベース |
説明 | ローカライズされたメッセージをできるだけ最新に保てるようにする |
作者 | Tom Maaswinkel (12wiki), Niklas Laxström |
最新バージョン | 1.4.0 (2016-10-13) |
MediaWiki | 1.30+ |
Composer | mediawiki/localisation-update |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | Readme |
|
|
Quarterly downloads | 143 (Ranked 66th) |
Public wikis using | 1,809 (Ranked 69th) |
translatewiki.net で翻訳を利用できる場合は、LocalisationUpdate 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
LocalisationUpdate 拡張機能は、MediaWiki ソフトウェアをアップグレードすることなく、MediaWiki のシステム メッセージをいつでも更新できるようにします。
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のLocalisationUpdate
という名前のディレクトリ内に配置します。 - 以下のコードを
LocalSettings.php
の末尾に追加します:wfLoadExtension( 'LocalisationUpdate' ); $wgLocalisationUpdateDirectory = "$IP/cache";
- サーバの書き込み許可があることを確認してから、インストールするディレクトリに
cache
フォルダを作成します。 - 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定
$wgLocalisationUpdateDirectory
キャッシュファイルの保存先。指定しないと既定の$wgCacheDirectory を使用。 LocalisationUpdate には作業用のファイルの保存先が必要です。$wgLocalisationUpdateDirectory も $wgCacheDirectory も未指定の場合、LocalisationUpdate の update.php スクリプトは作動しません。
$wgLocalisationUpdateDirectoryの既定値は false です。
$wgLocalisationUpdateRepository
翻訳を取得する既定のリポジトリ。 GitHub を既定のリポジトリに指定してあります。 バージョン 1.1で追加。
$wgLocalisationUpdateRepositories
MediaWiki コアと拡張機能の地域化(ローカリゼーション)において、取得元となる一連のリポジトリURL。 既定ではGitHub上の MediaWiki Git リポジトリを指し、精通した人以外はこれを変更してはいけません。バージョン 1.1で追加。
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%'
);
ローカルのファイルシステム設定例
$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 バージョン: | ≧ 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'
);
使用法
更新が必要な時は、コマンドラインでphp extensions/LocalisationUpdate/update.php
を実行するか、cron ジョブを設定します。
UNIX型のシステムを使用する場合、以下のように LocalisationUpdate を crontab に追加します。
crontab -e # Add the following line @daily php /path/to/your/wiki/extensions/LocalisationUpdate/update.php --quiet
php maintenance/rebuildLocalisationCache.php --force
の実行が必要かもしれません。
スクリプトのパラメーター
--repoid
: この設定で識別したリポジトリから翻訳を取得
関連項目
- 地域化(多言語への対応)
- Wikimediaプロジェクト群での実行の技術的詳細 Technical details
この拡張機能は以下のパッケージ/ウィキファームに含まれています: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |