Difference between revisions of "Wiki Translation Infrastructure"
Tag: Rollback |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | <languages/> | ||
{{TOC right}} | {{TOC right}} | ||
− | The Mudlet Wiki uses a set of extensions to enable translation of the wiki contents. The MediaWiki Language Extension Bundle provides all the tools needed to make translations directly on the wiki. However, Mudlet makes use of Crowdin to translate texts throughout the Mudlet project. This page describes the infrastructure that was built to enable translations from Crowdin. | + | <translate> |
+ | <!--T:1--> | ||
+ | The Mudlet Wiki uses a set of extensions to enable translation of the wiki contents. The MediaWiki Language Extension Bundle provides all the tools needed to make translations directly on the wiki. However, Mudlet makes use of Crowdin to translate texts throughout the Mudlet project. This page describes the infrastructure that was built to enable translations from Crowdin.</translate> | ||
− | == How it Works == | + | == <translate><!--T:2--> How it Works</translate> == |
+ | <translate><!--T:3--> | ||
Simply put, every day at 1:00 AM UTC the mudlet.org server runs some tasks to import translations from Crowdin and export existing sources from the Wiki. | Simply put, every day at 1:00 AM UTC the mudlet.org server runs some tasks to import translations from Crowdin and export existing sources from the Wiki. | ||
The sources are extracted from the English version of any page that is ready for translation. The sources are uploaded after importing translations has finished. | The sources are extracted from the English version of any page that is ready for translation. The sources are uploaded after importing translations has finished. | ||
+ | <!--T:4--> | ||
Translations can only be made once the source is uploaded, so this method may cause a delay. | Translations can only be made once the source is uploaded, so this method may cause a delay. | ||
+ | <!--T:5--> | ||
Translations can be made on the wiki. Sources and translations can be manually exported from the wiki using either the [[Special:ExportTranslations|Export Translations]] page, or by using the web tool described in "Forcing Updates" section. | Translations can be made on the wiki. Sources and translations can be manually exported from the wiki using either the [[Special:ExportTranslations|Export Translations]] page, or by using the web tool described in "Forcing Updates" section. | ||
+ | <!--T:6--> | ||
Sources and Translations can be uploaded to Crowdin manually, provided they are exported from the wiki using the "Export for off-line translation" option. | Sources and Translations can be uploaded to Crowdin manually, provided they are exported from the wiki using the "Export for off-line translation" option. | ||
+ | <!--T:7--> | ||
Do note, some page titles contain colon <code>:</code> characters and those must be replaced with equals sign <code>=</code> characters before uploading to Crowdin! | Do note, some page titles contain colon <code>:</code> characters and those must be replaced with equals sign <code>=</code> characters before uploading to Crowdin! | ||
− | All the scripts required | + | <!--T:8--> |
+ | All the scripts required are located in <code>/var/www/i18n/</code> and <code>/var/www/wiki/</code> on the server. The update task is scheduled via the service user's crontab.</translate> | ||
+ | == <translate><!--T:9--> How to Use</translate> == | ||
− | + | <translate><!--T:10--> | |
− | |||
To enable a page for translations, a wiki admin or moderator first needs to [[Special:PagePreparation|Prepare for Translation]] the desired page(s). The preparation adds some initial markup to review and help them get started. | To enable a page for translations, a wiki admin or moderator first needs to [[Special:PagePreparation|Prepare for Translation]] the desired page(s). The preparation adds some initial markup to review and help them get started. | ||
+ | <!--T:11--> | ||
Once a page is prepared, they can edit the Translation Markup to better suit translation needs, or prune out Wikitext for translators where possible. | Once a page is prepared, they can edit the Translation Markup to better suit translation needs, or prune out Wikitext for translators where possible. | ||
+ | <!--T:12--> | ||
After the page is prepared and the Translate Markup is finished, the pages must be [[Special:PageTranslation|Marked for Translation]] which will list off "translation units" the page created based on its Translate Markup. Be sure to enable translation of the page display title if it is not already enabled! | After the page is prepared and the Translate Markup is finished, the pages must be [[Special:PageTranslation|Marked for Translation]] which will list off "translation units" the page created based on its Translate Markup. Be sure to enable translation of the page display title if it is not already enabled! | ||
+ | <!--T:13--> | ||
With a page properly marked for translation, the imports, exports, and translations can begin. | With a page properly marked for translation, the imports, exports, and translations can begin. | ||
− | Extensive changes to a page may require it to be marked for translation again, to help keep translation units manageable for translators. | + | <!--T:14--> |
+ | Extensive changes to a page may require it to be marked for translation again, to help keep translation units manageable for translators.</translate> | ||
− | == Forcing Updates == | + | == <translate><!--T:15--> Forcing Updates</translate> == |
− | |||
− | You can pass the following | + | <translate><!--T:16--> |
+ | Wiki Translations and Crowdin Sources can be updated manually by using the Wiki Translations update tool found at https://make.mudlet.org/wiki-translations.php | ||
+ | |||
+ | <!--T:17--> | ||
+ | You can pass the following URL Parameters to force specific updates: | ||
* <code>update=all</code> -- Forces both import and export, the same actions as the daily task. | * <code>update=all</code> -- Forces both import and export, the same actions as the daily task. | ||
* <code>update=wiki</code> -- Forces download and import of translations from Crowdin to the Wiki. | * <code>update=wiki</code> -- Forces download and import of translations from Crowdin to the Wiki. | ||
− | * <code>update=crowdin</code> -- Forces export and upload of English source-texts from Wiki to Crowdin. | + | * <code>update=crowdin</code> -- Forces export and upload of English source-texts from Wiki to Crowdin. |
+ | |||
+ | <!--T:18--> | ||
+ | (links aren't added here so bots don't 'click' them) | ||
+ | |||
+ | <!--T:19--> | ||
+ | Manual updates can only be run once within 15 minutes, regardless of the triggered task.</translate> | ||
− | == Helpful Reading == | + | == <translate><!--T:20--> Helpful Reading</translate> == |
+ | |||
+ | <translate> | ||
+ | <!--T:21--> | ||
* [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example Examples for Translation Markup] | * [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example Examples for Translation Markup] | ||
+ | * [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration Page Translation Best Practice] | ||
* [https://www.mediawiki.org/wiki/Help:Extension:Translate Translate Extension] | * [https://www.mediawiki.org/wiki/Help:Extension:Translate Translate Extension] | ||
* [https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle MediaWiki Language Extension Bundle] | * [https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle MediaWiki Language Extension Bundle] | ||
+ | |||
+ | </translate> |
Latest revision as of 06:50, 5 July 2020
The Mudlet Wiki uses a set of extensions to enable translation of the wiki contents. The MediaWiki Language Extension Bundle provides all the tools needed to make translations directly on the wiki. However, Mudlet makes use of Crowdin to translate texts throughout the Mudlet project. This page describes the infrastructure that was built to enable translations from Crowdin.
How it Works
Simply put, every day at 1:00 AM UTC the mudlet.org server runs some tasks to import translations from Crowdin and export existing sources from the Wiki. The sources are extracted from the English version of any page that is ready for translation. The sources are uploaded after importing translations has finished.
Translations can only be made once the source is uploaded, so this method may cause a delay.
Translations can be made on the wiki. Sources and translations can be manually exported from the wiki using either the Export Translations page, or by using the web tool described in "Forcing Updates" section.
Sources and Translations can be uploaded to Crowdin manually, provided they are exported from the wiki using the "Export for off-line translation" option.
Do note, some page titles contain colon :
characters and those must be replaced with equals sign =
characters before uploading to Crowdin!
All the scripts required are located in /var/www/i18n/
and /var/www/wiki/
on the server. The update task is scheduled via the service user's crontab.
How to Use
To enable a page for translations, a wiki admin or moderator first needs to Prepare for Translation the desired page(s). The preparation adds some initial markup to review and help them get started.
Once a page is prepared, they can edit the Translation Markup to better suit translation needs, or prune out Wikitext for translators where possible.
After the page is prepared and the Translate Markup is finished, the pages must be Marked for Translation which will list off "translation units" the page created based on its Translate Markup. Be sure to enable translation of the page display title if it is not already enabled!
With a page properly marked for translation, the imports, exports, and translations can begin.
Extensive changes to a page may require it to be marked for translation again, to help keep translation units manageable for translators.
Forcing Updates
Wiki Translations and Crowdin Sources can be updated manually by using the Wiki Translations update tool found at https://make.mudlet.org/wiki-translations.php
You can pass the following URL Parameters to force specific updates:
update=all
-- Forces both import and export, the same actions as the daily task.update=wiki
-- Forces download and import of translations from Crowdin to the Wiki.update=crowdin
-- Forces export and upload of English source-texts from Wiki to Crowdin.
(links aren't added here so bots don't 'click' them)
Manual updates can only be run once within 15 minutes, regardless of the triggered task.