Module:Convert/text: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(rework categories and messages per Module talk:Convert) |
(final tweaking to messages) |
||
Line 68: | Line 68: | ||
local all_messages = { |
local all_messages = { |
||
-- Message format string, %s parameters: anchor, title, text, category. |
-- Message format string, %s parameters: anchor, title, text, category. |
||
-- Each displayed message starts with "Convert:" so can easily locate by searching article. |
|||
cvt_format = '<sup class="noprint Inline-Template" style="white-space:nowrap;"> |
cvt_format = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[<i>[[Help:Convert messages#%s|<span title="Convert: %s">Convert: %s</span>]]</i>]</sup>%s', |
||
-- Each of following messages is a table: |
-- Each of following messages is a table: |
||
-- { [1] = 'title', -- mouseover title text |
-- { [1] = 'title', -- mouseover title text |
||
-- [2] = 'text', -- |
-- [2] = 'text', -- link text displayed in article |
||
-- [3] = 'category key', -- key to lookup category in all_categories |
-- [3] = 'category key', -- key to lookup category in all_categories |
||
-- [4] = 'anchor', -- anchor for link to relevant section on help page |
-- [4] = 'anchor', -- anchor for link to relevant section on help page |
||
-- regex = gsub_regex, |
-- regex = gsub_regex, |
||
-- replace = gsub_table, |
-- replace = gsub_table, |
||
-- } Mouseover title text Link text CatKey Anchor |
|||
-- } |
|||
cvt_bad_num = { 'Value "%s" must be a number' , ' |
cvt_bad_num = { 'Value "%s" must be a number' , 'Invalid number' , 'option', 'invalid_number' }, |
||
cvt_big_prec = { 'Precision "%s" is too large' , ' |
cvt_big_prec = { 'Precision "%s" is too large' , 'Precision too large' , 'option', 'precision_too_large' }, |
||
cvt_invalid_num = { 'Number has overflowed' , ' |
cvt_invalid_num = { 'Number has overflowed' , 'Number overflow' , 'option', 'number_overflow' }, |
||
cvt_no_num = { ' |
cvt_no_num = { 'Needs the number to be converted' , 'Needs a number' , 'option', 'needs_number' }, |
||
cvt_no_num2 = { ' |
cvt_no_num2 = { 'Needs another number for a range' , 'Needs another number', 'option', 'needs_another_number' }, |
||
cvt_bad_prec = { 'Precision "%s" must be an integer' , ' |
cvt_bad_prec = { 'Precision "%s" must be an integer' , 'Invalid precision' , 'option', 'invalid_precision' }, |
||
cvt_bad_sigfig = { 'sigfig "%s" must be a positive integer' , ' |
cvt_bad_sigfig = { 'sigfig "%s" must be a positive integer' , 'Invalid sigfig' , 'option', 'invalid_sigfig' }, |
||
cvt_empty_option = { 'Ignored empty option "%s"' , ' |
cvt_empty_option = { 'Ignored empty option "%s"' , 'Empty option' , 'option', 'empty_option' }, |
||
cvt_no_spell = { 'Spelling is not available' , ' |
cvt_no_spell = { 'Spelling is not available' , 'Bug, ask for help' , 'option', 'ask_for_help' }, |
||
cvt_unknown_option = { 'Ignored invalid option "%s"' , ' |
cvt_unknown_option = { 'Ignored invalid option "%s"' , 'Invalid option' , 'option', 'invalid_option' }, |
||
cvt_bad_default = { 'Unit "%s" has an invalid default' , ' |
cvt_bad_default = { 'Unit "%s" has an invalid default' , 'Bug, ask for help' , 'unit' , 'ask_for_help' }, |
||
cvt_bad_unit = { 'Unit "%s" is invalid here' , ' |
cvt_bad_unit = { 'Unit "%s" is invalid here' , 'Unit invalid here' , 'unit' , 'unit_invalid_here' }, |
||
cvt_no_default = { 'Unit "%s" has no default output unit' , ' |
cvt_no_default = { 'Unit "%s" has no default output unit' , 'Bug, ask for help' , 'unit' , 'ask_for_help' }, |
||
cvt_no_unit = { ' |
cvt_no_unit = { 'Needs name of unit' , 'Needs unit name' , 'unit' , 'needs_unit_name' }, |
||
cvt_unknown = { 'Unit name "%s" is not known' , ' |
cvt_unknown = { 'Unit name "%s" is not known' , 'Unknown unit' , 'unit' , 'unknown_unit' }, |
||
cvt_should_be = { '%s' , ' |
cvt_should_be = { '%s' , 'Ambiguous unit' , 'unit' , 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace }, |
||
cvt_mismatch = { 'Cannot convert "%s" to "%s"' , ' |
cvt_mismatch = { 'Cannot convert "%s" to "%s"' , 'Unit mismatch' , 'unit' , 'unit_mismatch' }, |
||
cvt_bug_convert = { 'Bug: Cannot convert between specified units', ' |
cvt_bug_convert = { 'Bug: Cannot convert between specified units', 'Bug, ask for help' , 'unit' , 'ask_for_help' }, |
||
cvt_lookup = { 'Unit "%s" is incorrectly defined' , ' |
cvt_lookup = { 'Unit "%s" is incorrectly defined' , 'Bug, ask for help' , 'unit' , 'ask_for_help' }, |
||
} |
} |
||