diff --git a/data/tools/unit_tree/html_output.py b/data/tools/unit_tree/html_output.py index 0501fb67ea7..79665acc689 100644 --- a/data/tools/unit_tree/html_output.py +++ b/data/tools/unit_tree/html_output.py @@ -49,11 +49,11 @@ top_bar = ''' \n") - write("
  •  
  • ") - write("
  •  
  • ") - write('
  • Overview
  • ') + write('') write("\n") @@ -634,10 +634,12 @@ class HTMLOutput: except TypeError: pass racename = un.name - attributes += " class=\"raceheader\"" - write("" % attributes) - write("%s" % (racename, racename)) - write("\n") + # TODO: we need to use a unique race id instead of a potentially duplicate + # name for the header id and link target! + attributes += " id=\"%s\" class=\"raceheader\"" % racename + write("") + write("%s" % (racename, racename)) + write("\n") elif un: u = un.unit attributes += " class=\"unitcell\"" @@ -664,11 +666,8 @@ class HTMLOutput: uaddon = "mainline" if "mainline" not in u.campaigns: uaddon = self.addon link = "../../%s/%s/%s.html" % (uaddon, self.isocode, uid) - write("
    %s" % ( - link, uid, "i")) - write("
    ") write("
    L%s%s
    " % (level, crown)) - write("%s
    " % (link, name)) + write("%s
    " % (link, uid, name)) write('
    ') image, portrait = self.pic(u, u) @@ -692,12 +691,12 @@ class HTMLOutput: # Write info about abilities. anames = self.get_abilities(u) if anames: - write("\n
    ") + write("\n
    ") write(", ".join(anames)) write("
    ") # Write info about attacks. - write("\n
    ") + write("\n
    ") attacks = self.get_recursive_attacks(u) for attack in attacks: @@ -742,7 +741,7 @@ class HTMLOutput: self.write_units() - self.output.write('
    ') + self.output.write(html_clear_floats) self.output.write("
    ") self.output.write(html_footer % { @@ -832,8 +831,8 @@ class HTMLOutput: write("

    Information

    \n") write("\n") write("\n") - write("\n") write("\n") - write("\n") - write("" % text) + write("" % text) write("" % x) write("\n") @@ -890,7 +889,7 @@ class HTMLOutput: anames = self.get_abilities(unit) write("\n") - write("" % _("Abilities: ", "wesnoth-help")) + write("" % _("Abilities: ", "wesnoth-help")) write("") write("\n") @@ -1094,7 +1093,7 @@ class HTMLOutput: write('') # columns parent - self.output.write('
    ') + self.output.write(html_clear_floats) write('') # main self.output.write(html_footer % {
    %s" % _("Advances from: ", "wesnoth-help")) - write("\n") + write("%s" % _("Advances from: ", "wesnoth-help")) + write("\n") for pid in self.forest.get_parents(uid): punit = self.wesnoth.unit_lookup[pid] if "mainline" in unit.campaigns and "mainline" not in punit.campaigns: @@ -847,8 +846,8 @@ class HTMLOutput: write("\n%s" % (link, name)) write("
    %s" % _("Advances to: ", "wesnoth-help")) - write("\n") + write("%s" % _("Advances to: ", "wesnoth-help")) + write("\n") for cid in self.forest.get_children(uid): try: cunit = self.wesnoth.unit_lookup[cid] @@ -877,12 +876,12 @@ class HTMLOutput: ("experience", _("XP: ")), ("level", _("Level") + ": "), ("alignment", _("Alignment: ")), - ("id", "ID")]: + ("id", "Id: ")]: x = uval(val) if not x and val in ("jamming", "vision"): continue if val == "alignment": x = _(x) write("
    %s%s%s
    %s%s" + (", ".join(anames)) + "