Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (13 sloc) 484 Bytes
#!/usr/bin/env python
import os, sys, glob
def cmd(x):
return os.popen(x, "r").read().strip()
potfiles = cmd("find . -name *.pot -print0").split("\0")
if not potfiles:
print("echo 'Nothing to do.'")
exit()
for potfile in potfiles:
pofiles = glob.glob(potfile.replace("template/" + os.path.basename(potfile), "*.po"))
for pofile in pofiles:
print("msgmerge -U %s %s" % (pofile, potfile))
#os.system("msgmerge -U %s %s" % (pofile, potfile))