Path of Exile Wiki

Please consider helping keep the wiki up to date. Check the to-do list of updates needed for version 3.14.0.

Game data exports will becoming later as the technical changes in addition to regular changes take some more time.

READ MORE

Path of Exile Wiki
Register
Advertisement
Template info icon Module documentation[view] [edit] [history] [purge]

This is the configuration file for Module:Util. This file can be edited to allow easy translation/porting of the module to other wikis.

-------------------------------------------------------------------------------
-- 
--                        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.na = 'N/A'

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.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.args.from_cargo_map
    missing_key_in_fields = 'Key "%s" not found in the fields mapping of table "%s"',
    table_object_as_default = 'Warning: table object as default value on key "%s" in mapping of table "%s"',
    missing_key_in_order = 'Fields mapping of table "%s" has the following extra keys that are not handled by order:\n%s',
    handler_returned_nil = 'Handler for "%s.fields.%s" returned nil for argument "%s". Check whether the value is correct for the given field type "%s".',
    argument_required = 'Argument "%s" is required',

    -- util.html.error
    module_error = 'Module Error: ',

    -- util.misc.raise_error_or_return
    invalid_raise_error_or_return_usage = 'Invalid usage of raise_error_or_return.',

    -- util.smw.array_query
    duplicate_ids_found = 'Found multiple pages for id property "%s" with value "%s": %s, %s',
    missing_ids_found = 'No results were found for id property "%s" with the following values: %s',

    -- 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
Advertisement