Omit textdomain declarations from generated macro reference, fix a typo.

This commit is contained in:
Eric S. Raymond 2007-08-26 13:56:51 +00:00
parent 0c68e2dd90
commit b1b809feed
3 changed files with 7 additions and 3 deletions

View file

@ -10,7 +10,7 @@
# except that it tells the player what the objectives of a scenario are.
#
# For example, we could set the objective for all players to: "survive for
# 3 turns" wuth this:
# 3 turns" with this:
#! {SET_OBJECTIVES 0 "Survive for 3 turns" () ()}
#
[objectives]

View file

@ -151,7 +151,9 @@ class CrossRef:
for (n, line) in enumerate(dfp):
if warnlevel > 1:
print `line`[1:-1]
if line.strip().startswith("#define"):
if line.strip().startswith("#textdomain"):
continue
elif line.strip().startswith("#define"):
tokens = line.split()
name = tokens[1]
here = Reference(filename, n+1, line)

View file

@ -60,7 +60,7 @@ def interpret(lines, css):
inlisting = False
outstr = '<p class="%s">' % css
for line in lines:
line = line.rstrip()
line = line.strip()
if not inlisting and not line:
outstr += "</p><p>"
continue
@ -155,6 +155,8 @@ class CrossRefLister(CrossRef):
dfp = open(filename)
for line in dfp:
line = line.lstrip()
if line and line.startswith("#textdomain"):
continue
if line and line[0] == '#':
hdr.append(line[1:])
else: