[Python-apps-commits] r7580 - in packages/openteacher/trunk/debian/patches (1 file)
cjsmo-guest at users.alioth.debian.org
cjsmo-guest at users.alioth.debian.org
Tue Sep 27 05:11:00 UTC 2011
Date: Tuesday, September 27, 2011 @ 05:10:58
Author: cjsmo-guest
Revision: 7580
actually add 02_compile_all_fix.patch
Added:
packages/openteacher/trunk/debian/patches/02_compile_all_fix.patch
Added: packages/openteacher/trunk/debian/patches/02_compile_all_fix.patch
===================================================================
--- packages/openteacher/trunk/debian/patches/02_compile_all_fix.patch (rev 0)
+++ packages/openteacher/trunk/debian/patches/02_compile_all_fix.patch 2011-09-27 05:10:58 UTC (rev 7580)
@@ -0,0 +1,95 @@
+Description: Disable launchpad integration, disable ts and qm regeneration.
+Author: Charlie Smotherman <cjsmo at cableone.net>
+
+Index: openteacher-2.2/compile_all.py
+===================================================================
+--- openteacher-2.2.orig/compile_all.py 2011-09-26 20:48:11.466402137 -0500
++++ openteacher-2.2/compile_all.py 2011-09-26 20:49:55.814402120 -0500
+@@ -10,49 +10,49 @@
+
+ import os
+
+-print "\n\nGenerate new ts-files from po-files\n".upper()
+-for po_name in os.listdir("translations"):
+- if po_name.endswith(".po"):
+- ts_name = po_name[:-3] + ".ts"
+-
+- po_path = os.path.join("translations", po_name)
+- ts_path = os.path.join("translations", ts_name)
+-
+- check_call(["po2ts", po_path, ts_path])
++#print "\n\nGenerate new ts-files from po-files\n".upper()
++#for po_name in os.listdir("translations"):
++# if po_name.endswith(".po"):
++# ts_name = po_name[:-3] + ".ts"
++#
++# po_path = os.path.join("translations", po_name)
++# ts_path = os.path.join("translations", ts_name)
++#
++# check_call(["po2ts", po_path, ts_path])
+ #clean up ts file
+- tree = ElementTree.parse(open(ts_path))
+-
+- for translation in tree.findall("//translation"):
+- translation.text = translation.text.strip()
+- tree.write(ts_path)
+-
++# tree = ElementTree.parse(open(ts_path))
++#
++# for translation in tree.findall("//translation"):
++# translation.text = translation.text.strip()
++# tree.write(ts_path)
++#
+ #Add .ts to bzr
+- check_call(["bzr", "add", ts_path])
+-
+-print "\n\nUpdate translations from source files.\n".upper()
+-check_call("pylupdate4 -noobsolete openteacher.pro".split(" "))
+-
+-print "\n\nConvert ts-files to po-files for launchpad use, and convert them to .qm for runtime use\n".upper()
+-for ts_name in os.listdir("translations"):
+- if ts_name == "translations.ts":
+- check_call(["ts2po", os.path.join("translations", ts_name), "-P",
+- "translations/translations.pot"])
+- elif ts_name.endswith(".ts"):
+- #po conversion
+- po_name = ts_name[:-3] + ".po"
+- qm_name = ts_name[:-3] + ".qm"
+-
+- check_call(["ts2po", os.path.join("translations", ts_name),
+- os.path.join("translations", po_name)])
++# check_call(["bzr", "add", ts_path])
++#
++#print "\n\nUpdate translations from source files.\n".upper()
++#check_call("pylupdate4 -noobsolete openteacher.pro".split(" "))
++#
++#print "\n\nConvert ts-files to po-files for launchpad use, and convert them to .qm for runtime use\n".upper()
++#for ts_name in os.listdir("translations"):
++# if ts_name == "translations.ts":
++# check_call(["ts2po", os.path.join("translations", ts_name), "-P",
++# "translations/translations.pot"])
++# elif ts_name.endswith(".ts"):
++# #po conversion
++# po_name = ts_name[:-3] + ".po"
++# qm_name = ts_name[:-3] + ".qm"
++#
++# check_call(["ts2po", os.path.join("translations", ts_name),
++# os.path.join("translations", po_name)])
+ #Add po file to bzr if not already
+- check_call(["bzr", "add", os.path.join("translations", po_name)])
+-
++# check_call(["bzr", "add", os.path.join("translations", po_name)])
++#
+ #qm conversion
+- check_call(["lrelease", os.path.join("translations", ts_name)])
+-
++# check_call(["lrelease", os.path.join("translations", ts_name)])
++#
+ #Add qm file to bzr if not already
+- check_call(["bzr", "add", os.path.join("translations", qm_name)])
+-
++# check_call(["bzr", "add", os.path.join("translations", qm_name)])
++#
+ print "\n\nCompile application resources\n".upper()
+ check_call("pyrcc4 resources.qrc -o src/resources.py".split(" "))
+
More information about the Python-apps-commits
mailing list