MediaWiki语言扩展包
MediaWiki语言扩展包(MLEB)是一个为MediaWiki扩展提供多语言功能的策划组。
其尝试以一种简易方式为MediaWiki提供全方位语言支持。
扩展概述
当前版本的MLEB包含以下扩展: [1]
- Babel
- CLDR ("Common Locale Data Repository")
- CleanChanges
- Translate
- UniversalLanguageSelector
MLEB在新的MediaWiki发布后每半年发布一次,并且仅支持最新的MediaWiki版本。 软件测试了MediaWiki最近的发行版本,因此如果你使用最新的每个扩展的开发版本,你能避免大多数的技术难题的发生。
启用
Universal Language Selector 是必不可少的,因为它为任何用户提供了一项基本功能,无论他们说多少语言:语言选择,字体支持 用于显示常见操作系统严重支持的脚本,以及用于键入不使用拉丁字母的语言的输入法。 它包含免费授权字体,其中包含大多数的美洲、欧洲、中东、印度和东南亚的专业字体。
在没有Translate项目的条件下,在一个wiki项目中维护多语内容是一团糟。 他被用于维基媒体基金会,KDE,维基翻译项目和其他网站。
Clean Changes extension 使您最近的更改页面免受翻译活动和其他混乱的影响。
不要错过练习生疏语言技能的机会:使用 Babel 扩展程序 标记您说的语言,并在您的 wiki 中找到其他说相同语言的人。 最后,cldr扩展 是一个语言和国家/地区译文数据库。
发行说明和下载
Latest release
2024.07
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2024.07.tar.bz2
- sha256sum: 81d2232577f8309cf3335073464f7c5be3c38b3703a858eac17061cca20daf2e
- Signature: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2024.07.tar.bz2.asc
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.41.0 and requires PHP >= 7.4.0 or above.
Highlights
- As per discussion on phab:T356847 this is the last release to support MediaWiki 1.41 and MediaWiki 1.42. Moving forward, MLEB will be released semi-annually after the new MediaWiki release and will only support the latest MediaWiki version.
- Support has been dropped for MediaWiki 1.40. MLEB 2024.07 supports >= MediaWiki 1.41.
2024.04
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2024.04.tar.bz2
- sha256sum: 743753d6f743e270b49465e534eceb557839095fc0a160ea6c8323a33a9017fb
- Signature: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2024.04.tar.bz2.asc
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.40.0 and requires PHP >= 7.4.0 or above.
Highlights
- We're planning to make changes to how and when we release MLEB. You can read more about it on phab:T356847 and leave your comments.
Previous releases
2024.01
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2024.01.tar.bz2
- sha256sum: 7f6f39a85aeb6f297b38c50b535e9d5e0d91bb3c0417eee1c53c0e68205658b1
- Signature: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2024.01.tar.bz2.asc
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.40.0 and requires PHP >= 7.4.0 or above.
Highlights
- MediaWiki Language Extension Bundle 2024.01 no longer supports MediaWiki 1.39 and requires MediaWiki 1.40 or above.
- The hook
Translate:GettextFFS:headerFields
has been deprecated, useTranslate:GettextFormat:headerFields
instead.
2023.12
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.12.tar.bz2
- sha256sum: 48fec7b74612592424a6e4ebc57723bd77dc42e9699b2f22f1907cbf846d5b99
- Signature: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.12.tar.bz2.asc
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.39.0 and requires PHP >= 7.4.0 or above.
Highlights
- Translate extension: Fix broken Special:SpecialPages for MediaWiki 1.40, and 1.39 (工單T351959).
2023.10
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.10.tar.bz2
- sha256sum: 8b3f356014f1bfdf8c08ec8778c200f1e25567c210d1ee93ba7b7e3f894947ab
- Signature: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.10.tar.bz2.asc
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.39.0 and requires PHP >= 7.4.0 or above.
Highlights
- Translate extension: Removed
mirrors
option when providing configuration for translation memory.
2023.07
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.07.tar.bz2
- sha256sum: c39c9d969255808a628e9fe2a9a2eceefd14ee5d3d0ef8d1fd1a4765804ad896
- Signature: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.07.tar.bz2.asc
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.39.0 and requires PHP >= 7.4.0 or above.
Highlights
- This release of MLEB now requires MediaWiki >= 1.39
2023.04
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.04.tar.bz2
- sha256sum: c39c9d969255808a628e9fe2a9a2eceefd14ee5d3d0ef8d1fd1a4765804ad896
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.38.0 and requires PHP >= 7.4.0 or above.
Highlights
- This is the last release of MLEB supporting MediaWiki >= 1.38
2023.01
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2023.01.tar.bz2
- sha256sum: 47dac8f27c363fb03ac2dfab023e45fa6cae9a5a03c4271961052bdf0b5aa497
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.38 and requires PHP 7.4 or above.
Highlights
- MLEB now requires PHP >= 7.4 and MediaWiki >= 1.38
2022.10
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2022.10.tar.bz2
- sha256sum: c1cc1667de38a2b27fd0e43024f1c94bee5d58952fda8eabb43346d5ce4b7199
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.37.2 and requires PHP 7.3.19 or above.
Highlights
- [SECURITY] Translate: Adds missing block checks to various pages and API (工單T302479, Gerrit change 838940)
- This will be the last MLEB release supporting PHP 7.3 and MediaWiki 1.37
2022.07
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2022.07.tar.bz2
- sha256sum: 3e8f48643403946fdb55f3ff086ed1e702c0367f3282c9dc78eb6785964c0809
- Announcement
- Release notes
- Compatible with MediaWiki 1.37.2 or later and requires PHP 7.3.19 or above.
LocalisationUpdate
- LocalisationUpdate extension is removed from MediaWiki Language Extension Bundle. Please read the announcement.
Translate
- Support for MediaWiki 1.36 has been dropped.
- Avoid recreation of translation pages on bulk deletion of pages, for example when using the Nuke extension. (工單T291724, Gerrit change 799383)
- Fix "Impossible to mark pages for translation using the mobile site". (工單T311631, Gerrit change 809970)
2022.04
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2022.04.tar.bz2
- sha256sum: a5ef23339730ec80422d60c31ece1fb696397f6be90fbe9fbf703cc9ddbf5527
- Announcement
- Release notes
- Compatible with MediaWiki >= 1.36.4 < 1.37 or MediaWiki >= 1.37.2 and requires PHP 7.3.19 or above.
LocalisationUpdate
- We're planning to sunset the LocalisationUpdate extension from version 2022.07. Please read the announcement.
Translate
- If you are using translation memory with ElasticSearch backend, we recommend rebuilding the translation memory index. This can be done by running
php <path_to_mediawiki_core>/extensions/Translate/scripts/ttmserver-export.php
使用 Git 下载
在您的扩展目录中执行以下操作以获取或更新到最新版本,并按照下面的配置说明进行操作。
for ext in Babel cldr CleanChanges Translate UniversalLanguageSelector
do
if [ ! -d "$ext" ]
then
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/$ext.git
fi
cd $ext; git fetch --tags; git checkout 2024.04; cd ..
done
Installation
Installation requirements
Installation requirements of each piece of provided software are included in the respective documentation. See in particular the installation requirements.
Add/update your LocalSettings.php
Near the end of LocalSettings.php, you have to place this configuration:
wfLoadExtension( 'Babel' );
wfLoadExtension( 'cldr' );
wfLoadExtension( 'CleanChanges' );
$wgCCTrailerFilter = true;
$wgCCUserFilter = false;
$wgDefaultUserOptions['usenewrc'] = 1;
wfLoadExtension( 'Translate' );
$wgGroupPermissions['user']['translate'] = true;
$wgGroupPermissions['user']['translate-messagereview'] = true;
$wgGroupPermissions['user']['translate-groupreview'] = true;
$wgGroupPermissions['user']['translate-import'] = true;
$wgGroupPermissions['sysop']['pagetranslation'] = true;
$wgGroupPermissions['sysop']['translate-manage'] = true;
$wgTranslateDocumentationLanguageCode = 'qqq';
$wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages
wfLoadExtension( 'UniversalLanguageSelector' );
Update database tables
Command line
In the directory where your LocalSettings.php is located, run the following command:
php maintenance/update.php
Web browser
Go to example.com/mediawiki/mw-config/ (see Manual:Upgrading#Web browser) by using your domain and path and rerun install.
Configuring and using extensions
See the respective extension documentation pages.
- https://www.mediawiki.org/wiki/Extension:Babel
- https://www.mediawiki.org/wiki/Extension:CLDR
- https://www.mediawiki.org/wiki/Extension:CleanChanges
- https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector
- https://www.mediawiki.org/wiki/Help:Extension:Translate
背景
MLEB不用于特定版本的项目分支。 它是来自master的快照,经验证在MLEB发布时可以与最新的MediaWiki版本一起使用。
MLEB 版本是使用名为 Melange 的工具创建的。 如果您对该代码感兴趣(例如,您想更改其代码),请参阅 Git 中的 Melange 存储库。 我们可能会放弃对PHP的EOL版本的支持,但将为我们支持的每个MediaWiki版本至少提供一个兼容版本。
参考资料
- ↑ 從2022.07发行版本起,LocalisationUpdate 不再是MLEB的一部分。