User:APatro (WMF)/Move translatable bundles across wiki

At times it maybe necessary to move translatable pages and message bundles across different wikis. This can be done via multiple approaches:


 * Through maintenance scripts

Maintenance script
There are two scripts that can be used to export a translatable bundle from 1 wiki and then import it to another wiki.

Exporting
To export the translatable bundle, run the export script on the wiki where the translatable bundle exists. This will create a file, that can be then used for import on the target wiki.

The script expects the following parameters:
 * - Name of the translatable page to export
 * - Name and path to save the export file to
 * - (Optional) Include talk pages
 * - (Optional) Include subpages.

Importing
The file exported can then be imported into another wiki by running the import script:

The script expects the following parameters:
 * Path to the exported XML file
 * - Name of the user performing the import
 * - Prefix to apply to unknown (and possibly also known) usernames
 * - (Optional) Whether to apply the prefix to usernames that exist locally
 * - (Optional) Comment added to the log for the import.

Limitation

 * This only tags the translation, but does not mark the page for translation. That has to be done manually
 * History / Revisions from the source wiki are not imported to the target wiki.
 * For translatable pages, metadata such as priority languages are not exported / imported. Please add them when marking the page for translation.