Module:Convert/text: Difference between revisions

final tweaking to messages
(rework categories and messages per Module talk:Convert)
(final tweaking to messages)
Line 68:
local all_messages = {
-- 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;">&#91;[<i>[[Help:Convert messages#%s|<span title="Convert: %s">Convert: %s</span>]]</i>&#93;]</sup>%s',
-- Each of following messages is a table:
-- { [1] = 'title', -- mouseover title text
-- [2] = 'text', -- displaylink text (eachdisplayed starts with "Convert:" so can easily locate by searchingin article)
-- [3] = 'category key', -- key to lookup category in all_categories
-- [4] = 'anchor', -- anchor for link to relevant section on help page
-- regex = gsub_regex,
-- replace = gsub_table,
-- } Mouseover title text Link text CatKey Anchor
-- }
cvt_bad_num = { 'Value "%s" must be a number' , 'Convert: Invalid number.' , 'option', 'invalid_number' },
cvt_big_prec = { 'Precision "%s" is too large' , 'Convert: Precision too large.' , 'option', 'precision_too_large' },
cvt_invalid_num = { 'Number has overflowed' , 'Convert: Number overflow.' , 'option', 'number_overflow' },
cvt_no_num = { 'NeedNeeds the number to be converted' , 'Convert: NeedNeeds a number.' , 'option', 'need_numberneeds_number' },
cvt_no_num2 = { 'NeedNeeds another number for a range' , 'Convert: NeedNeeds another number.', 'option', 'need_another_numberneeds_another_number' },
cvt_bad_prec = { 'Precision "%s" must be an integer' , 'Convert: Invalid precision.' , 'option', 'invalid_precision' },
cvt_bad_sigfig = { 'sigfig "%s" must be a positive integer' , 'Convert: Invalid sigfig.' , 'option', 'invalid_sigfig' },
cvt_empty_option = { 'Ignored empty option "%s"' , 'Convert: Empty option.' , 'option', 'empty_option' },
cvt_no_spell = { 'Spelling is not available' , 'Convert: Bug, ask for help.' , 'option', 'ask_for_help' },
cvt_unknown_option = { 'Ignored invalid option "%s"' , 'Convert: Invalid option.' , 'option', 'invalid_option' },
cvt_bad_default = { 'Unit "%s" has an invalid default' , 'Convert: Bug, ask for help.' , 'unit' , 'ask_for_help' },
cvt_bad_unit = { 'Unit "%s" is invalid here' , 'Convert: Unit invalid here.' , 'unit' , 'unit_invalid_here' },
cvt_no_default = { 'Unit "%s" has no default output unit' , 'Convert: Bug, ask for help.' , 'unit' , 'ask_for_help' },
cvt_no_unit = { 'NeedNeeds name of unit' , 'Convert: NeedNeeds unit name.' , 'unit' , 'need_unit_nameneeds_unit_name' },
cvt_unknown = { 'Unit name "%s" is not known' , 'Convert: Unknown unit.' , 'unit' , 'unknown_unit' },
cvt_should_be = { '%s' , 'Convert: Ambiguous unit.' , 'unit' , 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace },
cvt_mismatch = { 'Cannot convert "%s" to "%s"' , 'Convert: Unit mismatch.' , 'unit' , 'unit_mismatch' },
cvt_bug_convert = { 'Bug: Cannot convert between specified units', 'Convert: Bug, ask for help.' , 'unit' , 'ask_for_help' },
cvt_lookup = { 'Unit "%s" is incorrectly defined' , 'Convert: Bug, ask for help.' , 'unit' , 'ask_for_help' },
}
 
Anonymous user