Jump to content

Talk:CL-154-class cruiser

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Use of metric conversion functions

[edit]

The use of metric conversion functions is to be applauded. However, their use is generating results inconsistent with sources such as NavWeaps.com and with other Wiki articles:

  • Sources list the 5-inch gun as 127mm. This was originally hard-coded in the article. A conversion function replaced the hard text and changed it to 130mm. This was reverted. Then a conversion function was added that yielded the correct 127mm. Good!
  • A conversion function was added to the 6-inch gun entry. This yielded the correct value of 152mm. Very good!
  • A conversion function was added to the 8-inch gun entry. This yielded a value of 200mm rather than the correct value of 203mm. Not good!
  • A conversion function was added to the 12-inch gun entry. This yielded a value of 300mm rather than the correct value of 305mm. Also not good!

I would suggest that edits with these functions be viewed in Preview mode and then checked against NavWeaps.com before saving. It should be noted that a rifled gun bore diameter can be measured in multiple ways, and so globally and historically there is no single way to convert them.Tfdavisatsnetnet (talk) 21:01, 11 October 2021 (UTC)[reply]

OK, figured out that the function required the addition of the "|0" parm. Problem is now resolved. Asking the SMEs: where can I find info on the use of these and other functions such as 'sclass'?Tfdavisatsnetnet (talk) 21:15, 11 October 2021 (UTC)[reply]
Click on the ships banner above and there is a link on the right called Tools and Templates. The sclass template is there. Be aware of compound modifier use and why things are hyphenated or not and why certain classes are italicized or not. Llammakey (talk) 23:49, 11 October 2021 (UTC)[reply]