Skip to content

Commit

Permalink
repair
Browse files Browse the repository at this point in the history
  • Loading branch information
ims committed Jul 7, 2012
1 parent b71eb3d commit 3a8d0bd
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions setup_translate.py
Expand Up @@ -5,7 +5,6 @@
import os

class build_trans(cmd.Command):
<<<<<<< HEAD
description = 'Compile .po files into .mo files'
def initialize_options(self):
pass
Expand Down Expand Up @@ -35,35 +34,3 @@ def run(self):
'build': build,
'build_trans': build_trans,
}

=======
description = 'Compile .po files into .mo files'
def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
s = os.path.join('plugin', 'locale')
for lang in os.listdir(s):
lc = os.path.join(s, lang, 'LC_MESSAGES')
if os.path.isdir(lc):
for f in os.listdir(lc):
if f.endswith('.po'):
src = os.path.join(lc, f)
dest = os.path.join(lc, f[:-2] + 'mo')
print "Language compile %s -> %s" % (src, dest)
if os.system("msgfmt '%s' -o '%s'" % (src, dest)) != 0:
raise Exception, "Failed to compile: " + src

class build(_build):
sub_commands = _build.sub_commands + [('build_trans', None)]
def run(self):
_build.run(self)

cmdclass = {
'build': build,
'build_trans': build_trans,
}
>>>>>>> c978ca86978cdc722a3b9e7001f4109dc1640e55

0 comments on commit 3a8d0bd

Please sign in to comment.