Teach wmllint to check for double spaces after end of sentence, and fix some.

This commit is contained in:
Eric S. Raymond 2008-03-09 02:17:02 +00:00
parent 7a0097ea9c
commit f8491fa057
16 changed files with 92 additions and 89 deletions

View file

@ -59,7 +59,7 @@
[part]
background=maps/wesnoth.png
music=northerners.ogg
story= _ "The backtrail of the orcs was easy to trace -- a swathe of ugly trampled ground through the violated forest. Erlornas and his followers pursued them north and west."
story= _ "The backtrail of the orcs was easy to trace -- a swathe of ugly trampled ground through the violated forest. Erlornas and his followers pursued them north and west."
[/part]
[/story]
@ -275,7 +275,7 @@ Assassins are hard to hit, and their poison is insidious. Stay close to the vill
[/filter]
[message]
speaker="unit"
message=_"Aiieeee! I die, but Rualsha's vengeance shall fall upon you!"
message=_"Aiieeee! I die, but Rualsha's vengeance shall fall upon you!"
[/message]
[message]
description="Erlornas"

View file

@ -44,12 +44,12 @@
[part]
background=maps/wesnoth.png
music=northerners.ogg
story= _ "As they fared further north the green forest thinned, fading into barren and scrubby country. Gradually the message of the treestumps and dead wood around them became clear. This had been forest once. The orcs had killed it."
story= _ "As they fared further north the green forest thinned, fading into barren and scrubby country. Gradually the message of the treestumps and dead wood around them became clear. This had been forest once. The orcs had killed it."
[/part]
[part]
background=maps/wesnoth.png
music=northerners.ogg
story= _ "The orcish trail stood out less against the desolation, but the craft of elvish trackers was more than equal to following. They pursued with grimmer purpose now."
story= _ "The orcish trail stood out less against the desolation, but the craft of elvish trackers was more than equal to following. They pursued with grimmer purpose now."
[/part]
[/story]

View file

@ -108,7 +108,7 @@
[part]
background=maps/wesnoth.png
music=northerners.ogg
story= _ "In the first few years after the founding of the Northern Alliance, the dwarves of Knalga and the human population of Dwarven Doors were fully preoccupied with rebuilding what had been broken by the long orcish occupation. But soon enough they prospered once again. The dwarves begin mining their past for inspiration in ways to rebuild Knalga so it would be even greater than before, and began also reaching out for contact with their scattered kinfolk."
story= _ "In the first few years after the founding of the Northern Alliance, the dwarves of Knalga and the human population of Dwarven Doors were fully preoccupied with rebuilding what had been broken by the long orcish occupation. But soon enough they prospered once again. The dwarves begin mining their past for inspiration in ways to rebuild Knalga so it would be even greater than before, and began also reaching out for contact with their scattered kinfolk."
[/part]
[part]
background=maps/wesnoth.png
@ -138,7 +138,7 @@ and kill or scatter these invaders."
[/filter]
[message]
speaker="second_unit"
message=_"What is this? Their vanquished leader wears a cloak-pin of dwarvish make. And it bears a loremaster's emblem."
message=_"What is this? Their vanquished leader wears a cloak-pin of dwarvish make. And it bears a loremaster's emblem."
[/message]
[message]
description="Aiglondur"

View file

@ -108,7 +108,7 @@
[/message]
[message]
description="Angarthing_dummy"
message=_"And I fear for the Hammer of Thursagan. Our kin at Kal Kartha have been its keepers since a hero of their line recovered it from the Caverns of Flame, centuries ago."
message=_"And I fear for the Hammer of Thursagan. Our kin at Kal Kartha have been its keepers since a hero of their line recovered it from the Caverns of Flame, centuries ago."
[/message]
[message]
description="Aiglondur"
@ -132,7 +132,7 @@
[/message]
[message]
description="Hamel"
message=_"What is this ye say? Nae lost?"
message=_"What is this ye say? Nae lost?"
[/message]
[message]
description="Angarthing_dummy"

View file

