11.314
suntingan
Tidak ada ringkasan suntingan Tag: Dikembalikan |
Tidak ada ringkasan suntingan Tag: Dikembalikan |
||
| Baris 2: | Baris 2: | ||
-- Get required modules. | -- Get required modules. | ||
local getArgs = require(' | local getArgs = require('Modul:Arguments').getArgs | ||
local messageBox = require(' | local messageBox = require('Modul:Message box') | ||
-- Get the config table. | -- Get the config table. | ||
local cfg = mw.loadData(' | local cfg = mw.loadData('Modul:Documentation/config') | ||
local i18n = mw.loadData(' | local i18n = mw.loadData('Modul:Documentation/i18n') | ||
local p = {} | local p = {} | ||
| Baris 33: | Baris 33: | ||
expectType = expectType or 'string' | expectType = expectType or 'string' | ||
if type(msg) ~= expectType then | if type(msg) ~= expectType then | ||
error(require(' | error(require('Modul:TNT').format('I18n/Documentation', 'cfg-error-msg-type', cfgKey, expectType, type(msg)), 2) | ||
end | end | ||
if not valArray then | if not valArray then | ||
| Baris 41: | Baris 41: | ||
local function getMessageVal(match) | local function getMessageVal(match) | ||
match = tonumber(match) | match = tonumber(match) | ||
return valArray[match] or error(require(' | return valArray[match] or error(require('Modul:TNT').format('I18n/Documentation', 'cfg-error-msg-empty', '$' .. match, cfgKey), 4) | ||
end | end | ||