Tighten up the spekll-checking, and catch some more glitches.

This commit is contained in:
Eric S. Raymond 2008-11-03 22:38:07 +00:00
parent 62362444e9
commit 950897fb10
30 changed files with 53 additions and 42 deletions

View file

@ -68,4 +68,4 @@
{campaigns/An_Orcish_Incursion/scenarios}
#endif
# wmllint: directory spelling rualsha
# wmllint: directory spelling Rualsha Urugha

View file

@ -81,4 +81,4 @@
{campaigns/Descent_Into_Darkness/utils/terrain.cfg}
#endif
# wmllint: directory spelling Malin Dela Keshar Drogan
# wmllint: directory spelling Malin Dela Keshar Drogan Darken Volk

View file

@ -13,7 +13,7 @@
{EXTRA_SCENARIO_MUSIC loyalists.ogg}
{EXTRA_SCENARIO_MUSIC battle.ogg}
# wmllint: local spellings Malin Keshar Parthyn Darken Volk stewpots
# wmllint: local spellings stewpots
[story]
[part]
story=_ "Malin Keshar was born 10 years after the death of Haldric IV. He grew up in the northern border town of Parthyn, the second child and eldest son of the baron of the city. Every summer when the mountain passes became clear, orcs came down from the north to prove themselves in battle. Every year Parthyn's guards repelled the raids, though some of the townsfolk were always lost. Malin's father led raiding parties to disrupt the orc encampments and send the orcs back to the north."

View file

@ -76,5 +76,3 @@
{campaigns/Heir_To_The_Throne/utils}
{campaigns/Heir_To_The_Throne/scenarios}
#endif
# wmllint: directory spellings Konrad Li'sar Delfador

View file

@ -609,7 +609,6 @@
[message]
speaker=Mounted Dwarf
# wmllint: local spelling whoa
message= _ "Whoa there... No need to be surly, now. Easy...easy... now GO!"
[/message]

View file

@ -68,4 +68,5 @@
{@campaigns/Legend_of_Wesmere/about.cfg}
[/campaign]
# wmllint: directory spellings Delfador Chantal Kalenz Crelanu Uraredia
# wmllint: directory spellings Delfador Cleodil Kalenz Crelanu Uraredia
# wmllint: directory spellings Landar Olurf

View file

@ -19,7 +19,7 @@
{EXTRA_SCENARIO_MUSIC battle.ogg}
{EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}
# wmllint: local spelling wildlands Archmagi
# wmllint: local spelling Archmagi
[story]
[part]
story= _ "In the Year of Wesnoth 161, 338 years before Asheviere's betrayal, the newly crowned king sought to make safe once and for all the wildlands that separated the human cities surrounding Weldyn and the coastal regions of Elensefar."

View file

@ -98,6 +98,6 @@
{campaigns/Northern_Rebirth/scenarios}
#endif
# wmllint: directory spellings Tallin Hsmel Anita Stalrag Ro'Arthian Ro'Sothian
# wmllint: directory spellings Elenia Hidel Sisal Krash Abhai Malifor Rakshas
# wmllint: directory spellings Marcus Theta
# wmllint: directory spellings Tallin Hamel Anita Stalrag Ro'Arthian Ro'Sothian
# wmllint: directory spellings Elenia Hidel Sisal Krash Abhai Marcus Theta
# wmllint: directory spellings Al'Tar Malifor Rakshas

View file

@ -1998,7 +1998,6 @@
#endif
[message]
speaker=unit
# wmllint: local spelling Ack
message= _ "Ack! What are those things!"
[/message]
[if]

View file

@ -103,8 +103,7 @@
background=portraits/Father_Marcus.jpg
[/part]
[part]
# wmllint: local spelling pah
story= _ "Ro'Arthian, pah! Don't utter that cursed name!"
story= _ "Ro'Arthian, bah! Don't utter that cursed name!"
background=portraits/Hamel.jpg
[/part]
[part]

View file

@ -604,7 +604,6 @@
[else]
[message]
speaker=Father Marcus
# wmllint: local spelling Ack
message= _ "Ack! I have been brained!"
[/message]
[message]