@ -172,7 +172,7 @@
[/message]
[message]
description="Aiglondur"
message=_"For the Alliance! Axes up!"
message=_"For the Alliance! Axes up!"
[/message]
[objectives]
@ -230,12 +230,12 @@
[message]
description="Marth Tak"
message=_"My thanks, dwarves. These bandits might have hacked a bloody swathe through the Alliance's tribes if we had not killed them here."
message=_"My thanks, dwarves. These bandits might have hacked a bloody swathe through the Alliance's tribes if we had not killed them here."
[/message]
[message]
description="Aiglondur"
message=_"My thanks to you, for proving there are orcs I can fight alongside rather than against. But we cannot linger here to celebrate; we are journeying east."
message=_"My thanks to you, for proving there are orcs I can fight alongside rather than against. But we cannot linger here to celebrate; we are journeying east."
[/message]
[message]

View file

@ -106,11 +106,11 @@
[message]
description="Gronk"
message=_"Dis a troll bridge. You pay toll. Er..."
message=_"Dis a troll bridge. You pay toll. Er..."
[/message]
[message]
description="Gronk"
message=_"Dat not right. Dis a toll bridge. You pay troll. Er..."
message=_"Dat not right. Dis a toll bridge. You pay troll. Er..."
[/message]
[message]
description="Gronk"

View file

@ -319,7 +319,7 @@
[/message]
[message]
description="Aiglondur"
message=_"What's this? Large orcish war-bands so close to the Alliance's border? That can only mean trouble."
message=_"What's this? Large orcish war-bands so close to the Alliance's border? That can only mean trouble."
[/message]
[message]
description="Tan-Malgar"

View file

@ -232,7 +232,7 @@
[message]
speaker="Aiglondur"
message=_"It has begun to snow. Move, everyone! To be trapped here would be death."
message=_"It has begun to snow. Move, everyone! To be trapped here would be death."
[/message]
[/event]

View file

@ -102,11 +102,11 @@
[message]
speaker="Preceptor"
message=_"Master Perrin! A mage comes down from the High Pass, with a company of dwarves. They are well-armed, but not in battle array."
message=_"Master Perrin! A mage comes down from the High Pass, with a company of dwarves. They are well-armed, but not in battle array."
[/message]
[message]
speaker="Master Perrin"
message=_"That will be Ratheln, I expect. Hail! You on the road! Who comes bearing arms into our valley?"
message=_"That will be Ratheln, I expect. Hail! You on the road! Who comes bearing arms into our valley?"
[/message]
[message]
speaker="Glashal"

View file

