aboutsummaryrefslogtreecommitdiffstats
path: root/websites
diff options
context:
space:
mode:
authorYuri Chornoivan <yurchor@mageia.org>2013-06-03 05:43:31 +0000
committerYuri Chornoivan <yurchor@mageia.org>2013-06-03 05:43:31 +0000
commitf79d61c6c1e95540f298ea3dea5fdb7d3c8018b0 (patch)
tree4826cfa5ee6cef2d0a0895368dd6f4a8fee041f7 /websites
parentd018ee777ac09e79a2889c7c152c24a1af633edf (diff)
downloadtools-f79d61c6c1e95540f298ea3dea5fdb7d3c8018b0.tar
tools-f79d61c6c1e95540f298ea3dea5fdb7d3c8018b0.tar.gz
tools-f79d61c6c1e95540f298ea3dea5fdb7d3c8018b0.tar.bz2
tools-f79d61c6c1e95540f298ea3dea5fdb7d3c8018b0.tar.xz
tools-f79d61c6c1e95540f298ea3dea5fdb7d3c8018b0.zip
Fix exception in index.en.lang (additional comments)
Diffstat (limited to 'websites')
-rw-r--r--websites/langpo.py6
-rw-r--r--websites/translated_converter.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/websites/langpo.py b/websites/langpo.py
index 9e036e44..39deb978 100644
--- a/websites/langpo.py
+++ b/websites/langpo.py
@@ -25,7 +25,7 @@ for o,a in opts:
directory = directory.rstrip('/')
if (directory != '') and (os.path.isdir(directory) == False):
- sys.exit('Specified directory does not exixst')
+ sys.exit('Specified directory does not exist')
for langfile in glob.glob(os.path.join(directory, '*.en.lang')):
langfiledir = langfile.replace('.en.lang', '')
@@ -61,9 +61,9 @@ for langfile in glob.glob(os.path.join(directory, '*.en.lang')):
mpattern=re.compile(messagetemplate,re.DOTALL)
for mblock in mpattern.findall(text):
mblock_stripped = mblock.strip('\n')
- message_comment, message_text = mblock.strip('\n').split('\n',1)
+ message_comment, message_text = mblock.strip('\n').split('\n;',1)
# Strip '# ' from comments
- message_comment = message_comment.lstrip('# ')
+ message_comment = message_comment.lstrip('# ').replace('\n# ',' Comment: ')
message_id, message_str = message_text.split('\n',1)
# Strip ';' from msgid
message_id = message_id.lstrip(';')
diff --git a/websites/translated_converter.py b/websites/translated_converter.py
index e2e833ff..21978163 100644
--- a/websites/translated_converter.py
+++ b/websites/translated_converter.py
@@ -65,7 +65,7 @@ for langfile in glob.glob(file_mask):
mpattern=re.compile(messagetemplate,re.DOTALL)
for mblock in mpattern.findall(text):
mblock_stripped = mblock.strip('\n')
- message_comment, message_text = mblock.strip('\n').split('\n',1)
+ message_comment, message_text = mblock.strip('\n').split('\n;',1)
# Strip '# ' from comments
message_comment = message_comment.lstrip('# ')
message_id, message_str = message_text.split('\n',1)