View file

@ -177,7 +177,7 @@
[message]
role=Helper
message= _ "Ok."
message= _ "OK."
[/message]
[kill]

View file

@ -268,7 +268,7 @@
[message]
speaker=Darstang
message= _ "Pah, have it your way then. Now, hurry on your way elf."
message= _ "Bah, have it your way then. Now, hurry on your way elf."
[/message]
[kill]
@ -284,7 +284,7 @@
[message]
speaker=Darstang
message= _ "Pah, cowardly little elves. No dwarf would have ever agreed to such a proposal. Good riddance too, those elves just get in the way. Come on men, it's time to show those orcs our steel!"
message= _ "Bah, cowardly little elves. No dwarf would have ever agreed to such a proposal. Good riddance too, those elves just get in the way. Come on men, it's time to show those orcs our steel!"
[/message]
[message]

View file

@ -610,7 +610,7 @@
[message]
speaker=second_unit
message= _ "Pah, do not think you can break the unity of the horde with your stupid lies!"
message= _ "Bah, do not think you can break the unity of the horde with your stupid lies!"
[/message]
[message]

View file

@ -325,7 +325,7 @@
[message]
speaker="Kapou'e"
message= _ "OK, we crushed this pocket of resistance too. Now where in the world did that coward Shan Taum run off to?"
message= _ "Good, we crushed this pocket of resistance too. Now where in the world did that coward Shan Taum run off to?"
[/message]
[endlevel]

View file

@ -63,3 +63,5 @@
{@campaigns/The_Hammer_of_Thursagan/scenarios/}
#endif
#wmllint: directory spelling Aiglondur Angarthing Karrag

View file

@ -11,8 +11,6 @@
map_data="{@campaigns/The_Hammer_of_Thursagan/maps/reclaiming_the_past.map}"
# wmllint: local spelling Angarthing arcanisters
{DEFAULT_SCHEDULE}
{SCENARIO_MUSIC "legends_of_the_north.ogg"}

View file

@ -73,5 +73,6 @@
#endif
# wmllint: directory spelling Eldaric Jessica Aethyr Burin Jevyan Typhon
# wmllint: directory spelling Eldaric Jessica Aethyr Burin Typhon
# wmllint: directory spelling Jevyan Caror Lenvan
# wmllint: directory spelling Wesfolk Clearwater Southbay Esten Oldwood

View file

@ -994,7 +994,6 @@
[message]
speaker=Lady Jessica
# wmllint: local spelling Caror
message= _ "Erm, yes... He was Caror, the arch rival of our dearly departed Lich-Lord Lenvan. He coveted the ruby, and was studying it. The only copy of his study, the Book of Fire and Darkness, was petrified along with him."
[/message]

View file

@ -163,7 +163,6 @@
[/message]
[message]
speaker=Prince Haldric
# wmllint: local spelling ensorcels
message= _ "Get her before she ensorcels us all!"
image=portraits/haldric-mad.png
[/message]

View file

@ -75,4 +75,5 @@
#endif
# wmllint: directory spelling Deoran Hylas Mebrin M'brin Urza Afalas Kerlath
# wmllint: directory spelling Deoran Hylas Gerrick
# wmllint: directory spelling Mebrin M'brin Urza Afalas Kerlath

View file

@ -562,6 +562,7 @@
[/message]
[message]
speaker=Grek
local spelling "Bah"
message= _ "Bah! We destroy the undead when we want. Maybe wait for a few years first. If you want troll help, you come see me and give proper payment!"
[/message]
[message]

View file

@ -85,6 +85,7 @@
[/message]
[message]
speaker=Nym
# wmllint: local spelling C'mon
message= _ "C'mon Kaleh, we have to go see if anyone is hurt or needs help. I think I hear people calling from the south. Now is not a time for fear, we must be strong. After all you are the nephew of Tanuil, our leader, and you must answer to the call of duty. Perhaps in the light of day things won't be as bad as you think. Let's explore the village and see who else has survived the night."
[/message]
[message]