@ -129,11 +129,11 @@
[/message]
[message]
speaker="Ratheln"
message=_"I do not sense hostile magic in the vicinity. But there has been fire near here recently, and not a clean one."
message=_"I do not sense hostile magic in the vicinity. But there has been fire near here recently, and not a clean one."
[/message]
[message]
speaker="Aiglondur"
message=_"Look sharp for the inhabitants here. They might have something to tell us."
message=_"Look sharp for the inhabitants here. They might have something to tell us."
[/message]
[objectives]
@ -187,15 +187,15 @@
[message]
speaker="Ollin"
message=_"Don't kill me, masters! Please don't kill me!"
message=_"Don't kill me, masters! Please don't kill me!"
[/message]
[message]
speaker="Aiglondur"
message=_"You're in no danger from us. What lies to the east of here?"
message=_"You're in no danger from us. What lies to the east of here?"
[/message]
[message]
speaker="Ollin"
message=_"You wear no mask. You...you're not with them?"
message=_"You wear no mask. You...you're not with them?"
[/message]
[message]
speaker="Aiglondur"
@ -203,7 +203,7 @@
[/message]
[message]
speaker="Ollin"
message=_"The masked dwarves. Killing, burning, kidnapping. Look..."
message=_"The masked dwarves. Killing, burning, kidnapping. Look..."
[/message]
#define PLACE_BURNED_VILLAGE X Y
@ -224,33 +224,33 @@
[/modify_side]
[message]
speaker="Masked Dwarf"
message=_"Fellow dwarves, hail! We're looking for a human refugee, one named Ollin. Have you seen him? Our master demands his life."
message=_"Fellow dwarves, hail! We're looking for a human refugee, one named Ollin. Have you seen him? Our master demands his life."
[/message]
[message]
speaker="Aiglondur"
message=_"He is here. How has he wronged your master, that you seek
message=_"He is here. How has he wronged your master, that you seek
his death?"
[/message]
[message]
speaker="Masked Dwarf"
message=_"Does it matter? He is only a dirtgrubbing human, not fit to polish the boots of the true people."
message=_"Does it matter? He is only a dirtgrubbing human, not fit to polish the boots of the true people."
[/message]
[message]
speaker="Angarthing"
message=_"What is your name, masked one? Will you stand behind your
message=_"What is your name, masked one? Will you stand behind your
deed? I am a witness."
[/message]
[message]
speaker="Masked Dwarf"
message=_"A witness? My name is...my name is not important. My deed will speak its own truth."
message=_"A witness? My name is...my name is not important. My deed will speak its own truth."
[/message]
[message]
speaker="Angarthing"
message=_"You speak without honor. Mine is the power of our ancient Law; speak your name and give up your murder, or the Law will cast you forth. I am a witness!"
message=_"You speak without honor. Mine is the power of our ancient Law; speak your name and give up your murder, or the Law will cast you forth. I am a witness!"
[/message]
[message]
speaker="Masked Dwarf"
message=_"If you were a witness of the true people, you would not let a dirtgrubber hide behind your robes. I deny you!"
message=_"If you were a witness of the true people, you would not let a dirtgrubber hide behind your robes. I deny you!"
[/message]
[message]
speaker="Aiglondur"
@ -258,7 +258,7 @@ deed? I am a witness."
[/message]
[message]
speaker="Angarthing"
message=_"The Law speaks: you are cast out. You are un-dwarf. I AM A WITNESS!"
message=_"The Law speaks: you are cast out. You are un-dwarf. I AM A WITNESS!"
[/message]
[objectives]
@ -303,23 +303,23 @@ deed? I am a witness."
[/message]
[message]
speaker="Angarthing"
message=_"You have acted in honor. I am a witness."
message=_"You have acted in honor. I am a witness."
[/message]
[message]
speaker="Aiglondur"
message=_"I have never seen the formal banishment before. One reads of it in the old tales, of course, but to hear it with one's own ears? It was...unsettling."
message=_"I have never seen the formal banishment before. One reads of it in the old tales, of course, but to hear it with one's own ears? It was...unsettling."
[/message]
[message]
speaker="Angarthing"
message=_"It is not something we do often. The last such was in my grandsire's time. But look at what these filth were carrying if you have any doubt it was merited."
message=_"It is not something we do often. The last such was in my grandsire's time. But look at what these filth were carrying if you have any doubt it was merited."
[/message]
[message]
speaker="Aiglondur"
message=_"Whips. Shackles. No, Angarthing, I would not doubt you, even if it were my place to doubt a loremaster."
message=_"Whips. Shackles. No, Angarthing, I would not doubt you, even if it were my place to doubt a loremaster."
[/message]
[message]
speaker="Angarthing"
message=_"They were seeking captives. To what purpose, I cannot say. But I doubt it was any good one."
message=_"They were seeking captives. To what purpose, I cannot say. But I doubt it was any good one."
[/message]
[kill]
description=Ollin

View file

@ -161,12 +161,12 @@
[message]
speaker="Elurin"
message=_"We allow few outsiders in our forest paths, and no dwarves since the masked ones began to trouble our eastern margins. No axe-bearers shall come near our trees. Return whence you came!"
message=_"We allow few outsiders in our forest paths, and no dwarves since the masked ones began to trouble our eastern margins. No axe-bearers shall come near our trees. Return whence you came!"
[/message]
[message]
speaker="Aiglondur"
message=_"No. We have our duty. We must pass."
message=_"No. We have our duty. We must pass."
[/message]
[message]
@ -176,12 +176,12 @@
[message]
speaker="Aiglondur"
message=_"Winter comes on our heels, and your forest straddles the only gap in these mountains. You leave us no choice but to fight you."
message=_"Winter comes on our heels, and your forest straddles the only gap in these mountains. You leave us no choice but to fight you."
[/message]
[message]
speaker="Elurin"
message=_"So be it, then. Yours will not be the first bones to nourish the earth of our forest."
message=_"So be it, then. Yours will not be the first bones to nourish the earth of our forest."
[/message]
[kill]
@ -230,7 +230,7 @@
[message]
description="Aiglondur"
message=_"Rally on me, everyone. We have better things to do than brawl with elves."
message=_"Rally on me, everyone. We have better things to do than brawl with elves."
[/message]
[if]

View file

