wxWidgets/wxPython/distrib/makemo.py
Kevin Ollivier 9347ef2f59 Script for building mo locale files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-12-16 17:37:05 +00:00

17 lines
408 B
Python

import sys, os, glob
from distutils.dep_util import newer
from distutils.spawn import spawn
poFiles = glob.glob("*.po")
for po in poFiles:
mo = os.path.splitext(po)[0] + '.mo'
if mo != 'wxstd.mo':
if newer(po, mo):
cmd = 'msgfmt --verbose -o %s %s' % (mo, po)
print cmd
spawn(cmd.split())
print
else:
print "%s is up to date" % mo