Bearbeiten von „Modul:TemplUtl“
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 1: | Zeile 1: | ||
local TemplUtl = { suite = "TemplUtl", | local TemplUtl = { suite = "TemplUtl", | ||
serial = "2019-11- | serial = "2019-11-12", | ||
item = 52364930 }; | item = 52364930 }; | ||
local Failsafe = TemplUtl; | local Failsafe = TemplUtl; | ||
Zeile 103: | Zeile 103: | ||
r = false; | r = false; | ||
else | else | ||
if not TemplUtl. | if not TemplUtl.L10N then | ||
local lucky; | |||
s = string.format( "Module:%s/local", | |||
TemplUtl.suite ); | |||
lucky, TemplUtl.L10N = pcall( mw.loadData, s ); | |||
end | |||
if type( TemplUtl.L10N ) == "table" then | |||
local entry; | |||
if not TemplUtl.lang then | |||
-- TODO: page language | |||
TemplUtl.lang = | |||
mw.language.getContentLanguage():getCode(); | |||
TemplUtl. | |||
end | end | ||
entry = TemplUtl.L10N[ TemplUtl.lang ]; | |||
if type( entry ) == "table" then | |||
s = entry[ r ]; | |||
if type( s ) == "boolean" then | |||
r = s; | |||
end | |||
end | end | ||
else | |||
TemplUtl.L10N = true; | |||
end | end | ||
if type( r ) ~= "boolean" then | if type( r ) ~= "boolean" then | ||
if type( another ) ~= "nil" then | |||
r = TemplUtl.faculty( another ); | |||
else | |||
r = true; | r = true; | ||
end | end | ||
end | end | ||
Zeile 706: | Zeile 696: | ||
item ) ) | item ) ) | ||
if type( entity ) == "table" then | if type( entity ) == "table" then | ||
local vsn = entity:formatPropertyValues( "P348" ) | |||
local vsn | |||
if type( vsn ) == "table" and | if type( vsn ) == "table" and | ||
type( vsn.value ) == "string" and | type( vsn.value ) == "string" and |