@ -193,7 +193,7 @@
[/message]
[message]
description="Aiglondur"
message=_"And under siege, I see. There is a mighty host of orcs between us and that gate."
message=_"And under siege, I see. There is a mighty host of orcs between us and that gate."
[/message]
[message]
description="Tan-Morgh"
@ -238,7 +238,7 @@
[message]
description=Aiglondur
message=_ "Kal Kartha is taken. Our mission has failed."
message=_ "Kal Kartha is taken. Our mission has failed."
[/message]
[endlevel]
@ -251,17 +251,17 @@
[message]
speaker=Dulcatulos
message=_"Well fought, and our thanks; we were sore pressed. You are our honored guests, and I will show you to the best quarters we have myself. Our lord, the runemaster Karrag, will want to have speech with you on the morrow."
message=_"Well fought, and our thanks; we were sore pressed. You are our honored guests, and I will show you to the best quarters we have myself. Our lord, the runemaster Karrag, will want to have speech with you on the morrow."
[/message]
[message]
speaker=Angarthing
message=_"A runemaster? There had been none such since Thursagan's day. And for one to lead a holding was unheard-of; they tended towards the solitary life."
message=_"A runemaster? There had been none such since Thursagan's day. And for one to lead a holding was unheard-of; they tended towards the solitary life."
[/message]
[message]
speaker=Dulcatulos
message=_"Aye? Well, you'd know such things better than I, loremaster. Our Karrag toiled for long years to recover the craft lore. He was elevated when our old lord fell in battle against the besieging orcs. Karrag himself was wounded near to death; none thought he would recover. But he leads us today, and his runelore has oft been the only shield between us and the orcs."
message=_"Aye? Well, you'd know such things better than I, loremaster. Our Karrag toiled for long years to recover the craft lore. He was elevated when our old lord fell in battle against the besieging orcs. Karrag himself was wounded near to death; none thought he would recover. But he leads us today, and his runelore has oft been the only shield between us and the orcs."
[/message]
[message]
@ -278,12 +278,12 @@ will smash and scatter all our enemies."
[message]
speaker=Angarthing
message=_"That is strange. The Hammer is a tool of crafting and making, not a weapon. What can he mean to do with it?"
message=_"That is strange. The Hammer is a tool of crafting and making, not a weapon. What can he mean to do with it?"
[/message]
[message]
speaker=Dulcatulos
message=_"That's for lords and loremasters to worry about, not the likes of me. I must see to my troop's care. Food will be brought to you; rest well, we will speak again."
message=_"That's for lords and loremasters to worry about, not the likes of me. I must see to my troop's care. Food will be brought to you; rest well, we will speak again."
[/message]
[/event]
[/scenario]

View file

@ -188,7 +188,7 @@
[message]
description="Karrag"
message=_"Trade? Your destruction of the besieging orcs was a far nobler act than trade. There can be more such victories. And there will be by the power of our ancient heirloom, the Hammer of Thursagan. "
message=_"Trade? Your destruction of the besieging orcs was a far nobler act than trade. There can be more such victories. And there will be by the power of our ancient heirloom, the Hammer of Thursagan. "
[/message]
[message]
@ -198,7 +198,7 @@
[message]
description="Karrag"
message=_"Yes! And the Hammer holds the soul of the dwarves, the true people. Together, we can march to greater victories! Will you of Knalga join me?"
message=_"Yes! And the Hammer holds the soul of the dwarves, the true people. Together, we can march to greater victories! Will you of Knalga join me?"
[/message]
[message]
@ -218,7 +218,7 @@
[message]
description="Karrag"
message=_"Impertinent fool! It is not for you to dictate to a lord in his own holding, much less one who holds the very soul of the dwarves in his hand."
message=_"Impertinent fool! It is not for you to dictate to a lord in his own holding, much less one who holds the very soul of the dwarves in his hand."
[/message]
[message]
@ -256,7 +256,7 @@
[message]
description="Dulcatulos"
message=_"No...no...it is horrible! My lord, how did you come to this?"
message=_"No...no...it is horrible! My lord, how did you come to this?"
[/message]
[message]
@ -321,7 +321,7 @@
[message]
speaker=Angarthing
message=_"We must follow. Quickly! It may be his talk of perverting the Hammer was merely mad raving, but we cannot allow the risk that his foul spell might succeed."
message=_"We must follow. Quickly! It may be his talk of perverting the Hammer was merely mad raving, but we cannot allow the risk that his foul spell might succeed."
[/message]
[endlevel]

View file

