Line 58: |
Line 58: |
| *[[${ship_code}|List of ${ship_type}s]]${wikipedia}${extra_links}]=], | | *[[${ship_code}|List of ${ship_type}s]]${wikipedia}${extra_links}]=], |
| | | |
− | _wikipedia = [=[ | + | _wikipedia = [=[*[[wikipedia:${wikipedia}|Wikipedia entry on ${ship_type} ${ship_name}]]]=], |
− | *[[wikipedia:${wikipedia}|Wikipedia entry on ${ship_type} ${ship_name}]]]=], | |
| | | |
| _sandbox_notice = [=[<div style="width:90%; border:2px solid #aa5; background:#ffc; text-align:center; margin:15px auto 20px; padding:5px;">This is a testing ship page, it does not correspond to an actual ship.</div> | | _sandbox_notice = [=[<div style="width:90%; border:2px solid #aa5; background:#ffc; text-align:center; margin:15px auto 20px; padding:5px;">This is a testing ship page, it does not correspond to an actual ship.</div> |
Line 120: |
Line 119: |
| local ship = Ship(ship_name) | | local ship = Ship(ship_name) |
| local ship_type = ship:type() | | local ship_type = ship:type() |
− | local name = ship:name() | + | local ship_name_ = ship:name() |
| + | local ship_type_ = Formatting:format_ship_type(ship_type) |
| local wikipedia = ship:wikipedia() | | local wikipedia = ship:wikipedia() |
| return format{ | | return format{ |
| ShipPage._footer_links, | | ShipPage._footer_links, |
| fullpagename = basepagename == "Sandbox" and ("Sandbox/" .. ship_name) or ship_name, | | fullpagename = basepagename == "Sandbox" and ("Sandbox/" .. ship_name) or ship_name, |
− | ship_name = name, | + | ship_name = ship_name_, |
| ship_code = Formatting:format_ship_code(ship_type), | | ship_code = Formatting:format_ship_code(ship_type), |
− | ship_type = Formatting:format_ship_type(ship_type), | + | ship_type = ship_type_, |
− | wikipedia = wikipedia and format{ | + | wikipedia = wikipedia and ("\n" .. format{ |
| ShipPage._wikipedia, | | ShipPage._wikipedia, |
− | ship_name = name, | + | ship_name = ship_name_, |
− | ship_type = ship_type, | + | ship_type = ship_type_, |
| wikipedia = wikipedia | | wikipedia = wikipedia |
− | } or "", | + | }) or "", |
| extra_links = args.explicit.links and ("\n" .. args.explicit.links) or "" | | extra_links = args.explicit.links and ("\n" .. args.explicit.links) or "" |
| } | | } |