diff options
Diffstat (limited to 'websites')
-rw-r--r-- | websites/langpo.py | 6 | ||||
-rw-r--r-- | websites/translated_converter.py | 2 |
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) |