[FIX] base: keep first multiline translation in po file
The first term of a po file is a comment for translator e.g.: msgid "" msgstr "" "Project-Id-Version: openobject-addons\n" ... This comment is ignored if there is no source and it is the first term of the po file. The first flage was disabled too late and if the following terms also started with an empty source (for too long terms), they were skipped as well. Disable the flag as soon as the condition is evaluated to make sure no additional terms are ignored. opw 619786
This commit is contained in:
parent
84b5bf94bd
commit
2f5a7b63d3
|
@ -345,6 +345,7 @@ class TinyPoFile(object):
|
|||
source = unquote(line[6:])
|
||||
line = self.lines.pop(0).strip()
|
||||
if not source and self.first:
|
||||
self.first = False
|
||||
# if the source is "" and it's the first msgid, it's the special
|
||||
# msgstr with the informations about the traduction and the
|
||||
# traductor; we skip it
|
||||
|
@ -374,8 +375,6 @@ class TinyPoFile(object):
|
|||
if t == trans_type == 'code': continue
|
||||
self.extra_lines.append((t, n, r, source, trad, comments))
|
||||
|
||||
self.first = False
|
||||
|
||||
if name is None:
|
||||
if not fuzzy:
|
||||
self.warn('Missing "#:" formated comment at line %d for the following source:\n\t%s',
|
||||
|
|
Loading…
Reference in New Issue