Changes

no edit summary
Line 10: Line 10:  
_template = [[{|class="${table_class}"  
 
_template = [[{|class="${table_class}"  
 
|-
 
|-
!class="infobox-kai-header-major" colspan=2|${name} ${japanese_name}
+
!class="infobox-kai-header-major" colspan=2|${name}
 
|-
 
|-
 
!Class
 
!Class
Line 29: Line 29:  
     _flat_template = [[{|class="${table_class}"  
 
     _flat_template = [[{|class="${table_class}"  
 
|-
 
|-
!class="infobox-kai-header-major" colspan=4|${name} ${japanese_name}
+
!class="infobox-kai-header-major" colspan=4|${name}
 
|-
 
|-
 
!${voice_actor_header}
 
!${voice_actor_header}
Line 44: Line 44:  
_artist_header = "[[Glossary#List of Vessels by Artist|Artist]]",
 
_artist_header = "[[Glossary#List of Vessels by Artist|Artist]]",
 
_class_template = "[[:Category:${ship_class}|${ship_class}]]",
 
_class_template = "[[:Category:${ship_class}|${ship_class}]]",
_person_template = "${name} (${japanese_name})",
+
_name_template = "${name} (${japanese_name})",
 
_normal_construction_label = "Normal",
 
_normal_construction_label = "Normal",
 
_large_ship_construction_label = "LSC",
 
_large_ship_construction_label = "LSC",
Line 90: Line 90:  
function ShipMetaKai:name()
 
function ShipMetaKai:name()
 
self._vars.name = Formatting:format_stat(self._ship:name())
 
self._vars.name = Formatting:format_stat(self._ship:name())
self._vars.japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(self._ship:japanese_name())))
+
local japanese_name = Formatting:format_stat(self._ship:japanese_name())
 +
if japanese_name ~= self._vars.name then
 +
    self._vars.name = format{self._name_template, name = self._vars.name, japanese_name = tostring(Formatting:japanese_text(japanese_name))}
 +
end
 
end
 
end
   Line 117: Line 120:  
    japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(person:japanese_name()), Formatting:format_stat(person:reading())))
 
    japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(person:japanese_name()), Formatting:format_stat(person:reading())))
 
end
 
end
return format{self._person_template, name = Formatting:format_external_link(person:link()), japanese_name = japanese_name}
+
return format{self._name_template, name = Formatting:format_external_link(person:link()), japanese_name = japanese_name}
 
end
 
end
  
Anonymous user