Module:Util/config: Difference between revisions
Jump to navigation
Jump to search
m (1 revision imported) |
No edit summary |
||
Line 31: | Line 31: | ||
} | } | ||
cfg.i18n.na = '—' -- Em dash | cfg.i18n.table_cells = { | ||
yes = '[[File:Green check.svg|13px|link=|alt=Yes}|Yes]]', | |||
no = '[[File:Dark Red x.svg|13px|link=|alt=No|No]]', | |||
na = '—', -- Em dash | |||
} | |||
cfg.i18n.errors = { | cfg.i18n.errors = { |
Revision as of 14:49, 21 October 2024
This is the configuration file for Module:Util. This file can be edited to allow easy translation/porting of the module to other wikis.
The above documentation is transcluded from Module:Util/config/doc.
Editors can experiment in this module's sandbox and testcases pages.
Subpages of this module.
Editors can experiment in this module's sandbox and testcases pages.
Subpages of this module.
-------------------------------------------------------------------------------
--
-- Configuration for Module:Util
--
-------------------------------------------------------------------------------
local cfg = {}
-- ----------------------------------------------------------------------------
-- i18n
-- ----------------------------------------------------------------------------
cfg.i18n = {}
-- String values that should cast to boolean false
cfg.i18n.bool_false = {'false', '0', 'disabled', 'off', 'no', '', 'deactivated'}
cfg.i18n.range = '(%s-%s)'
cfg.i18n.args = {
-- util.args.stat
stat_infix = 'stat',
stat_id = 'id',
stat_min = 'min',
stat_max = 'max',
stat_value = 'value',
-- util.args.weight_list
spawn_weight_prefix = 'spawn_weight',
generation_weight_prefix = 'generation_weight',
}
cfg.i18n.table_cells = {
yes = '[[File:Green check.svg|13px|link=|alt=Yes}|Yes]]',
no = '[[File:Dark Red x.svg|13px|link=|alt=No|No]]',
na = '—', -- Em dash
}
cfg.i18n.errors = {
-- util.validate.factory.number_in_range
number_out_of_range = 'The number %s is out of range. It must be between %s and %s',
-- util.validate.factory.string_length
string_length_incorrect = 'The string %s is not the correct length. It must have between %s and %s characters',
not_a_string = 'value "%s" of type "%s" is not a string',
-- util.validate.factory.in_table
value_not_in_table = 'Table does not contain the value "%s"',
-- util.validate.factory.in_table
value_not_in_table_keys = 'Table does not have the value "%s" as one of its keys',
-- util.cast.factory.*
missing_element = 'Element "%s" not found',
-- util.cast.factory.percentage
invalid_argument = 'Argument "%s" is invalid. Please check the documentation for acceptable values.',
not_a_percentage = '%s must be a percentage (in range 0 to 100).',
-- util.cast.boolean
not_a_boolean = 'value "%s" of type "%s" is not a boolean',
-- util.cast.number
not_a_number = 'value "%s" of type "%s" is not a number',
number_too_small = '"%i" is too small. Minimum: "%i"',
number_too_large = '"%i" is too large. Maximum: "%i"',
-- util.cast.version
malformed_version_string = 'Malformed version string "%s"',
non_number_version_component = '"%s" has an non-number component',
unrecognized_version_number = '"%s" is not a recognized version number',
-- util.args.stats
improper_stat = '%sstat%s is improperly set; id and either value or min/max must be specified.',
-- util.args.weight_list
invalid_weight = 'Both %s and %s must be specified',
-- util.args.version
too_many_versions = 'The number of results (%s) does not match the number version arguments (%s)',
-- util.html.error
module_error = 'Module Error: ',
-- util.Error
unspecified = 'Unspecified',
-- util.string.split_args
number_of_arguments_too_large = 'Number of arguments near = is too large (%s).',
}
-- ----------------------------------------------------------------------------
-- Constants
-- ----------------------------------------------------------------------------
cfg.misc = {}
cfg.misc.category_blacklist = {}
cfg.misc.category_blacklist.sub_pages = {
doc = true,
sandbox = true,
sandbox2 = true,
testcases = true,
}
cfg.misc.category_blacklist.namespaces = {
Template = true,
Template_talk = true,
Module = true,
Module_talk = true,
User = true,
User_talk = true,
}
return cfg