[meld] build_helpers: Attempt at building translations, but still not working
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] build_helpers: Attempt at building translations, but still not working
- Date: Fri, 21 Mar 2014 23:25:54 +0000 (UTC)
commit ec50d19f5ea4dc9d9614334f0312326d803fa0a5
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Mar 22 08:18:24 2014 +1000
build_helpers: Attempt at building translations, but still not working
intltool is the current blocker here, and it requires a more complete
build environment that we currently assume.
meld/build_helpers.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/meld/build_helpers.py b/meld/build_helpers.py
index 0ebceb7..87cbe44 100644
--- a/meld/build_helpers.py
+++ b/meld/build_helpers.py
@@ -219,6 +219,13 @@ class build_i18n(distutils.cmd.Command):
elif os.path.isfile(linguas_file):
selected_languages = open(linguas_file).read().split()
+ # If we're on Windows, assume we're building frozen and make a bunch
+ # of insane assumptions.
+ if os.name == 'nt':
+ msgfmt = "C:\\Python27\\Tools\\i18n\\msgfmt"
+ else:
+ msgfmt = "msgfmt"
+
# Update po(t) files and print a report
# We have to change the working dir to the po dir for intltool
cmd = ["intltool-update", (self.merge_po and "-r" or "-p"), "-g", self.domain]
@@ -235,7 +242,7 @@ class build_i18n(distutils.cmd.Command):
mo_file = os.path.join(mo_dir, "%s.mo" % self.domain)
if not os.path.exists(mo_dir):
os.makedirs(mo_dir)
- cmd = ["msgfmt", po_file, "-o", mo_file]
+ cmd = [msgfmt, po_file, "-o", mo_file]
po_mtime = os.path.getmtime(po_file)
mo_mtime = os.path.exists(mo_file) and os.path.getmtime(mo_file) or 0
if po_mtime > max_po_mtime:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]