Mở rộng: Nội dung dịch
Trạng thái phát hành: ổn định |
|
|---|---|
| Triển khai | Giao diện người dùng, Tác vụ trang |
| Mô tả | Công cụ cho phép các biên tập viên dịch bài từ một ngôn ngữ sang ngôn ngữ khác với sự hỗ trợ của máy dịch và các tiện ích dịch khác. |
| Tác giả | Language team |
| Chính sách tương thích | Snapshots releases along with MediaWiki. Master is not backward compatible. |
| MediaWiki | 1.37+ |
| PHP | 7.2+ |
| Database changes | Có |
| Composer | mediawiki/content-translation |
| Virtual domain | virtual-cx |
|
|
|
|
| Licence | GNU General Public License 2.0 or later |
| Tải xuống | |
| Translate the ContentTranslation extension if it is available at translatewiki.net | |
| Phản hồi | Open tasks · Báo cáo lỗi |
Tiện ích mở rộng "ContentTranslation" là một công cụ cho phép biên tập viên dịch bài từ một ngôn ngữ này sang một ngôn ngữ khác với sự hỗ trợ của máy dịch và những tiện ích dịch khác. Xem Biên dịch nội dung/V2 để biết thêm thông tin chi tiết. Tiện ích mở rộng này đang được phát triển bởi đội ngũ kỹ thuật ngôn ngữ của Wikimedia
Cài đặt
- Download and move the extracted
ContentTranslationfolder 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/ContentTranslation
- Only when installing from git, Chạy Composer để cài đặt các phần phụ thuộc PHP, bằng cách cung cấp
composer install --no-devtrong thư mục phần mở rộng. (Xem T173141 để biết các xung đột có thể xảy ra.) - Thêm mã sau vào dưới cùng tệp $LocalSettings của bạn:
wfLoadExtension( 'ContentTranslation' );
- Chạy mã cập nhật mà sẽ tự động tạo các bảng cơ sở dữ liệu mà phần mở rộng này cần.
Xong – Chuyển tới Special:Versiontrên wiki của bạn để xác nhận phần mở rộng được cài đặt thành công.
Vagrant installation:
- Nếu sử dụng Vagrant, cài đặt bằng
vagrant roles enable contenttranslation --provision
Máy chủ của tiện ích "Content Translation
Việc mở rộng cần máy chủ dịch thuật nội dung (tên gọi là cxserver) hoạt động.
Xem Content translation/cxserver/Setup để thiết lập máy chủ dịch nội dung.
Khi chạy Content Translation tại địa phương, những gì sau đây có thể được thêm vào LocalSettings.php để sử dụng máy chủ sản xuất:
$wgContentTranslationSiteTemplates['cx'] = 'https://cxserver.wikimedia.org/v1';
Phụ thuộc tùy chọn
ContentTranslation phụ thuộc vào các phần mở rộng sau:
| UniversalLanguageSelector | Required | |
| VisualEditor | Required | Cần cho phần chỉnh sửa. |
| Cite | Required | Cần nếu bạn muốn hỗ trợ tham chiếu trong khi dịch. |
| WikimediaMessages | Required | |
| GuidedTour | Optional | Nếu được cài đặt, nó sẽ được sử dụng để hiển thị một lời giải thích về việc di chuyển một trang ra khỏi không gian người dùng. |
| Echo | Optional | Nếu được cài đặt, nó sẽ được sử dụng để hiển thị thông báo "chúc mừng" sau khi hoàn thành các bước quan trọng trong dịch. |
| Wikibase | Optional | Nếu được cài đặt và cấu hình tương tự như Wikipedia, nó sẽ được sử dụng để tự động thêm các liên kết giữa các ngôn ngữ (như liên kết trang web). |
| EventLogging | Optional | Nếu được cài đặt, có thể được sử dụng để ghi nhật ký xuất bản, lỗi và các sự kiện khác. |
| BetaFeatures | Optional | Nếu được cài đặt, ContentTranslation sẽ xuất hiện như một tính năng beta trong preferences. |
Tham số cấu hình
| This section is currently a draft. Material may not yet be complete, information may presently be omitted, and certain parts of the content may be subject to radical, rapid alteration. More information pertaining to this may be available on the talk page. |
Để biết danh sách đầy đủ và các mặc định, xem extension.json trong kho nguồn.
| ContentTranslationDomainCodeMapping | Used to map between non-standard language codes and actual domains. The default is the same as in Wikipedia codes and domains. |
| ContentTranslationSiteTemplates | Templates for essential URLs. The defaults assume Wikipedia, so this variable must be configured differently for other sites. Where relevant, $1 is replaced by the language code, and $2 is replaced by the page title. |
| ContentTranslationTranslateInTarget | Whether to open Special:ContentTranslation in the target wiki when clicking the button in the entry point. The domain will be based on $wgContentTranslationSiteTemplates. The default is to open Special:ContentTranslation on the same wiki. (For Wikipedia this is set to true.) |
| ContentTranslationAsBetaFeature | Whether ContentTranslation is a beta feature. |
| ContentTranslationTargetNamespace | The default target namespace for published articles. The default is Main. |
| ContentTranslationCampaigns | Campaigns that are available in the URL as valid values for the campaign parameter in the URL. This allows automatic enabling of the beta feature and event logging. |
| ContentTranslationCXServerAuth | CXServer connection configuration. |
| ContentTranslationEnableSuggestions | Whether to use the suggestions tab and automatic suggestions. This needs the GapFinder API. This is false by default, but true in Wikipedia. |
| RecommendToolAPIURL | The URL for the GapFinder API, needed if ContentTranslationEnableSuggestions is true. |
Url parameters
Dịch nội dung chủ yếu hoạt động trên trang đặc biệt Special:ContentTranslation. Các tham số URL là
- page: source title
- targettitle: target title
- from: source language
- to: target language
- campaign: campaign name
- In Wikimedia wikis, if content translation is not enabled in the user settings then only links to pre-defined campaign will work. Campaigns are defined in InitialiseSettings.php
wmgContentTranslationCampaignsvariable.
- In Wikimedia wikis, if content translation is not enabled in the user settings then only links to pre-defined campaign will work. Campaigns are defined in InitialiseSettings.php
Ví dụ
Xem thêm
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
| This page or project is maintained by Wikimedia Language engineering.
Get help: |
- Stable extensions/vi
- User interface extensions/vi
- Page action extensions/vi
- Extensions supporting Composer/vi
- BeforeCreateEchoEvent extensions/vi
- BeforePageDisplay extensions/vi
- ChangeTagsListActive extensions/vi
- ContributeCards extensions/vi
- EchoGetBundleRules extensions/vi
- EditPage::showEditForm:initial extensions/vi
- GetBetaFeaturePreferences extensions/vi
- GetPreferences extensions/vi
- ListDefinedTags extensions/vi
- LoadExtensionSchemaUpdates extensions/vi
- ResourceLoaderRegisterModules extensions/vi
- SaveUserOptions extensions/vi
- SectionTranslationBeforePublish extensions/vi
- SkinAfterContent extensions/vi
- SpecialContributionsBeforeMainOutput extensions/vi
- GPL licensed extensions/vi
- Extensions in Wikimedia version control/vi
- All extensions/vi
- Extensions requiring Composer with git/vi
- Extensions used on Wikimedia/vi
- WYSIWYG extensions/vi
- Localisation extensions/vi
- Language Engineering/vi
- Content Translation/vi
