Modul:Failsafe: Unterschied zwischen den Versionen
simplified
(simplified) |
(simplified) |
||
Zeile 2: | Zeile 2: | ||
local Failsafe = { | local Failsafe = { | ||
suite = 'Failsafe', | suite = 'Failsafe', | ||
serial = '2021-04- | serial = '2021-04-09', | ||
item = 65306115 | item = 65306115 | ||
} | } | ||
Zeile 10: | Zeile 10: | ||
ok = '[[File:Artículo bueno.svg|16px|text-bottom|Ok!]]', | ok = '[[File:Artículo bueno.svg|16px|text-bottom|Ok!]]', | ||
notOk = '[[File:Symbol oppose vote.svg|15px|text-bottom|Contra]][[Category:Andere Modulversion in Wikidata]]', | notOk = '[[File:Symbol oppose vote.svg|15px|text-bottom|Contra]][[Category:Andere Modulversion in Wikidata]]', | ||
versionText = 'Versionsbezeichnung auf Wikidata:', | versionText = 'Versionsbezeichnung auf Wikidata:', | ||
noVersion = 'keine Version verfügbar' | noVersion = 'keine Version verfügbar' | ||
Zeile 88: | Zeile 87: | ||
function fs.getModuleVersion( frame ) | function fs.getModuleVersion( frame ) | ||
local result = strings.versionText .. ' ' .. strings.noVersion | local result = strings.versionText .. ' ' .. strings.noVersion | ||
local | local fromModule, fromWikidata, m, success | ||
local title = mw.ustring.gsub( mw.title.getCurrentTitle().text, '/' .. strings.docPage, '' ) | local title = mw.ustring.gsub( mw.title.getCurrentTitle().text, '/' .. strings.docPage, '' ) | ||
Zeile 101: | Zeile 100: | ||
fromModule = m.moduleInterface.serial | fromModule = m.moduleInterface.serial | ||
fromWikidata = fs._failsafe( 'wikidata', m.moduleInterface ) | fromWikidata = fs._failsafe( 'wikidata', m.moduleInterface ) | ||
end | end | ||
if fromWikidata or fromModule then | if fromWikidata or fromModule then | ||
Zeile 112: | Zeile 107: | ||
result = result .. ' ' .. | result = result .. ' ' .. | ||
( fromWikidata == fromModule and strings.ok or strings.notOk ) | ( fromWikidata == fromModule and strings.ok or strings.notOk ) | ||
end | end | ||
end | end |