Fix a bug reported by AI0867.

This commit is contained in:
Eric S. Raymond 2008-09-02 15:50:24 +00:00
parent 711a6e853a
commit 881e5e3ff6

View file

@ -507,7 +507,7 @@ def sanity_check(filename, lines):
if not has_tr_mark:
print '"%s", line %d: %s needs translation mark' \
% (filename, i+1, key)
lines[i] = lines[i].replace(value, "_ " + value)
lines[i] = lines[i].replace('=', "=_ ")
nv = sentence_end.sub(" ", value)
if nv != value:
print '"%s", line %d: double space after sentence end' \
@ -783,8 +783,10 @@ def translator(filename, mapxforms, textxform):
refname = line[line.find("{"):line.rfind("}")]
# Ignore all-caps macro arguments.
if refname == refname.upper():
refname = None
if 'mask=' in line and refname and not refname.endswith(".mask"):
print \
'"%s", line %d: warning, correctness of %s cannot be checked' \
% (filename, lineno+1, refname)
elif 'mask=' in line and not refname.endswith(".mask"):
print \
'"%s", line %d: fatal error, mask file without .mask extension (%s)' \
% (filename, lineno+1, refname)