Modul:Wikidata/lib: Porovnání verzí

Smazaný obsah Přidaný obsah
m zjednodušení
m konečně
(Není zobrazena jedna mezilehlá verze od stejného uživatele.)
Řádek 19:
function p.IsSnakValue(snak)
return snak.snaktype == 'value'
end
 
function p.getLabelInLanguage(entityId, langs)
langs = p.textToTable(langs)
local label, lang = mw.wikibase.getLabelWithLang(entityId)
if label then
for _, lg in ipairs(langs) do
if lg == lang then
return label, lang
end
end
end
return nil, nil
end