@ -287,17 +287,17 @@
[message]
description="Dulcatulos"
message=_"It's been...it's been years since I've been down here. Only Karrag and his personal followers used this level. Why did I never wonder about that before?"
message=_"It's been...it's been years since I've been down here. Only Karrag and his personal followers used this level. Why did I never wonder about that before?"
[/message]
[message]
description="Angarthing"
message=_"Karrag's will, and his dark magic. I think he has been casting glamours on all of you ever since he passed over."
message=_"Karrag's will, and his dark magic. I think he has been casting glamours on all of you ever since he passed over."
[/message]
[message]
description="Aiglondur"
message=_"Where *is* Karrag? We can't have been more than seconds behind him."
message=_"Where *is* Karrag? We can't have been more than seconds behind him."
[/message]
[message]
@ -307,7 +307,7 @@
[message]
description="Aiglondur"
message=_"More likely he has cloaked himself, thinking to run ahead to gather his followers. He could be within a spear-cast of us now and we wouldn't know it in this gloom."
message=_"More likely he has cloaked himself, thinking to run ahead to gather his followers. He could be within a spear-cast of us now and we wouldn't know it in this gloom."
[/message]
[sound]
@ -321,7 +321,7 @@
[message]
description="Aiglondur"
message=_"Aye. Karrag, calling his troops to battle. Only the Dark Gods know what hellspawn the lich will summon. AXES UP!"
message=_"Aye. Karrag, calling his troops to battle. Only the Dark Gods know what hellspawn the lich will summon. AXES UP!"
[/message]
[objectives]
@ -397,7 +397,7 @@
[then]
[message]
speaker=unit
message= _ "It sees that guard spoke truth. These doors cannot be forced open by any means we have!"
message= _ "It sees that guard spoke truth. These doors cannot be forced open by any means we have!"
[/message]
[message]
@ -1001,12 +1001,12 @@
[message]
description=Karrag
message=_ "No! No! No! Dirtgrubbers must die! The true people must rule all!"
message=_ "No! No! No! Dirtgrubbers must die! The true people must rule all!"
[/message]
[message]
description=Aiglondur
message=_ "The 'true people' speak through our axes. Die, foul lich."
message=_ "The 'true people' speak through our axes. Die, foul lich."
[/message]
[endlevel]

View file

@ -102,18 +102,18 @@
[message]
description="Angarthing"
message=_"Dwarves of Kal Kartha, I speak the Law. Your house is cast down; you have harbored a great evil. Who now will take the burden of cleansing this holding of its taint?"
message=_"Dwarves of Kal Kartha, I speak the Law. Your house is cast down; you have harbored a great evil. Who now will take the burden of cleansing this holding of its taint?"
[/message]
[message]
speaker=narrator
message=_"The dwarves of Kal Kartha muttered among themselves and looked at one another uneasily. None stepped forward."
message=_"The dwarves of Kal Kartha muttered among themselves and looked at one another uneasily. None stepped forward."
image=wesnoth-icon.png
[/message]
[message]
description="Dulcatulos"
message=_"Loremaster...none of us is fit to take up the lordship. Karrag fooled us all, made us the tools of his foul scheme"
message=_"Loremaster...none of us is fit to take up the lordship. Karrag fooled us all, made us the tools of his foul scheme"
[/message]
[delay]
@ -143,7 +143,7 @@
[message]
description="Pelias"
message=_"I was told I'd find Aiglondur of Knalga here. I bear a message from Tallin, the Lord Protector of the Alliance."
message=_"I was told I'd find Aiglondur of Knalga here. I bear a message from Tallin, the Lord Protector of the Alliance."
[/message]
[message]
@ -153,7 +153,7 @@
[message]
description="Pelias"
message=_"I have been on your track for weeks. Word of your rout of
message=_"I have been on your track for weeks. Word of your rout of
Tan-Malgar and his allies spread, and reached Tallin. You did the Alliance better service than you knew that day; Tan-Malgar had exchanged messages with certain orcish chieftains within the Alliance, and your victory prevented a dangerous revolt."
[/message]
@ -164,7 +164,7 @@ Tan-Malgar and his allies spread, and reached Tallin. You did the Alliance bett
[message]
description="Dulcatulos"
message=_"(wonderingly) A Lord Companion? And kin of ours..."
message=_"(wonderingly) A Lord Companion? And kin of ours..."
[/message]
[message]
@ -180,12 +180,12 @@ Tan-Malgar and his allies spread, and reached Tallin. You did the Alliance bett
[message]
description="Angarthing"
message=_"It would be fitting. The Loremasters will approve."
message=_"It would be fitting. The Loremasters will approve."
[/message]
[message]
description="Aiglondur"
message=_"Pelias, my thanks to the Lord Protector; I will attend him in the spring. But it seems that I have some work to do here first."
message=_"Pelias, my thanks to the Lord Protector; I will attend him in the spring. But it seems that I have some work to do here first."
[/message]
[endlevel]

