Importer, Bürokraten, Moderatoren (CommentStreams), Strukturierte-Diskussionen-Bots, Oberflächenadministratoren, Push-Abonnementverwalter, Oversighter, Administratoren, Kampagnenbearbeiter (Hochladeassistent)
855
Bearbeitungen
w>PerfektesChaos (2020-02-01) |
K (43 Versionen von wikivoyage:Modul:Multilingual importiert) |
||
| (4 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
local Multilingual = { suite = "Multilingual", | local Multilingual = { suite = "Multilingual", | ||
serial = "2020- | serial = "2020-12-10", | ||
item = 47541920, | item = 47541920, | ||
globals = { ISO15924 = 71584769, | globals = { ISO15924 = 71584769, | ||
| Zeile 63: | Zeile 63: | ||
-- Postcondition: | -- Postcondition: | ||
-- Returns whatever, probably table | -- Returns whatever, probably table | ||
-- | -- 2020-01-01 | ||
local storage = access | local storage = access | ||
local finer = function () | local finer = function () | ||
| Zeile 98: | Zeile 98: | ||
end | end | ||
if not lucky and alert then | if not lucky and alert then | ||
error( "Missing or invalid page: " .. storage | error( "Missing or invalid page: " .. storage ) | ||
end | end | ||
end | end | ||
| Zeile 1.353: | Zeile 1.353: | ||
-- Retrieve versioning and check for compliance | -- Retrieve versioning and check for compliance | ||
-- Precondition: | -- Precondition: | ||
-- atleast -- string, with required version | -- atleast -- string, with required version | ||
-- | -- or wikidata|item|~|@ or false | ||
-- Postcondition: | -- Postcondition: | ||
-- Returns string -- with queried version, also if problem | -- Returns string -- with queried version/item, also if problem | ||
-- false -- if appropriate | -- false -- if appropriate | ||
-- | -- 2020-08-17 | ||
local since = atleast | local since = atleast | ||
local last = ( since == "~" ) | |||
local linked = ( since == "@" ) | |||
local link = ( since == "item" ) | |||
local r | local r | ||
if last or since == "wikidata" then | if last or link or linked or since == "wikidata" then | ||
local item = Failsafe.item | local item = Failsafe.item | ||
since = false | since = false | ||
if type( item ) == "number" and item > 0 then | if type( item ) == "number" and item > 0 then | ||
local | local suited = string.format( "Q%d", item ) | ||
if link then | |||
r = suited | |||
else | |||
local entity = mw.wikibase.getEntity( suited ) | |||
if type( entity ) == "table" then | |||
local seek = Failsafe.serialProperty or "P348" | |||
local vsn = entity:formatPropertyValues( seek ) | |||
if type( vsn ) == "table" and | |||
r = false | type( vsn.value ) == "string" and | ||
vsn.value ~= "" then | |||
r = vsn.value | if last and vsn.value == Failsafe.serial then | ||
r = false | |||
elseif linked then | |||
if mw.title.getCurrentTitle().prefixedText | |||
== mw.wikibase.getSitelink( suited ) then | |||
r = false | |||
else | |||
r = suited | |||
end | |||
else | |||
r = vsn.value | |||
end | |||
end | end | ||
end | end | ||
| Zeile 1.614: | Zeile 1.627: | ||
local seek = frame.args[ 2 ] | local seek = frame.args[ 2 ] | ||
local salt = frame.args.alt | local salt = frame.args.alt | ||
local r = Multilingual.tabData( suite, seek, salt, frame ) | |||
return r | |||
end -- p.tabData | end -- p.tabData | ||