Skip to content

Instantly share code, notes, and snippets.

@xyzz
Created October 5, 2013 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xyzz/d2d9a9e286912f3649a0 to your computer and use it in GitHub Desktop.
Save xyzz/d2d9a9e286912f3649a0 to your computer and use it in GitHub Desktop.
from sys import argv
from translate.storage import factory
first = argv[1]
second = argv[2]
firststore = factory.getobject(first)
secondstore = factory.getobject(second)
i = 0
for x in firststore.units:
if not x.isheader():
x.target = x.source
x.source = secondstore.units[i].source
i += 1
print(firststore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment