Módulo:BibRules: mudanças entre as edições
Conteúdo deletado Conteúdo adicionado
Sem resumo de edição |
Sem resumo de edição |
||
(15 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
Linha 26:
""
if f245 ~= "" then
-- Categorias
local categories =
frame:callParserFunction {
name = "#ask:[[" .. target .. "]]",
args = {
"?Category",
format = "plainlist",
link = "none",
headers = "hide",
mainlabel = "-",
outro = "",
sep = "",
valuesep = "",
propsep = "",
prefix = "none"
}
} or ""
-- Record status
local recordStatus =
Linha 139 ⟶ 156:
table.insert(infos, info)
-- Campo 008
local invalidCode = '<strong class="error">código inválido para o local de publicação
local pubPlaceTbl = {
["acb"] = "Acre",
Linha 182 ⟶ 199:
["eua"] = invalidCode,
["fra"] = invalidCode,
["pt "] = invalidCode,
[" "] = '<strong class="error">é necessário informar um código de local de publicação, campo 008.</strong>'
}
Linha 318 ⟶ 336:
args = { "?Field data", format = "count", mainlabel = "-" }
} or 0
accessPointPresence = tonumber(accessPointPresence) or 0
-- Testa se há subcampo $b e se há espaço no subcampo $c do campo 090
local f090 =
Linha 324 ⟶ 342:
""
if f090 ~= "" then
if string.match(f090, ",") then
a = "Normalmente não há vírgula no campo 090, reveja"
info = string.format('* <strong class="error">%s.</strong>', a)▼
table.insert(infos, info)▼
end
local f090b = frame:expandTemplate { title = "Select", args = { "090", "b", target } } or ""
if f090b == "" then
Linha 392 ⟶ 415:
if string.match(f100a, "[a-zÀ-ü],[A-ZÀ-ü]") then
a = "Falta espaço após a vírgula. Verifique o campo 100"
info = string.format('* <strong class="error">%s.</strong>', a)▼
table.insert(infos, info)▼
end
if string.match(f100a, "%d%d%d%d") then
a = "No campo 100, o ano deve ser informado no subcampo $d"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
Linha 492 ⟶ 520:
else
local f130a = frame:expandTemplate { title = "Select", args = { "130", "a", target } } or ""
a = ucfirst(f130a:sub(tonumber(f130:sub(1, 1)) or 0))
info = string.format('* %s, ele será alfabetado como "<b>%s</b>".', info, a)
table.insert(infos, info)
Linha 715 ⟶ 743:
end
else
if string.match(categories, "Livro") then
a = "Está faltando o subcampo $a do campo 260"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
end
if string.match(f260a, "[a-zA-ZÀ-ü%]]:") then
a =
'Normalmente, o final do subcampo $a do campo 260 requer a seguinte pontuação " : " (perceba o espaço antes da pontuação)'
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
Linha 728 ⟶ 764:
end
else
if string.match(categories, "Livro") then
a = "Está faltando o subcampo $b do campo 260"
▲ info = string.format('* <strong class="error">%s.</strong>', a)
info = string.format('* <strong class="error">%s.</strong>', a)
▲ table.insert(infos, info)
table.insert(infos, info)
end
end
local f260c = frame:expandTemplate { title = "Select", args = { "260", "c", target } } or ""
Linha 802 ⟶ 840:
if string.match(f300b, "il%. ?; p&b") then
a = "'Ilustrações pretas e brancas' (il. p&b) é uma expressão só, remova o ponto e vírgula da expressão"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
-- Testa se os itens do subcampo $b estão separados por ponto e vírgula
if string.match(f300b, "il%. ?; gráf") then
a = "No campo 300, $b, os itens devem ser separados por vírgulas (il., gráfs.)"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
Linha 822 ⟶ 866:
end
else
if string.match(categories, "Livro") then
a = "Está faltando o subcampo $c do campo 300"
▲ info = string.format('* <strong class="error">%s.</strong>', a)
info = string.format('* <strong class="error">%s.</strong>', a)
▲ table.insert(infos, info)
table.insert(infos, info)
end
end
-- Testa se a pontuação antes da dimensão é ".", "," ou ":"
Linha 861 ⟶ 907:
if string.match(f490a, "^%(") then
a = "Segundo as orientações do MARC 21, não inclua os parênteses no campo 490 ou 830"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
-- Testa se o início da série/coleção começa com letra minúscula
if string.match(f490a, "^[a-zà-ÿ]") then
a = "Normalmente, o início de uma série/coleção (490 $a) começa com letra maiúscula"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
-- Testa se há espaço antes do ponto e vírgula da série
if string.match(f490a, "[a-zA-ZÀ-ü0-9];") then
a = 'O sinal de ponto e vírgula (";") deve ser sempre precedido por um espaço. Reveja a pontuação'
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
Linha 965 ⟶ 1 023:
if string.match(f600a, "[a-zÀ-ü],[A-ZÀ-ü]") then
a = "Falta espaço após a vírgula. Verifique o campo 600"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
if string.match(f600a, "%d%d%d%d") then
a = "No campo 600, o ano deve ser informado no subcampo $d"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
Linha 1 115 ⟶ 1 178:
if string.match(f700a, "[a-zÀ-ü],[A-ZÀ-ü]") then
a = "Falta espaço após a vírgula. Verifique o campo 700"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
if string.match(f700a, "%d%d%d%d") then
a = "No campo 700, o ano deve ser informado no subcampo $d"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
Linha 1 123 ⟶ 1 191:
if not string.match(f700q, "^%(") then
a = "O subcampo $q do campo 700 necessita parênteses"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
end
local f700e = frame:expandTemplate { title = "Select", args = { "700", "e", target } } or ""
if f700e ~= "" then
if string.match(f700, "[a-zA-ZÀ-ü0-9%]-]%s?%$e") then
a = "O subcampo $e do campo 700 deve ser precedido por uma vírgula"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
|