View file

@ -581,7 +581,6 @@ unit_races = []
def sanity_check(filename, lines):
"Perform sanity and consistency checks on input lines."
modified = False
unit_id = ""
# Sanity-check abilities and traits against notes macros.
# Note: This check is disabled on units deived via [base_unit].
@ -748,14 +747,25 @@ def sanity_check(filename, lines):
pass # Ignore ill-formed integer literals
except TypeError:
pass
# Interpret magic comments for setting the sage pattern of units.
# This copes with some wacky UtBS units that are defined with
# variant-spawning macros. The prototype comment looks like this:
#wmllint: usage of "Desert Fighter" is fighter
for i in range(len(lines)):
m = re.match('# *wmllint: usage of "([^"]*)" is +(.*)', lines[i])
if m:
usage[m.group(1)] = m.group(2).strip()
# Consistency-check the description attributes in [side], [unit], [recall],
# and [message] scopes, also correctness-check translation marks.
# and [message] scopes, also correctness-check translation marks and look
# for double spaces at end of sentence.
unmodified = copy.copy(lines)
present = []
in_scenario = False
in_person = False
in_objective = False
in_trait = False
ignoreable = False
sentence_end = re.compile("(?<=[.!?;:]) +")
for i in range(len(lines)):
if "[scenario]" in lines[i]:
in_scenario = True
@ -810,19 +820,21 @@ def sanity_check(filename, lines):
if not has_tr_mark:
print '"%s", line %d: %s needs translation mark' \
% (filename, i+1, key)
value = "_ " + value
modified = True
lines[i] = lines[i].replace(value, "_ " + value)
nv = sentence_end.sub(" ", value)
if nv != value:
print '"%s", line %d: double space after sentence end' \
% (filename, i+1)
lines[i] = sentence_end.sub(" ", lines[i])
elif key == "description":
if (in_trait or in_objective) and not has_tr_mark:
print '"%s", line %d: description in [objectives] needs translation mark' \
% (filename, i+1)
value = "_ " + value
modified = True
lines[i] = sentence_end.sub(" ", lines[i])
elif not (in_trait or in_objective) and has_tr_mark:
print '"%s", line %d: description should not have translation mark' \
% (filename, i+1)
value = value.replace("_", "", 1)
modified = True
lines[i] = lines[i].replace("_", "", 1)
if in_person:
present.append(value)
elif value in ('narrator', 'unit', 'second_unit') or value[0] in ("$", "{"):
@ -833,18 +845,9 @@ def sanity_check(filename, lines):
elif has_tr_mark:
print '"%s", line %d: %s should not have a translation mark' \
% (filename, i+1, key)
value = value.replace("_", "", 1)
modified = True
lines[i] = lines[i].replace("_", "", 1)
except TypeError:
pass
# Interpret magic comments for setting the sage pattern of units.
# This copes with some wacky UtBS units that are defined with
# variant-spawning macros. The prototype comment looks like this:
#wmllint: usage of "Desert Fighter" is fighter
for i in range(len(lines)):
m = re.match('# *wmllint: usage of "([^"]*)" is +(.*)', lines[i])
if m:
usage[m.group(1)] = m.group(2).strip()
# Check for textdomain strings; should be exactly one, on line 1
textdomains = []
for i in range(len(lines)):
@ -862,8 +865,7 @@ def sanity_check(filename, lines):
print '"%s", line %d: single textdomain declaration not on line 1.' % \
(filename, w)
lines = [lines[w-1].lstrip()] + lines[:w-1] + lines[w:]
modified = True
return (lines, modified)
return (lines, lines != unmodified)
def consistency_check():
"Consistency-check state information picked up by sanity_check"
@ -919,6 +921,7 @@ def hack_syntax(filename, lines):
# Ensure that every attack has a translatable description.
for i in range(len(lines)):
if "no-syntax-rewrite" in lines[i]:
break
elif "[attack]" in lines[i]:
j = i;