Modul:File link: Perbedaan antara revisi
Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]])
dw>Baloo Official (trans params.origArgs.file :error => galat (ID)) |
dw>MusikAnimal (Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]])) |
||
Baris 1: | Baris 1: | ||
-- This module provides a library for formatting file wikilinks. | -- This module provides a library for formatting file wikilinks. | ||
local yesno = require(' | local yesno = require('Module:Yesno') | ||
local checkType = require('libraryUtil').checkType | local checkType = require('libraryUtil').checkType | ||
Baris 14: | Baris 14: | ||
if type(val) ~= 'string' then | if type(val) ~= 'string' then | ||
error(string.format( | error(string.format( | ||
" | "type error in '%s' parameter of '_main' (expected string, got %s)", | ||
key, type(val) | key, type(val) | ||
), level) | ), level) | ||
Baris 81: | Baris 81: | ||
function p.main(frame) | function p.main(frame) | ||
local origArgs = require(' | local origArgs = require('Module:Arguments').getArgs(frame, { | ||
wrappers = ' | wrappers = 'Template:File link' | ||
}) | }) | ||
if not origArgs.file then | if not origArgs.file then | ||
error(" | error("'file' parameter missing from [[Template:File link]]", 0) | ||
end | end | ||