View file

@ -71,7 +71,7 @@ Drakes originated from a chain of volcanic islands in the Great Ocean. A combina
[/race]
# wmllint: general spellings dwarf dwarves dwarvish dwarven
# wmllint: general spellings Knalga Knalgan Vrug Moradin
# wmllint: general spellings Knalga Knalgan Vrug
# wmllint: general spellings muckle och busked intae belike
# wmllint: general spellings runesmith runesmiths runelore
# wmllint: general spellings runecraft runecrafter runecrafters
@ -82,6 +82,7 @@ Drakes originated from a chain of volcanic islands in the Great Ocean. A combina
# wmllint: general spellings wouldna' willna' didna' dinna'
# wmllint: general spellings tryin' wi'out ta'en d'ye
# wmllint: general spellings bonebag
# wmllint: general spellings Moradin Thursagan
[race]
id=dwarf
male_name= _ "race^Dwarf"
@ -100,6 +101,7 @@ Dwarves are of small stature by human measure, but they are by no means fragile.
# wmllint: general spellings elf elves elvish
# wmllint: general spellings Wesmere Lintanir Aethenwood
# wmllint: general spellings Ka'lian Arkan Thoria Listra Elensiria
# wmllint: general spellings Kalenz Cleodil Erlornas
[race]
id=elf
male_name= _ "race^Elf"
@ -149,10 +151,11 @@ Elves are the eldest race of the continent, with the possible exception of troll
# wmllint: general spellings Wesnoth Wesnothian Wesnothians Elensefar Carcyn
# wmllint: general spellings Soradoc Tath Dulatus Estmark Estmarks Dan'Tonk
# wmllint: general spellings Abez Alduin Tahn Parthyn Halstead Weldyn
# wmllint: general spellings Abez Alduin Tahn Parthyn Halstead Weldyn
# wmllint: general spellings Annuvin Delwyn Dallben Westin Blackwater Aldril
# wmllint: general spellings Illuven Longlier Northlands Southlands
# wmllint: general spellings Haldric Garard Asheviere Glyn
# wmllint: general spellings Haldric Garard Glyn Konrad Li'sar Delfador
# wmllint: general spellings Eldred Asheviere Crelanu
[race]
id=human
male_name= _ "race^Human"
@ -210,7 +213,7 @@ The eastern provinces of Wesnoth, known as the Clan Homelands, have a geography
num_traits=0
[/race]
# wmllint: general spelling nagas nagani
# wmllint: general spelling naga nagas nagani
[race]
id=naga
male_name= _ "race^Naga"
@ -298,7 +301,7 @@ While undead lords arrived on the Great Continent in considerable numbers only i
{ORCISH_NAMES}
[/race]
# wmllint: general spelling woses
# wmllint: general spelling wose woses
[race]
id=wose
name= _ "race^Wose"

View file

@ -16,7 +16,7 @@
undead_variation=swimmer
cost=43
usage=fighter
# wmllint: local spelling triton tritons
# wmllint: local spelling tritons
description= _ "Tritons are combat masters of the sea. Skilled in use of the trident, Tritons easily defeat any enemy foolish enough to wander into their preferred environment."
die_sound=mermen-die.ogg
{DEFENSE_ANIM "units/merfolk/triton-defend.png" "units/merfolk/triton.png" mermen-hit.wav }

View file

@ -132,7 +132,7 @@ He was in for quite a shock. As soon as he saw the Basilisk, Blum Duk cowered in
(inscribed by Elvish Pillager)"
[/unit]
# wmllint: local spelling Bah Ihn Mar Terowydlithrol
# wmllint: local spelling Ihn Mar Terowydlithrol
{UNIT_STONE "Armageddon Drake" _"Rah Ihn Mar" 11 14}
[+unit]
description=_ "Rah Ihn Mar, Champion of the Burning Hills, made his way to the Ruaskkolin Lake region in pursuit of the Elvish Hero Terowydlithrol, known among Elves as ''The Dragonbane.'' It was said that Terowydlithrol had killed a Dragon of Fire that threatened an Elvish village, and initiated a ''counterattack'' in which some 37 Drakes, camping in a nearby ravine and believed to be in allegiance with the Dragon, were slaughtered. Knowing that these Drakes were innocent, Rah Ihn Mar came to Ruaskkolin Lake to hunt down and slay Terowydlithrol, who had been seen entering the region but a day ago. Burning for vengeance, Rah Ihn Mar began the hunt....."

