မေႃႇၵျူး:Parameter validation/default config
ၽိုၼ်ၵႅမ်မိုဝ်းမေႃႇၵျူး[သၢင်ႈ]
တွၼ်ႈတႃႇ Scribunto module ဢၼ်ၼႆႉ ၸဝ်ႈၵဝ်ႇ ၸၢင်ႈ သၢင်ႈ ၼႃႈလိၵ်ႈ ၼႆႉလႆႈယူႇၶႃႈ။ ၽူႈၸိူဝ်းမႄးထတ်းၶဝ် ၸၢင်ႈၸၢမ်းတူၺ်းလႆႈ ၸိူဝ်းပဵၼ်ၼႃႈလိၵ်ႈ sandbox (သၢင်ႈ | ငဝ်းမိူၼ်) လႄႈ testcases (သၢင်ႈ) ႁင်း မေႃႇၵျူးဢၼ်ၼႆႉ လႆႈယူႇၶႃႈ။ သႂ်ႇပိူင်ထၢၼ်ႈ ၵႃႈတီႈ ၼႃႈလိၵ်ႈၽႄ /doc လႄႈ။ ၼႃႈလိၵ်ႈၽႄ ႁင်း မေႃႇၵျူး ဢၼ်ၼႆႉ။. |
function create(cat, msg)
return mw.ustring.format("{{main other|[[Category:Pages using tname_naked with %s parameters]]}}", cat) .. create_message(msg)
end
function create_message(msg)
return require('Module:If preview')._warning({
mw.ustring.format("[[templatename]] used with %s.", msg)
})
end
local options = {
["undeclared"] = create("unknown", 'unknown parameter(s): paramname'),
["deprecated"] = create("deprecated", 'deprecated parameter(s): paramname'),
["duplicate"] = create("duplicate", 'duplicate parameter(s): paramandvalue'),
["doc-subpage"] = "doc",
}
local result = {
[0] = options,
[2] = options,
[4] = options,
[6] = options,
[10] = options,
[12] = options,
[14] = options,
}
return result