ชุดส่วนขยายภาษามีเดียวิกิ
ชุดส่วนขยายภาษามีเดียวิกิ (MLEB) คือชุดส่วนขยายมีเดียวิกิที่ดูแลจัดการอย่างดีซึ่งนำเสนอคุณลักษณะหลายภาษา
พยายามจัดหาวิธีง่าย ๆ ในการสนับสนุนภาษาอย่างครอบคลุมไปยังมีเดียวิกิ
ภาพรวมของส่วนขยาย
MLEB เวอร์ชันปัจจุบันมีส่วนขยายหกรายการ:
- Babel
- CLDR ("Common Locale Data Repository")
- CleanChanges
- LocalisationUpdate
- Translate
- UniversalLanguageSelector
MLEB มีกำหนดการเผยแพร่รายไตรมาส ดังนั้นคุณจึงไม่พลาดทุกความเคลื่อนไหวด้วยการสนับสนุนภาษาที่ปรับปรุงอย่างต่อเนื่อง บันเดิลได้รับการทดสอบเทียบกับเวอร์ชันล่าสุดของมีเดียวิกิ ดังนั้นคุณจึงสามารถหลีกเลี่ยงการหยุดชั่วคราวส่วนใหญ่ที่จะเกิดขึ้นหากคุณใช้เวอร์ชันการพัฒนาล่าสุดของแต่ละส่วนขยาย
แรงจูงใจ
ตัวเลือกภาษาสากล เป็นสิ่งที่ต้องมีเพราะมันมีฟังก์ชั่นที่จำเป็นสำหรับผู้ใช้ใด ๆ โดยไม่คำนึงถึงจำนวนภาษาที่พวกเขาพูด: การเลือกภาษา, การสนับสนุนแบบอักษร สำหรับการแสดงสคริปต์ที่รองรับไม่ดีโดยระบบปฏิบัติการทั่วไปและ วิธีการป้อนข้อมูล สำหรับการพิมพ์ภาษาที่ไม่ใช้ตัวอักษรละติน ประกอบด้วยฟอนต์ลิขสิทธิ์ฟรี ซึ่งครอบคลุมภาษาหลักส่วนใหญ่ในอเมริกา ยุโรป ตะวันออกกลาง อินเดีย และเอเชียตะวันออกเฉียงใต้
การดูแลรักษาเนื้อหาหลายภาษาในวิกิเป็นเรื่องยุ่งเหยิงหากไม่มีส่วนขยาย การแปล ซึ่งใช้โดยมูลนิธิวิกิมีเดีย, KDE, translatewiki.net และไซต์อื่น ๆ ด้วย Localisation Update ผู้ใช้ของคุณจะได้รับการแปลล่าสุดที่สดใหม่เสมอเสมือนเพิ่งออกจากเตาอบ ส่วนขยาย Clean Changes ช่วยให้หน้าการเปลี่ยนแปลงล่าสุดของคุณไม่กระจัดกระจายจากกิจกรรมการแปลและความยุ่งเหยิงอื่นๆ
อย่าพลาดโอกาสในการฝึกฝนทักษะทางภาษาที่ล้าสมัย: ใช้ Babel extension เพื่อทำเครื่องหมายภาษาที่คุณพูดและค้นหาผู้พูดภาษาเดียวกันคนอื่น ๆ ในวิกิของคุณ และสุดท้าย cldr extension คือฐานข้อมูลของการแปลภาษาและประเทศ
บันทึกประจำรุ่นและดาวน์โหลด
Latest release
2022.04
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2022.04.tar.bz2
- sha256sum: a5ef23339730ec80422d60c31ece1fb696397f6be90fbe9fbf703cc9ddbf5527 [1]
- 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
Previous releases
2022.01
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2022.01.tar.bz2
- sha256sum: 0cb434980b399f7bac42a92c9f171b6c9041cb998e3b2b0fcf16daf58c43fe61 [1]
- Announcement
- Release notes
- Compatible with MediaWiki 1.36 or above and requires PHP 7.3.19 or above.
Translate
- Breaking change: Remove backward compatibility for MW <= 1.35 (task T298788, Gerrit change 752166)
UniversalLanguageSelector
- Remove backward compatibility for MW <= 1.35
2021.12
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.12.tar.bz2
- sha256sum: 61c9c7a700c9f98c6b3c59adf2f0fc7d1919fc87e0c3584308d313536dd81f37 [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.35.3 or above and requires PHP 7.3.19 or above.
Translate
- Fix broken SpecialMovePage on MediaWiki 1.35 (Phab:T296450)
2021.11
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.11.tar.bz2
- sha256sum: 07e697bfed3ef153c421a760221e93f0e3fef70a8db54defd59c4608b4d56352 [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.35.3 or above and requires PHP 7.3.19 or above.
Translate
- Fix compatibility with MediaWiki <= 1.37 when VisualEditor is installed. (Phab:T294605)
2021.10
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.10.tar.bz2
- sha256sum: ce923b2a661e3a97ec8f0add9eb9369637e02cbb70a47b80a1e50f3e8c0001d6 [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.35.3 or above and requires PHP 7.3.19 or above.
Translate
- SECURITY: Allow revdel-related actions in translatable pages (Gerrit)
- BREAKING CHANGES
- Export script: remove
--hours
(Gerrit) - Remove translation aids customization (Hook:
TranslateTranslationAids
) (Gerrit) - Remove
$wgTranslateDelayedMessageIndexRebuild
(Gerrit) - Remove
getConfiguration
andgetFFS
from MessageGroup (Gerrit) - Group configuration: Rename validator keymatch option to include (Gerrit)
- Export script: remove
UniversalLanguageSelector
- SECURITY: Language name search: Avoid searching for very long search keys (Gerrit, Phabricator)
- Improve support for the new Vector Skin.
- Remove configuration
ULSEnableAnon
(Gerrit) - Add support for multiple ULS buttons (Gerrit)
2021.07
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.07.tar.bz2
- sha256sum: f7cd8113c095375be51464429dff04c8fa5bb88bc22ba3d780bf5698668e52c5 [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.35 or above and requires PHP 7.2 or above.
Translate
- SECURITY: Enhance validation and logging for AggregateGroups API deletions (task T282932)
- BREAKING CHANGES
- Translate extension now requires MediaWiki 1.35 or above.
- Remove TranslateMessageGroupPathVariables hook (Gerrit change 701678)
- Remove Validator and LegacyValidatorAdapter (Gerrit change 685438)
Configuration variable changes
To address voice and tone issues in the Translate extension (task T277965) the following configuration variable names have been renamed:
TranslateBlacklist
→TranslateDisabledTargetLanguages
TranslateAuthorBlacklist
→TranslateAuthorExclusionList
TranslateCheckBlacklist
→TranslateValidationExclusionFile
The old variables will be supported for MLEB 2021.07 release but removed in the MLEB 2021.10 release.
If you have defined message groups defined with LANGUAGE
attributes, whitelist/blacklist
have been changed to include/exclude
UniversalLanguageSelector
- BREAKING CHANGE: UniversalLanguageSelector extension now requires MediaWiki 1.35 or above.
- MODERN VECTOR:
- Position language menu below language button. (task T276248)
- Fix "ULS settings window can’t be opened with the preferences link on new Vector". (task T282956)
2021.06
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.06.tar.bz2
- sha256sum: 09e16a44f09103637ebd97a69bc96a8ad657cf6748ec7f859532be7270dc40fb [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.34 or above and requires PHP 7.2 or above.
- Bug fix release.
Translate
- Fix metadata handling for translatable page moves and deletions. (task T282905)
- Restore suggested languages to compact languages button. (task T282037)
2021.04
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.04.tar.bz2
- sha256sum: 652b7838b4c87fba80ca46ebd15a106bf3fd4e9cc202417de6ee3ad33d2a8048 [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.34 and above and requires PHP 7.2 or above.
Translate
- Consider translated optional messages towards meeting the export threshold (task T159122)
- Do not lock pages indefinitely during translatable page moves (Gerrit change 661125)
- Limit pages that can be moved from the UI to 500 by default. (task T277431)
- This can be modified by updating the configuration:
$wgTranslatePageMoveLimit
- This can be modified by updating the configuration:
- Namespace for classes under the
src/
folder has been changed to:MediaWiki\Extension\Translate
instead of:MediaWiki\Extensions\Translate
.class_alias
has been used to ensure existing functionality and cached data does not break. The alias will be removed in the next MLEB release.
UniversalLanguageSelector
- Ensure ULS supports modern Vector (task T273232,task T273928)
2021.01
- Download: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.01.tar.bz2
- sha256sum: 4360572704369e5c1f02ab9df831dd0a6258cbcbae28c61c3c4a551347000b00 [1]
- Announcement and Release Notes
- Compatible with MediaWiki 1.34 and above and requires PHP 7.2 or above.
Translate
- Add script to find unsynchronized definitions (Gerrit change 655860)
- Various improvements to the transaction export.php script
- Add a script to find and delete equal translations (Gerrit change 652543)
- GoogleTranslateWebService: Add Chinese codes to code map (Gerrit change 649652)
- Convert Special:ManageMessageGroups to OOUI (Gerrit change 647670)
- Insertables have been moved to the src/TranslatorInterface/Insertable folder (Gerrit change 644460)
- Stop hiding page heading on pages other than Special:Translate (Gerrit change 644514)
- Drop non-array based configuration support for Insertables (Gerrit change 644464)
UniversalLanguageSelector
- Remove FCFontFinder (Gerrit change 641189)
- Bump group loader cache version to re-trigger re-caching of groups (Gerrit change 644843)
- Remove Gettext post processing support from export.php script (Gerrit change 641385)
- Improve handling of opening links to new tab/window for compact language links (Gerrit change 639474)
- Allow skins to register their own button and disable compact language links (task T264824)
กำลังดาวน์โหลดด้วย Git
ในไดเรกทอรีส่วนขยายของคุณ ให้ทำดังต่อไปนี้เพื่อรับหรืออัปเดตเป็นรุ่นล่าสุด และทำตามคำแนะนำการกำหนดค่าด้านล่าง
for ext in Babel cldr CleanChanges LocalisationUpdate 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 2022.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( 'LocalisationUpdate' );
$wgLocalisationUpdateDirectory = "$IP/cache";
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. Do note that LocalisationUpdate does nothing by default and needs additional configuration to be run periodically.
- 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:LocalisationUpdate
- https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector
- https://www.mediawiki.org/wiki/Help:Extension:Translate
ภูมิหลัง
MLEB ไม่ได้ใช้ส่วนขยายเฉพาะรุ่น เป็นสแนปชอตจากต้นแบบซึ่งได้รับการตรวจสอบแล้วว่าสามารถทำงานร่วมกับมีเดียวิกิรุ่นที่ระบุได้ ซึ่งหมายความว่าส่วนขยาย MLEB ทั้งหมดต้องเป็นไปตามนโยบายความเข้ากันได้ของการสนับสนุนมีเดียวิกิที่เสถียรล่าสุดสองรุ่นในสาขาหลัก
MLEB รีลีสถูกสร้างขึ้นด้วยเครื่องมือที่เรียกว่า Melange หากคุณสนใจรหัสนั้น (เช่น คุณต้องการเปลี่ยนรหัส) ให้ดูที่เก็บ Melange ใน Git