View file

@ -3,7 +3,7 @@
[multiplayer]
id=multiplayer_2p_Dark_Forecast
name= _ "2p - Dark Forecast (Survival)"
description= _ "Dark Forecast is a survival scenario for solitaire or two-player team-based play against randomly AI spawned units. Victory is achieved by surviving all enemy waves. During the course of gameplay, the terrain will change based on random weather effects.
description= _ "Dark Forecast is a survival scenario for solitaire or two-player team-based play against randomly AI spawned units. Victory is achieved by surviving all enemy waves. During the course of play, the terrain will change based on random weather effects.
Note: You need to use map settings for the scenario to work right."
turns="45"

View file

@ -4,7 +4,7 @@
id=multiplayer_A_New_Land
name= _ "4p - A New Land"
map_data="{multiplayer/maps/4p_A_New_Land.map}"
# wmllint: local spelling terraform gold=100
# wmllint: local spelling gold=100
description= _ "This 4p survival scenario allows you to construct buildings and terraform the land. Use map settings. Recommended starting gold=100."
experience_modifier=70%
turns=unlimited

View file

@ -14,7 +14,7 @@
speaker=narrator
caption=_ "Peasants"
image=units/human-peasants/peasant.png~TC(1,magenta)
# wmllint: local spelling terraform and/or
# wmllint: local spelling and/or
message= _ "Peasants are your workers. Depending on the terrain, right-clicking on a peasant allows you to terraform the landscape and/or build castles, mines, farms, villages and universities."
{ANL_RETURN_TO_MENU}
[/message]

View file

@ -294,7 +294,8 @@ translatables = (\
# Declare a few common English contractions that pyenchant
# inexplicably knows nothing of.
declared_spellings = {"GLOBAL":["I'm", "I've", "I'd", "I'll",
"heh", "aide-de-camp", "teleportation",
"heh", "ack",
"aide-de-camp", "teleportation",
"hellspawn", "hurrah", "crafters", "bided",
"overmatched", "stygian", "numbskulls",
"axe", "greatsword", "ballista", "glaive",
@ -1157,6 +1158,8 @@ def spellcheck(fn, d):
local_spellings += declared_spellings.get(up,[])
up = os.path.dirname(up)
local_spellings = filter(lambda w: not d.check(w), local_spellings)
#if local_spellings:
# print "%s: inherited local spellings: %s" % (fn, local_spellings)
map(d.add_to_session, local_spellings)
# Process this individual file
for nav in WmlIterator(filename=fn):
@ -1168,8 +1171,14 @@ def spellcheck(fn, d):
if words:
for word in words.group(1).split():
word = word.lower()
d.add_to_session(word)
local_spellings.append(word)
if not d.check(word):
d.add_to_session(word)
local_spellings.append(word)
#else:
# print nav.whereami(), " %s already declared" % word
#if local_spellings:
# 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="):
(key, prefix, value, comment) = parse_attribute(nav.text)
@ -1251,13 +1260,15 @@ def spellcheck(fn, d):
if re.match("o+h+", lowered):
continue
print nav.whereami(), 'possible misspelling "%s"' % token
# Take exceptions from name, id, and type fields
# Take exceptions from the id fields
if nav.element == "id=":
(key, prefix, value, comment) = parse_attribute(nav.text)
value = string_strip(value)
if value:
value = string_strip(value).lower()
if value and not d.check(value):
d.add_to_session(value)
local_spellings.append(value)
#if local_spellings:
# print "%s: slated for removal: %s" % (fn, local_spellings)
#for word in local_spellings:
# d.remove_from_session(word)