comparison MoinMoin/i18n/msgfmt.py @ 3003:f54c41b3b7ce

fixed fuzzy state bug in msgfmt.py code (this killed non-fuzzy, valid translations in some cases!) (port from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Jan 2008 18:31:47 +0100
parents 01f05e74aa9c
children
comparison
equal deleted inserted replaced
3002:702d72f11b95 3003:f54c41b3b7ce
21 -V 21 -V
22 --version 22 --version
23 Display version information and exit. 23 Display version information and exit.
24 24
25 Written by Martin v. L÷wis <loewis@informatik.hu-berlin.de>, 25 Written by Martin v. L÷wis <loewis@informatik.hu-berlin.de>,
26 refactored by Thomas Waldmann <tw AT waldmann-edv DOT de>. 26 refactored / fixed by Thomas Waldmann <tw AT waldmann-edv DOT de>.
27 """ 27 """
28 28
29 import sys, os 29 import sys, os
30 import getopt, struct, array 30 import getopt, struct, array
31 31
32 __version__ = "1.2" 32 __version__ = "1.3"
33 33
34 class SyntaxErrorException(Exception): 34 class SyntaxErrorException(Exception):
35 """raised when having trouble parsing the po file content""" 35 """raised when having trouble parsing the po file content"""
36 pass 36 pass
37 37
78 continue 78 continue
79 # Now we are in a msgid section, output previous section 79 # Now we are in a msgid section, output previous section
80 if line.startswith('msgid'): 80 if line.startswith('msgid'):
81 if section == STR: 81 if section == STR:
82 self.add(msgid, msgstr, fuzzy) 82 self.add(msgid, msgstr, fuzzy)
83 fuzzy = False
83 section = ID 84 section = ID
84 line = line[5:] 85 line = line[5:]
85 msgid = msgstr = '' 86 msgid = msgstr = ''
86 # Now we are in a msgstr section 87 # Now we are in a msgstr section
87 elif line.startswith('msgstr'): 88 elif line.startswith('msgstr'):