[units.wesnoth.org] fix some small issues
This commit is contained in:
parent
2cf8bcdecb
commit
f8fb04093a
4 changed files with 20 additions and 10 deletions
|
@ -359,7 +359,10 @@ class HTMLOutput:
|
|||
if u:
|
||||
m = 0
|
||||
|
||||
r[m][racename] = race.get_text_val("id") if race else "none"
|
||||
rname = race.get_text_val("id") if race else "none"
|
||||
if not rname:
|
||||
rname = "none"
|
||||
r[m][racename] = rname
|
||||
racenames = sorted(r[0].items())
|
||||
if list(r[1].items()):
|
||||
racenames += [("-", "-")] + sorted(r[1].items())
|
||||
|
@ -473,7 +476,7 @@ class HTMLOutput:
|
|||
if recursion >= 4:
|
||||
error_message(
|
||||
"Warning: Cannot find image for unit %s(%s).\n" % (
|
||||
u.get_text_val("id"), x.name))
|
||||
u.get_text_val("id"), x.name.decode("utf8")))
|
||||
return None, None
|
||||
image = self.wesnoth.get_unit_value(x, "image")
|
||||
portrait = x.get_all(tag="portrait")
|
||||
|
@ -493,7 +496,7 @@ class HTMLOutput:
|
|||
return self.pic(u, u, recursion = recursion + 1)
|
||||
error_message(
|
||||
"Warning: Missing image for unit %s(%s).\n" % (
|
||||
u.get_text_val("id"), x.name))
|
||||
u.get_text_val("id"), x.name.decode("utf8")))
|
||||
return None, None
|
||||
icpic = image_collector.add_image_check(self.addon, image)
|
||||
if not icpic.ipath:
|
||||
|
@ -514,12 +517,16 @@ class HTMLOutput:
|
|||
try: c = abilities.get_all()
|
||||
except AttributeError: c = []
|
||||
for ability in c:
|
||||
id = ability.get_text_val("id")
|
||||
try:
|
||||
id = ability.get_text_val("id")
|
||||
except AttributeError as e:
|
||||
error_message("Error: Ignoring ability " + ability.debug())
|
||||
continue
|
||||
if id in already: continue
|
||||
already[id] = True
|
||||
name = T(ability, "name")
|
||||
if not name: name = id
|
||||
if not name: name = ability.name
|
||||
if not name: name = ability.name.decode("utf8")
|
||||
anames.append(name)
|
||||
return anames
|
||||
|
||||
|
@ -897,7 +904,7 @@ class HTMLOutput:
|
|||
else:
|
||||
error_message(
|
||||
"Warning: Weapon special %s has no name for %s.\n" % (
|
||||
special.name, uid))
|
||||
special.name.decode("utf8"), uid))
|
||||
s = "<br/>".join(s)
|
||||
write("<td>%s</td>" % s)
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ rm -f $DIR/overview.txt
|
|||
echo DOWNLOADING
|
||||
$TOOLS/wesnoth_addon_manager -p $PORT -d '.*' -c $ADDONS > $LOG/wesnoth_addon_manager.txt 2>&1
|
||||
echo WORKING
|
||||
python -u $TOOLS/wmlunits -t $TRANS -D $DATA -o $TMPOUT -w $EXE -C $CONFIG -a $ADDONS -L $DIR/overview.txt -B $DIR/overview.txt -T $TIMEOUT > $LOG/wmlunits.txt 2>&1
|
||||
python3 -u $TOOLS/wmlunits -t $TRANS -D $DATA -o $TMPOUT -w $EXE -C $CONFIG -a $ADDONS -L $DIR/overview.txt -B $DIR/overview.txt -T $TIMEOUT > $LOG/wmlunits.txt 2>&1
|
||||
test -f $TMPOUT/mainline/en_US/mainline.html
|
||||
test -f $TMPOUT/'pics/core$images$units$woses$wose.png'
|
||||
rsync -vaz --delete $TMPOUT/ $OUT > $LOG/rsync.txt 2>&1
|
||||
|
|
|
@ -267,8 +267,8 @@ class Parser:
|
|||
raise WMLError(self, "Preprocessor error:\n" +
|
||||
" ".join(commandline) + "\n" +
|
||||
"First line: " + first_line + "\n" +
|
||||
out +
|
||||
err)
|
||||
out.decode("utf8") +
|
||||
err.decode("utf8"))
|
||||
|
||||
def parse_line_without_commands(self, line):
|
||||
"""
|
||||
|
|
|
@ -355,7 +355,10 @@ def list_contents():
|
|||
def process_campaign_or_era(addon, cid, define, batchlist):
|
||||
n = 0
|
||||
|
||||
print((addon + ": " + cid + " " + define))
|
||||
print(str(addon) + ": " + str(cid) + " " + str(define))
|
||||
|
||||
if not define:
|
||||
define = ""
|
||||
|
||||
wesnoth = helpers.WesnothList(
|
||||
options.wesnoth,
|
||||
|
|
Loading…
Add table
Reference in a new issue