106
edits
| (6 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
all languages would have a single wiki, leaving in as this may change in the | all languages would have a single wiki, leaving in as this may change in the | ||
future ]] | future ]] | ||
if string.lower(lang) == 'en' then | if lang and string.lower(lang) == 'en' then | ||
require('Module:Icon/en') | require('Module:Icon/en') | ||
else | else | ||
| Line 18: | Line 18: | ||
if resource ~= nil then | if resource ~= nil then | ||
-- Init link here, will be nil if resource is nil | -- Init link here, will be nil if resource is nil | ||
if com.exists(link) | if not com.exists(link) then | ||
link = resource['link'] | link = resource['link'] | ||
end | end | ||
| Line 30: | Line 30: | ||
value = '' | value = '' | ||
end | end | ||
result = '[[file:' | result = '[[file:' | ||
.. resource['file'] | .. resource['file'] | ||
.. '| | .. '|20px|link=' | ||
.. link | .. link | ||
.. ']]' | .. ']]' | ||
| Line 40: | Line 39: | ||
if com.exists(text) then | if com.exists(text) then | ||
if string.lower(text) ~= 'no' then | if string.lower(text) ~= 'no' then | ||
result = result .. '[[' | result = result .. ' [[' | ||
.. link | .. link | ||
.. ']]' | .. ']]' | ||
edits