diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-25 09:10:24 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-25 09:10:24 +0200 |
commit | 14faad5c70dd50eb9cf235cef4d5ffe4415da67c (patch) | |
tree | b17632b3ebe295bb06d4c088f5e605eb916aa145 /po/compile.py | |
parent | e544bc24b2552d826ee3d732dee59ea90e9b7e5f (diff) |
Lang: Fixed plural and multiline strings
IssueID #192
Diffstat (limited to 'po/compile.py')
-rwxr-xr-x | po/compile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/po/compile.py b/po/compile.py index 0a0eab91..6416ea0e 100755 --- a/po/compile.py +++ b/po/compile.py | |||
@@ -48,7 +48,6 @@ def parse_po(src): | |||
48 | if msg_id: | 48 | if msg_id: |
49 | messages.append((msg_id, msg_str, msg_index)) | 49 | messages.append((msg_id, msg_str, msg_index)) |
50 | is_multi = False | 50 | is_multi = False |
51 | if len(line) == 0: continue | ||
52 | else: | 51 | else: |
53 | msg_str += unquote(line) | 52 | msg_str += unquote(line) |
54 | if line.startswith('msgid_plural'): | 53 | if line.startswith('msgid_plural'): |
@@ -63,7 +62,7 @@ def parse_po(src): | |||
63 | line = line[9:] | 62 | line = line[9:] |
64 | else: | 63 | else: |
65 | msg_index = None | 64 | msg_index = None |
66 | line = line[7:] | 65 | line = line[6:] |
67 | if line.endswith(' ""'): | 66 | if line.endswith(' ""'): |
68 | is_multi = True | 67 | is_multi = True |
69 | msg_str = '' | 68 | msg_str = '' |
@@ -77,6 +76,7 @@ def parse_po(src): | |||
77 | if not msg_index is None: | 76 | if not msg_index is None: |
78 | msg_id = f'{msg_id[:-1]}{msg_index}' | 77 | msg_id = f'{msg_id[:-1]}{msg_index}' |
79 | pluralized.append((msg_id, msg_str)) | 78 | pluralized.append((msg_id, msg_str)) |
79 | #print(msg_id, '=>', msg_str) | ||
80 | return pluralized | 80 | return pluralized |
81 | 81 | ||
82 | 82 | ||