Extend the range of WML attributes that get spellchecked,

...and fix a glitch that turned up.
This commit is contained in:
Eric S. Raymond 2008-11-05 02:45:03 +00:00
parent e78ef120d7
commit 1d1e5343cc
2 changed files with 17 additions and 2 deletions

View file

@ -72,7 +72,7 @@
type=image
image=play
title= _ "Play"
tooltip= _ "continous replay"
tooltip= _ "continuous replay"
items=playreplay
#ifdef TINY
rect="+4,=,+10,="

View file

@ -291,6 +291,21 @@ translatables = (\
"translator_comment",
"user_team_name",
)
spellcheck_these = (\
"cannot_use_message=",
"caption=",
"description=",
"description_inactive=",
"message=",
"note=",
"story=",
"summary=",
#"text=",
#"title=",
"title2=",
"tooltip=",
)
# Declare a few common English contractions that pyenchant
# inexplicably knows nothing of.
@ -1186,7 +1201,7 @@ def spellcheck(fn, d):
# print "%s: with this file's local spellings: %s" % (fn, local_spellings)
for nav in WmlIterator(filename=fn):
# Spell-check message and story parts
if nav.element in ("message=", "story=", "description="):
if nav.element in spellcheck_these:
(key, prefix, value, comment) = parse_attribute(nav.text)
if "no spellcheck" in comment:
continue