Módulo:BibRules: mudanças entre as edições

Ir para navegação Ir para pesquisar
sem sumário de edição
imported>Jaideraf
Sem resumo de edição
imported>Jaideraf
Sem resumo de edição
title = "Field data string",
args = {"001", "0", "", property = "Control field data", fullpagename = target}
} or ""
local f003 =
frame:expandTemplate {
title = "Field data string",
args = {"003", "0", "", property = "Control field data", fullpagename = target}
} or ""
a = "Internamente, este registro é identificado pelo código"
b = "para sistemas externos, o código é"
end
local modificationDate =
mw.smw.ask("[[" .. target .. "]]|?Modification date#-F[l, d \\d\\e F \\d\\e Y]|headers=hide|mainlabel=-") or ""
if type(modificationDate) == "table" then
for _, row in pairs(modificationDate) do
frame:expandTemplate {
title = "Field data string",
args = {"008", "15", "3", property = "Control field data", fullpagename = target} or ""
}
if string.match(f008pubPlace, "^[A-Z]") then
title = "Field data string",
args = {"008", "35", "3", property = "Control field data", fullpagename = target}
} or ""
if string.match(f008lang, "^[A-Z]") then
a = "O uso de maiúsculas não é permitido no campo 008, idioma"
if f041 ~= "" then
if f041:sub(1, 1) == "1" then
local f041h = frame:expandTemplate {title = "Select", args = {"041", "h", target}} or ""
f041h = langTbl[f041h] or f041h
info = string.format("%s (traduzido do %s)", info, f041h)
end
-- Testa se existe(m) hifen(s) ou x minúsculo no ISBN
local f020 = mw.smw.ask("[[" .. target .. "#020]]|?Field data#|headers=hide|mainlabel=-") or ""
if type(f020) == "table" then
for _, row in pairs(f020) do
table.insert(infos, info)
end
local f041a = frame:expandTemplate {title = "Select", args = {"041", "a", target}} or false""
if string.match(f041a, "^[A-Z]") then
a = "O uso de maiúsculas não é permitido nos códigos de idioma (campo 041)"
end
-- Testa (conta) se existe mais de um ponto de acesso principal
local f100existance = frame:expandTemplate {title = "Exist", args = {"100", target}} or ""
if accessPointPresence > 1 or f100existance == "multiple" then
a = "Foi registrado <b>mais de um ponto de acesso principal</b>. Isso não é permitido"
end
-- Testa se existe ', ' no subcampo $a (Nome, Sobrenome)
local f100a = frame:expandTemplate {title = "Select", args = {"100", "a", target}} or ""
if f100a ~= "" then
if not string.match(f100a, ".-,.") then
end
end
local f100q = frame:expandTemplate {title = "Select", args = {"100", "q", target}} or ""
if f100q ~= "" then
if not string.match(f100q, "^%(") then
end
end
local f100d = frame:expandTemplate {title = "Select", args = {"100", "d", target}} or ""
if f100d ~= "" then
if string.match(f100, "%$d %d%d%d%d$") then
table.insert(infos, info)
else
local f130a = frame:expandTemplate {title = "Select", args = {"130", "a", target}} or ""
a = ucfirst(f130a:sub(f130:sub(1, 1)))
info = string.format('* %s, ele será alfabetado como "<b>%s</b>".', info, a)
else
local f240a =
string.gsub(mw.text.trim(frame:expandTemplate {title = "Select", args = {"240", "a", target}}), "[/:=.]$", "") or ""
a = "O título uniforme será alfabetado como"
b = ucfirst(f240a:sub(f240:sub(2, 2) + 1))
end
-- Testa se foi preenchido o segundo indicador do 245, se foi, mostra como será a alfabetação, removendo a pontuação final do subcampo $a ('/',':','='' ou '.')
local f245a = frame:expandTemplate {title = "Select", args = {"245", "a", target}} or ""
if f245:sub(2, 2) == "#" then
a = "Está faltando o segundo indicador do campo 245"
end
-- testa se existe "," no subcampo $a (Nome, Sobrenome)
local f700a = frame:expandTemplate {title = "Select", args = {"700", "a", target}} or ""
if f700a ~= "" then
if not string.match(f700a, ".-,.") then
end
end
local f700q = frame:expandTemplate {title = "Select", args = {"700", "q", target}} or ""
if f700q ~= "" then
if not string.match(f700q, "^%(") then
Usuário anônimo

Menu de navegação