Translating:Command line scripts

Translate extension has many command line scripts which facilitate heavy processing that is not possible trough the web interface. Each script has a  switch that shows the exact syntax and supported parameters. This page is an overview of the purpose of each script. These scripts can be found at. If the Translate extension is installed into nonstandard location, you must define  environment variable that points to root of the MediaWiki installation.


 * export.php and autoexport.php
 * export.php is the most important script for most setups. It allows exporting translated messages into filesystem. The output path structure and file formats vary between different message groups. autoexport.php scans for recent changes in last N hours and outputs export statements for those changes. Both scripts have --threshold parameter, which takes a completion percentage. Languages which have less than the given percentage of messages translated in a group are ignored. This switch increases the export time considerably.


 * poimport.php
 * This is a command line variant of Special:ImportTranslations, which can be used to import large changes in one go.


 * fuzzy.php
 * This script is used to mark translated outdated = fuzzying. It takes a message name and fuzzies all translations. It's the only way for old-style message groups and can also be used with new-style message groups.


 * groupStatistics.php
 * This command line script can be used to create almost any kind of completion statistics table. Special:LanguageStats shows the percentages for all groups in one language, but with this script you can make table with completion percentages in all languages for one ore more message groups. You need an another script to import the script output into MediaWiki.


 * sync-group.php
 * For old-style message groups which do not have web interface, this is the script which looks for changes and imports them into the wiki. It can also be used with new-style message groups.


 * tm-export.php
 * When installing a translation memory from translate toolkit, you need first to create an empty translation memory database file. Then run this script to populate it with translation already made. Hooks in the extension will take care of adding new translation into the translation memory database.


 * createMessageIndex.php
 * This script creates a mapping from each message key to the groups it belongs to. This information is used in many places, for example in the statistics features. This script needs to run after list of message keys in a group changes. It is triggered automatically only in few places yet.