Modul:Chronik: Unterschied zwischen den Versionen

Aus FürthWiki

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 11: Zeile 11:
if c.istJahreszahl(frame) == "true" then
if c.istJahreszahl(frame) == "true" then
year = title.text
year = title.text
error("Der Artikel ist eine Jahreszahl")
     end
     end
      
      

Version vom 18. August 2025, 16:35 Uhr

local p = {}
local c = require( "Module:Common" )

function p.Semantify(frame)
	pf = frame:getParent()
	args = pf.args
	title = mw.title.getCurrentTitle()
	
	-- Wenn das Lemma eine Jahreszahl ist, merken
	year = nil
	if c.istJahreszahl(frame) == "true" then
		year = title.text
		error("Der Artikel ist eine Jahreszahl")
    end
    
	return '->' .. args[1] .. 'x' .. args[2] .. 't:' .. title.text .. tostring(year) ..'<-'
end

return p