More suppression of spurious wmllint warnings.
This commit is contained in:
parent
c09cb7563e
commit
659f5d1894
5 changed files with 15 additions and 14 deletions
|
@ -673,6 +673,7 @@ For those who go by land or sea, a bridge is the best of both worlds - for gamep
|
|||
[topic]
|
||||
id=general_commands
|
||||
title= _ "General commands"
|
||||
#wmllint: display on
|
||||
text= "<header>text=':clear'</header>" + _"
|
||||
Clear chat messages.
|
||||
|
||||
|
@ -703,6 +704,7 @@ Save the game (without prompting).
|
|||
|
||||
" + "<header>text=':wq'</header>" + _"
|
||||
Save the game and quit the scenario (without prompting)."
|
||||
#wmllint: display off
|
||||
[/topic]
|
||||
|
||||
[topic]
|
||||
|
|
|
@ -143,8 +143,10 @@ Share knowledge of warfare"}
|
|||
[message]
|
||||
caption="Diplomatic Options"
|
||||
speaker=unit
|
||||
#wmllint: display on
|
||||
message= _ "What shall I do?
|
||||
"
|
||||
#wmllint: display off
|
||||
|
||||
# Nothing
|
||||
|
||||
|
@ -304,8 +306,10 @@ Negotiation Progress: $player_$side_number|.leader_option_2.progress|/$player_$s
|
|||
speaker=narrator
|
||||
caption="Negotiation Complete"
|
||||
image="images/portraits/James_Woo/dwarf-guard.png"
|
||||
#wmllint: display on
|
||||
message= _ "Our talks are complete - the Dwarves will gladly fight by your side. Which of our brethren do you want to recruit?
|
||||
"
|
||||
#wmllint: display off
|
||||
|
||||
{PICK_RECRUIT_OPTION ("units/dwarves/fighter.png~TC(1,magenta)") ("Dwarvish Fighter") ally_1}
|
||||
{PICK_RECRUIT_OPTION ("units/dwarves/guard.png~TC(1,magenta)") ("Dwarvish Guardsman") ally_2}
|
||||
|
@ -326,8 +330,10 @@ Negotiation Progress: $player_$side_number|.leader_option_2.progress|/$player_$s
|
|||
speaker=narrator
|
||||
caption="Negotiation Complete"
|
||||
image="images/portraits/Kitty/elvish-high-lord.png"
|
||||
#wmllint: display on
|
||||
message= _ "Our talks are complete - the Elves shall aid you in this battle. Which our of kin do you wish to recruit?
|
||||
"
|
||||
#wmllint: display off
|
||||
|
||||
{PICK_RECRUIT_OPTION ("units/elves-wood/archer.png~TC(1,magenta)") ("Elvish Archer") ally_5}
|
||||
{PICK_RECRUIT_OPTION ("units/elves-wood/fighter.png~TC(1,magenta)") ("Elvish Fighter") ally_6}
|
||||
|
|
|
@ -29,8 +29,10 @@
|
|||
[message]
|
||||
speaker=unit
|
||||
caption="Study Complete"
|
||||
#wmllint: display on
|
||||
message= _ "Which type of unit would you like to be able to recruit?
|
||||
"
|
||||
#wmllint: display off
|
||||
{PICK_RECRUIT_OPTION ("units/human-loyalists/spearman.png~TC(1,magenta)") ("Spearman") troop_1}
|
||||
{PICK_RECRUIT_OPTION ("units/human-loyalists/bowman.png~TC(1,magenta)") ("Bowman") troop_2}
|
||||
{PICK_RECRUIT_OPTION ("units/human-loyalists/fencer.png~TC(1,magenta)") ("Fencer") troop_3}
|
||||
|
@ -83,11 +85,13 @@
|
|||
[message]
|
||||
speaker=unit
|
||||
caption="Research"
|
||||
#wmllint: display on
|
||||
message= _ "We are currently studying $player_$side_number|.research.current_target|. To which end would you have our scholars devote their minds?
|
||||
|
||||
Our farms produce $player_$side_number|.farming.gold|g
|
||||
Our mines produce $player_$side_number|.mining.gold|g
|
||||
"
|
||||
#wmllint: display off
|
||||
|
||||
[option]
|
||||
message= _ "Continue as before"
|
||||
|
|
|
@ -38,8 +38,10 @@
|
|||
# wmlindent: start ignoring
|
||||
[message]
|
||||
speaker=unit
|
||||
#wmllint: display on
|
||||
message= _ "What shall I do my liege?
|
||||
"
|
||||
#wmllint: display off
|
||||
|
||||
[option]
|
||||
message= _ "Nothing"
|
||||
|
|
|
@ -1859,7 +1859,7 @@ def translator(filename, mapxforms, textxform, versions):
|
|||
unclosed = None
|
||||
linecount = 1
|
||||
startline = None
|
||||
depth = quotecount = 0
|
||||
quotecount = 0
|
||||
display_state = False
|
||||
singleline = False
|
||||
for i in range(len(transformed)):
|
||||
|
@ -1869,11 +1869,6 @@ def translator(filename, mapxforms, textxform, versions):
|
|||
if not display_state and quotecount % 2:
|
||||
print >>sys.stderr, '"%s", line %d: newline within string' % (filename, linecount)
|
||||
linecount += 1
|
||||
elif transformed[i] == '{':
|
||||
if depth == 0:
|
||||
unclosed = startline = linecount
|
||||
quotecount = 0
|
||||
depth += 1
|
||||
elif transformed[i-7:i] == "message" and not transformed[i] == ']':
|
||||
singleline = True
|
||||
elif re.match(" *wmllint: *display +on", transformed[i:]):
|
||||
|
@ -1884,14 +1879,6 @@ def translator(filename, mapxforms, textxform, versions):
|
|||
quotecount += 1
|
||||
if quotecount % 2 == 0:
|
||||
singleline = False
|
||||
elif transformed[i] == '}':
|
||||
depth -= 1
|
||||
if depth == 0:
|
||||
unclosed = None
|
||||
if quotecount % 2:
|
||||
print >>sys.stderr, '"%s", line %d: unbalanced quote.' % (filename, startline)
|
||||
if unclosed:
|
||||
print >>sys.stderr, '"%s", line %d: unbalanced {.' % (filename, unclosed)
|
||||
# Return None if the transformation functions made no changes.
|
||||
if "".join(unmodified) != transformed:
|
||||
return transformed
|
||||
|
|
Loading…
Add table
Reference in a new issue