Translate Toolkit & Pootle

Tools to help you make your software local

User Tools

Merging and versioncontrol

Bug #434 asks for moving some functionality from Pootle to the translate toolkit.

Specifically it is about merging and versioncontrol.

The following functions are just suggestions for the new interface for merging/versioncontrol. Please change or discuss them here or on the translate-devel mailing list. Thanks!


merge_items(base_items, new_items)

This function could be based upon pootlefile.mergefile and pootlefile.mergeitem.

base_items and new_items are lists of pounit or xliffunit.

The function should return the list of conflicting items from new_items. The caller could turn them into suggestions afterwards, if this is what he wants.


This function updates a local file by merging changes from the repository. It should handle po files and xliff files.

vcs_update(file, direction, allow_suggestions)

direction determines, if the file from the version control repository should override local changes or the other way around.

allow_suggestions defines, if conflicting changes should be turned into suggestions.


Commit a file to the version control repository.

vcs_commit(file, comment, author)

For now this would be done without a previous “update” (mimicking the current behaviour). Later we chould do an update before (including merging) to avoid conflicts with the repository (e.g. for svn).