Changes

no edit summary
Line 19: Line 19:  
_ship_data_documentation = "Template:ShipDataDocumentation/EditIntro",
 
_ship_data_documentation = "Template:ShipDataDocumentation/EditIntro",
 
_edit_link_text = "Edit",
 
_edit_link_text = "Edit",
 +
_localized_name_template = "<p>''${localized_name}''</p>",
 
_kekkon_max_template = "Maximum after marriage: ${value}",
 
_kekkon_max_template = "Maximum after marriage: ${value}",
 
_nick_template = " (''${nick} ${japanese_nick}'')",
 
_nick_template = " (''${nick} ${japanese_nick}'')",
Line 31: Line 32:  
|-
 
|-
 
|colspan="6" style="position: relative; text-align: center; background-color: ${top_bg_color};${top_extra_style}" title="${rarity}"|<div style="position: absolute; right: 5px;">${edit_link}</div>
 
|colspan="6" style="position: relative; text-align: center; background-color: ${top_bg_color};${top_extra_style}" title="${rarity}"|<div style="position: absolute; right: 5px;">${edit_link}</div>
<p style="font-size:20px">'''${name}'''</p>
+
<p style="font-size:20px">'''${name}'''</p>${localized_name}
 
<p style="font-size:15px">'''No.${id} ${japanese_name}${nick}'''</p>
 
<p style="font-size:15px">'''No.${id} ${japanese_name}${nick}'''</p>
 
<p>'''${class} ${type}'''</p>
 
<p>'''${class} ${type}'''</p>
Line 111: Line 112:  
function ShipInfoKai:name(ship)
 
function ShipInfoKai:name(ship)
 
return Formatting:format_link(ship:link())
 
return Formatting:format_link(ship:link())
 +
end
 +
 +
function ShipInfoKai:localized_name(ship)
 +
local localized_name = ship:localized_name()
 +
if localized_name then
 +
return format{self._localized_name_template, localized_name = Formatting:format_stat(localized_name)}
 +
else
 +
return ""
 +
end
 
end
 
end
   Line 375: Line 385:  
vars.top_bg_color, vars.top_extra_style = self:bg_color(ship)
 
vars.top_bg_color, vars.top_extra_style = self:bg_color(ship)
 
vars.name = self:name(ship)
 
vars.name = self:name(ship)
 +
vars.localized_name = self:localized_name(ship)
 
vars.id = self:id(ship)
 
vars.id = self:id(ship)
 
vars.japanese_name = self:japanese_name(ship)
 
vars.japanese_name = self:japanese_name(ship)
Anonymous user