Module:Dochead: Difference between revisions
add invocation hatnote |
edit message for templates that have a corresponding module that it does not use |
||
| Line 152: | Line 152: | ||
elseif has_module and not is_module_invoked then | elseif has_module and not is_module_invoked then | ||
result = string.format( | result = string.format( | ||
"This template | "This template has a Lua module [[Module:%s]] of the same name that it does not use.", | ||
corr_module | corr_module | ||
) | ) | ||
else | else | ||
| Line 171: | Line 170: | ||
elseif has_module and not is_module_invoked then | elseif has_module and not is_module_invoked then | ||
result = string.format( | result = string.format( | ||
"This metatemplate | "This metatemplate has a Lua module [[Module:%s]] of the same name that it does not use.", | ||
corr_module | corr_module | ||
) | ) | ||
else | else | ||
| Line 191: | Line 189: | ||
elseif has_module and header ~= "" and not is_module_invoked then | elseif has_module and header ~= "" and not is_module_invoked then | ||
result = string.format( | result = string.format( | ||
"%s. This template | "%s. This template has a Lua module [[Module:%s]] of the same name that it does not use.", | ||
header, | header, | ||
corr_module | corr_module | ||
) | ) | ||
elseif has_module and header == "" and is_module_invoked then | elseif has_module and header == "" and is_module_invoked then | ||
| Line 203: | Line 200: | ||
elseif has_module and header == "" and not is_module_invoked then | elseif has_module and header == "" and not is_module_invoked then | ||
result = string.format( | result = string.format( | ||
"This template | "This template has a Lua module [[Module:%s]] of the same name that it does not use.", | ||
corr_module | corr_module | ||
) | ) | ||
else | else | ||