blender/po/update_mo.py

18 lines
372 B
Python
Raw Normal View History

#!/usr/bin/python
#update all mo files in the LANGS
import os
LOCALE_DIR="../release/bin/.blender/locale"
2011-07-25 17:05:43 +00:00
PO_DIR = "."
DOMAIN = "blender"
2011-07-25 17:05:43 +00:00
for po in os.listdir( PO_DIR ):
if po.endswith(".po"):
lang = po[:-3]
# show stats
cmd = "msgfmt --statistics %s.po -o %s/%s/LC_MESSAGES/%s.mo" % ( lang, LOCALE_DIR, lang, DOMAIN )
print cmd
os.system( cmd )