Magento Translator Assistant
Mta aims to make development of Magento translations easier & faster. Mta supports:
- Merge localizations (apply translations from one to another)
- Generating patch (for example, containing all untranslated phrases or phrases by template)
- Applying patch to localization
You need Java to use mta. To run mta in Linux You may use shell script: mta.sh. In Windows: java -jar mta.jar
Merge Translations
-merge -from [path] -to [path]
This operation added translation, founded in one translation, to all untranslated phrases in another translation. Merge will be useful, for example, when You want to use all previously translated phrases from another translation. Translations not tied to modules. If a same phrase has several translations, translation will be chosen accidentally.
Example: -merge -from ../ru_RU1/ -to ../ru_RU2/
Generate Patch
This operation generates csv file, containing pairs based on chosen criteria.
Patch format
Csv file (same format as in Magento module csv translation), contains original phrase in frist column & translation in second. Translation may be null.
Generate patch with all untranslated phrases
-generate -file [output_file] -localization [path] -untranslated
Generated patch contains all untranslated phrases, include partially translated phrases (same phrases, translated in module A, but not translated in module B)
Example: -generate -file out.csv -localization ../ru_RU/ -untranslated
Generate patch based on translation template
-generate -file [output_file] -localization [path] -template [template]
Patch file includes phrase, if translation for it contains selected template. Case ignored.
Example: -generate -file out.csv -localization ../ru_RU/ -template продукт
Apply Patch
This command applied previously generated (or generated by hand) patch to Magento translation. You may choose politics of applying patch phrases to translation. If there is no translation for the phrase in patch row, row ignored.
Apply patch only for untranslated phrases: -patch -file [patch] -localization [path] -untranslated
Apply patch to all phrases: -patch -file [patch] -localization [path] -all
Example: -patch -file patch.csv -localization ../ru_RU/ -all