Iplemented FR in bug #10952, but under the --future switch.

We have a couple of these glitches but can't fix them until after 1.4.
This commit is contained in:
Eric S. Raymond 2008-02-05 19:57:56 +00:00
parent 30e46d21f9
commit 3d0d0a6841

View file

@ -742,9 +742,13 @@ def sanity_check(filename, lines):
has_tr_mark = value.lstrip().startswith("_")
if key == 'role':
present.append(value)
if has_tr_mark and '{' in value:
print '"%s", line %d: macro reference in translatable string'\
% (filename, i+1)
if has_tr_mark:
if '{' in value:
print '"%s", line %d: macro reference in translatable string'\
% (filename, i+1)
if future and re.search("[.!?] ", lines[i]):
print '"%s", line %d: extraneous space in translatable string'\
% (filename, i+1)
# Check correctness of translation marks and descriptions
if key.startswith("#"): # FIXME: parse_attribute is confused.
pass