Mòdul:Wikidades/labels i Mòdul:Wikidades/proves/labels: Diferència entre les pàgines
(Diferència entre pàgines)
Contingut suprimit Contingut afegit
minúscula |
case infoboxlabeladm |
||
Línia 312: | Línia 312: | ||
-- Codi de funcions de suport |
-- Codi de funcions de suport |
||
local function fixInfoboxLabel(label) |
local function fixInfoboxLabel(label, type) |
||
local lang = mw.language.getContentLanguage() |
local lang = mw.language.getContentLanguage() |
||
label = lang:lcfirst(label) |
label = lang:lcfirst(label) |
||
Línia 318: | Línia 318: | ||
label = infoboxlabels[label] |
label = infoboxlabels[label] |
||
else |
else |
||
⚫ | |||
⚫ | |||
label = string.gsub(label, " d'.+", "") |
|||
label = string.gsub(label, " %(.+", "") |
label = string.gsub(label, " %(.+", "") |
||
if |
if type == "adm" then |
||
label = |
label = string.gsub(label, " de .+", "") |
||
⚫ | |||
⚫ | |||
if label == 'estat' then |
|||
label = 'estat federat' |
|||
end |
|||
end |
end |
||
end |
end |