aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-03-20 19:58:54 +0000
committerFilip Komar <filip@mageia.org>2014-03-20 19:58:54 +0000
commitf024d013f324b1107c8dede38b1ef9609acd6d55 (patch)
tree4608993dab880b0289bf3d4bff11f55353d20196 /tools
parent30b8f575b1bdff653908830d9fda6f07641a2d7b (diff)
downloadwww-f024d013f324b1107c8dede38b1ef9609acd6d55.tar
www-f024d013f324b1107c8dede38b1ef9609acd6d55.tar.gz
www-f024d013f324b1107c8dede38b1ef9609acd6d55.tar.bz2
www-f024d013f324b1107c8dede38b1ef9609acd6d55.tar.xz
www-f024d013f324b1107c8dede38b1ef9609acd6d55.zip
added some useful debuging lines
Diffstat (limited to 'tools')
-rw-r--r--tools/translated_converter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/translated_converter.py b/tools/translated_converter.py
index c670b6c3f..76fcd9cd6 100644
--- a/tools/translated_converter.py
+++ b/tools/translated_converter.py
@@ -49,6 +49,7 @@ def po_append(message_id, message_str, langfile):
file_mask = filename + '.*.lang'
for langfile in glob.glob(file_mask):
+# print langfile # useful for debuging
nofilename = langfile.replace(filename + '.','')
language = nofilename.replace('.lang','')
#open lang file
@@ -84,13 +85,16 @@ for langfile in glob.glob(file_mask):
# Strip '# ' from comments
message_comment = message_comment.lstrip('# ')
message_id, message_str = message_text.split('\n',1)
+# print message_id # useful for debuging
po_append(message_id, message_str, langfile)
messagetemplate='\n\n;.*?\n\n'
mpattern=re.compile(messagetemplate,re.DOTALL)
for mblock in mpattern.findall(text):
message_id, message_str = mblock.strip('\n').split('\n',1)
+# print message_id # useful for debuging
po_append(message_id, message_str, langfile)
if text[0] == ';':
message_id, message_str = text.partition('\n\n')[0].strip('\n').split('\n',1)
+# print message_id # useful for debuging
po_append(message_id, message_str, langfile)
po.save(filename + '.po')