Module:MOS intervals: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
do not overcomplicate: one line per cell is more readable than one line per row |
||
| Line 30: | Line 30: | ||
-- Create the table | -- Create the table | ||
local result = | local result = '{| class="wikitable mw-collapsible' .. (is_collapsed and ' mw-collapsed"\n' or '"\n') | ||
-- Create table title | -- Create table title | ||
result = result | result = result | ||
.. | .. '|+ style="font-size: 105%; white-space: nowrap;" | ' .. string.format('Intervals of %s\n', scale_sig) | ||
.. | .. '|-\n' | ||
-- Create table headers | -- Create table headers | ||
result = result | result = result | ||
.. | .. '! colspan="3" | Intervals\n' | ||
.. | .. '! rowspan="2" | Steps<br />subtended\n' | ||
.. | .. '! rowspan="2" | Range in cents\n' | ||
.. | .. '|-\n' -- Start of second row of header cells | ||
.. | .. '! Generic\n' | ||
.. | .. '! Specific\n' | ||
.. | .. '! Abbrev.\n' | ||
-- Write each row | -- Write each row | ||
for i = 1, #bright_step_matrix do | for i = 1, #bright_step_matrix do | ||
| Line 61: | Line 61: | ||
result = result .. "|-\n" | result = result .. "|-\n" | ||
.. string.format("| '''%s-%sstep'''", i - 1, mos_prefix) | .. string.format("| '''%s-%sstep'''\n", i - 1, mos_prefix) | ||
.. string.format(" | .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case", mos_prefix)) | ||
.. string.format(" | .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev" , mos_abbrev)) | ||
.. string.format(" | .. string.format("| %s\n" , mos.interval_as_string(current_bright_interval)) | ||
.. string.format(" | .. string.format("| %.1f¢\n", cents) | ||
.. "\n" | .. "\n" | ||
else | else | ||
| Line 80: | Line 80: | ||
result = result .. "|-\n" | result = result .. "|-\n" | ||
.. string.format("| rowspan=\"2\" | %s-%sstep", i - 1, mos_prefix) | .. string.format("| rowspan=\"2\" | %s-%sstep\n", i - 1, mos_prefix) | ||
.. string.format(" | .. string.format("| %s\n" , tamnams.interval_quality(current_dark_interval, input_mos, "sentence-case", mos_prefix)) | ||
.. string.format(" | .. string.format("| %s\n" , tamnams.interval_quality(current_dark_interval, input_mos, "abbrev" , mos_abbrev)) | ||
.. string.format(" | .. string.format("| %s\n" , mos.interval_as_string(current_dark_interval)) | ||
.. string.format(" | .. string.format("| %s\n" , dark_interval_range) | ||
.. "\n" | .. "\n" | ||
.. "|-\n" | .. "|-\n" | ||
.. string.format("| %s" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case", mos_prefix)) | .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case", mos_prefix)) | ||
.. string.format(" | .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev" , mos_abbrev)) | ||
.. string.format(" | .. string.format("| %s\n" , mos.interval_as_string(current_bright_interval)) | ||
.. string.format(" | .. string.format("| %s\n" , bright_interval_range) | ||
end | end | ||
result = result .. "\n" | result = result .. "\n" | ||