ARBEIT MACHT FREI

Moduł:Arguments i Moduł:Arguments/sandbox: Różnica pomiędzy stronami

(Różnica między stronami)
Przejdź do nawigacji Przejdź do wyszukiwania
Strona 1
Strona 2
m 1 wersja
 
m 1 wersja
 
Linia 166: Linia 166:
if tidyVal then
if tidyVal then
if type(tidyVal) ~= 'function' then
if type(tidyVal) ~= 'function' then
error(
error(require('Module:TNT').format('I18n/Module:Arguments', 'err-bad-val', type(tidyVal)), 2)
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
end
elseif options.trim ~= false then
elseif options.trim ~= false then
Linia 269: Linia 263:
end
end
if options.readOnly then
if options.readOnly then
error(
error(require('Module:TNT').format('I18n/Module:Arguments', 'err-table-ro', tostring(key)), 2)
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
elseif options.noOverwrite and args[key] ~= nil then
error(
error(require('Module:TNT').format('I18n/Module:Arguments', 'err-key-exists', tostring(key)), 2)
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
elseif val == nil then
--[[
--[[