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

Ir para navegação Ir para pesquisar
imported>Jaideraf
Sem resumo de edição
imported>Jaideraf
Sem resumo de edição
local infos = {}
-- Somente realize as análises de existir o campo 245
if frame:expandTemplate {title = "Exist", args = {"245", target}} ~= "" then
-- Record status
test = frame:expandTemplate {title = "Field data string", args = {"000", "5", "1", property = "Leader", fullpagename = target}} or false
if test == "n" then
info =
end
-- Type of record
test = frame:expandTemplate {title = "Field data string", args = {"000", "6", "1", property = "Leader", fullpagename = target}} or false
if test == "a" then
info = "* Segundo o Líder, este registro descreve um '''material textual'''."
end
-- Bibliographic level
test = frame:expandTemplate {title = "Field data string", args = {"000", "7", "1", property = "Leader", fullpagename = target}} or false
if test == "m" then
info =
end
-- Encoding level
test = frame:expandTemplate {title = "Field data string", args = {"000", "17", "1", property = "Leader", fullpagename = target}} or false
if test == "1" then
info =
end
-- Descriptive cataloging form
test = frame:expandTemplate {title = "Field data string", args = {"000", "18", "1", property = "Leader", fullpagename = target}} or false
if test == "a" then
info = "* Segundo o Líder, este registro possui uma catalogação '''compatível com as regras do AACR 2'''."
-- Explica a sintaxe "(Biblioteca)NúmeroDeControle"
local f001 =
frame:expandTemplate {title = "Field data string", args = {"001", "0", "", property = "Control field data", fullpagename = target}}
info =
'* Internamente, este registro é identificado pelo código "' ..
frame:expandTemplate {
title = "Field data string",
args = {"003", "0", "", property = "Control field data", fullpagename = target}
} ..
")" .. f001 .. '".'
frame:expandTemplate {
title = "Field data string",
args = {"008", "15", "3", property = "Control field data", fullpagename = target}
}
if string.match(f008pubPlace, "^[A-Z]") then
frame:expandTemplate {
title = "Field data string",
args = {"008", "35", "3", property = "Control field data", fullpagename = target}
}
if string.match(f008lang, "^[A-Z]") then
end
-- Se existe o campo 041, mostra "(traduzido do... )" na mesma linha do idioma presente no 008
test = frame:expandTemplate {title = "Exist", args = {"041", target}}
if test ~= "" then
test = mw.text.trim ( frame:expandTemplate {title = "Field data string", args = {"041", "0", "1", fullpagename = target}} )
if test == "1" then
local f041h = frame:expandTemplate {title = "Select", args = {"041", "h", target}}
f041h = lang_tbl[f041h] or f041h
info = info .. " (traduzido do " .. f041h .. ")."
table.insert(infos, info)
-- Testa se existe(m) ISBN(s) inválido(s)
test = frame:expandTemplate {title = "Exist", args = {"020", target}} or false
if test ~= "" then
test = frame:expandTemplate {title = "Print ISBN"} or false
end
-- Testa o uso de maiúsculas no campo 041
test = frame:expandTemplate {title = "Exist", args = {"041", target}} or false
if test ~= "" then
test = mw.text.trim ( frame:expandTemplate {title = "Field data string", args = {"041", "0", "1", fullpagename = target}} )
if test == "#" then
info = "* <strong class='error'>Talvez o primeiro indicador do campo 041 tenha sido esquecido.</strong>"
table.insert(infos, info)
end
test = frame:expandTemplate {title = "Select", args = {"041", "a", target}} or false
if string.match(test, "^[A-Z]") then
info = "* <strong class='error'>O uso de maiúsculas não é permitido nos códigos de idioma (campo 041).</strong>"
}
-- A seguir, testa se há subcampo $b e se há espaço no subcampo $c do campo 090
test = frame:expandTemplate {title = "Exist", args = {"090", target}} or false
if test ~= "" then
test = frame:expandTemplate {title = "Select", args = {"090", "b", target}} or false
if test == "" then
info = "* <strong class='error'>Está faltando o subcampo $b do campo 090 (notação de Cutter).</strong>"
table.insert(infos, info)
end
test = frame:expandTemplate {title = "Select", args = {"090", "c", target}} or false
if string.match(test, "%sed") then
info =
end
-- A seguir, testa (conta) se existe mais de um ponto de acesso principal
local f100existance = frame:expandTemplate {title = "Exist", args = {"100", target}}
if tonumber(accessPointPresence) > 1 or f100existance == "multiple" then
info =
end
if f100existance ~= "" then
local f100 = mw.text.trim( frame:expandTemplate {title = "Field data string", args = {"100", "0", "0", fullpagename = target}} or '' )
info = "* O ponto de acesso principal foi dado a uma '''pessoa'''"
if f100:sub(1, 1) == "0" then
end
-- Testa se existe ", " no subcampo $a (Nome, Sobrenome)
local f100a = frame:expandTemplate {title = "Select", args = {"100", "a", target}}
if f100a ~= "" then
if not string.match(f100a, ".-,.") then
end
end
local f100q = frame:expandTemplate {title = "Select", args = {"100", "q", target}}
if f100q ~= "" then
if not string.match(f100q, "^%(") then
end
end
local f100d = frame:expandTemplate {title = "Select", args = {"100", "d", target}}
if f100d ~= "" then
if string.match(f100, "%$d %d%d%d%d$") then
end
-- A seguir, testa se existe um ponto de acesso principal 110
local f110existance = frame:expandTemplate {title = "Exist", args = {"110", target}}
if f110existance ~= "" then
local f110 = mw.text.trim( frame:expandTemplate {title = "Field data string", args = {"110", "0", "0", fullpagename = target}} or '' )
info = "* O ponto de acesso principal foi dado a uma '''entidade coletiva'''"
if f110:sub(1, 1) == "0" then
end
-- A seguir, testa se existe um ponto de acesso principal 111
local f111existance = frame:expandTemplate {title = "Exist", args = {"111", target}}
if f111existance ~= "" then
local f111 = mw.text.trim( frame:expandTemplate {title = "Field data string", args = {"111", "0", "0", fullpagename = target}} or '' )
info = "* O ponto de acesso principal foi dado a um '''evento'''"
if f111:sub(1, 1) == "0" then
end
-- A seguir, testa se existe um ponto de acesso principal 130
local f130existance = frame:expandTemplate {title = "Exist", args = {"130", target}}
if f130existance ~= "" then
local f130 = mw.text.trim( frame:expandTemplate {title = "Field data string", args = {"130", "0", "0", fullpagename = target}} or '' )
info = "* O ponto de acesso principal foi dado a um '''evento'''."
table.insert(infos, info)