26.701
Bearbeitungen
(geändertes Formular) |
(fix subobjekte Wörterbuch) |
||
| Zeile 6: | Zeile 6: | ||
local smw = require("Modul:SMW") | local smw = require("Modul:SMW") | ||
local wik = require("Modul:Wiki") | local wik = require("Modul:Wiki") | ||
local beruf_texte = { | |||
["weiblich"] = | |||
{["Einzahl"] = "Einzahl generisch Maskulinum", | |||
["Mehrzahl"] = "Mehrzahl Maskulinum"}, | |||
["männlich"] = | |||
{["Einzahl"] = "Einzahl Femininum", | |||
["Mehrzahl"] = "Mehrzahl Femininum"}, | |||
["divers"] = | |||
{["Einzahl"] = "Einzahl divers", | |||
["Mehrzahl"] = "Mehrzahl divers"}} | |||
function p.Faktenbox(frame) | function p.Faktenbox(frame) | ||
| Zeile 78: | Zeile 89: | ||
if not fbdata.attr.noattr then | if not fbdata.attr.noattr then | ||
for _, anzahl in ipairs{"Einzahl", "Mehrzahl"} do | for _, anzahl in ipairs{"Einzahl", "Mehrzahl"} do | ||
for _, geschlecht in ipairs{" | for _, geschlecht in ipairs{"weiblich", "männlich", "divers"} do | ||
local anzahl_geschlecht = anzahl | local anzahl_geschlecht = beruf_texte[geschlecht][anzahl] | ||
local v = fbdata.pargs["Berufsbezeichnung " .. anzahl_geschlecht] or "" | local v = fbdata.pargs["Berufsbezeichnung " .. anzahl_geschlecht] or "" | ||
if v ~= "" then | if v ~= "" then | ||
v = {"Wörterbuch " .. anzahl_geschlecht, | |||
["SubObjektTyp"] = "Wörterbuch Beruf", ["Beruf"] = v, | |||
["SubObjektTyp"] = "Wörterbuch Beruf", | ["Bemerkung"] = anzahl, ["Geschlecht"] = geschlecht} | ||
mw.smw.subobject(v) | |||
[" | |||
end | end | ||
end | end | ||