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

sem sumário de edição
imported>Jaideraf
Sem resumo de edição
imported>Jaideraf
Sem resumo de edição
test = frame:expandTemplate {title = "Exist", args = {"041"}}
if test ~= "" then
test = mw.text.trim ( frame:expandTemplate {title = "Field data string", args = {"041", "0", "1"}} or false)
if test == "1" then
local f041h = frame:expandTemplate {title = "Select", args = {"041", "h"}}
f041h = lang_tbl[f041h] or f041h
info = info .. "  (traduzido do " .. f041h .. ")."
end
end
test = frame:expandTemplate {title = "Exist", args = {"041"}} or false
if test ~= "" then
test = mw.text.trim ( frame:expandTemplate {title = "Field data string", args = {"041", "0", "1"}} or false)
if test == "#" then
info = "* <strong class='error'>Talvez o primeiro indicador do campo 041 tenha sido esquecido.</strong>"
end
end
-- A seguir, testa se existe um ponto de acesso principal 111
--[[
local f111existance = frame:expandTemplate {title = "Exist", args = {"111"}}
--]]
if f111existance ~= "" then
local f111 = mw.text.trim( frame:expandTemplate {title = "Field data string", args = {"111", "0", "0"}} or '' )
info = "* O ponto de acesso principal foi dado a um '''evento'''"
if f111:sub(1, 1) == "0" then
info = info .. " e a entrada começa por um '''nome invertido'''."
table.insert(infos, info)
elseif f111:sub(1, 1) == "1" then
info = info .. " e a entrada começa por um '''nome de jurisdição'''."
table.insert(infos, info)
elseif f111:sub(1, 1) == "2" then
info = info .. " e a entrada começa por um '''nome em ordem direta'''."
table.insert(infos, info)
elseif f111:sub(1, 1) == "#" then
info = info .. ", porém, <strong class='error'>o primeiro indicador não foi preenchido.</strong>"
table.insert(infos, info)
elseif
f111:sub(1, 1) == "3" or f111:sub(1, 1) == "4" or f111:sub(1, 1) == "5" or f111:sub(1, 1) == "6" or
f111:sub(1, 1) == "7" or
f111:sub(1, 1) == "8" or
f111:sub(1, 1) == "9"
then
info = info .. ", porém, <strong class='error'>o primeiro indicador foi preenchido incorretamente.</strong>"
table.insert(infos, info)
end
if f111:sub(2, 2) ~= "#" then
info =
"* <strong class='error'>O segundo indicador do campo 111 foi preenchido, porém, ele não deve ser preenchido.</strong>"
table.insert(infos, info)
end
end
-- A seguir, testa se existe um ponto de acesso principal 130
local f130existance = frame:expandTemplate {title = "Exist", args = {"130"}}
if f130existance ~= "" then
local f130 = mw.text.trim( frame:expandTemplate {title = "Field data string", args = {"130", "0", "0"}} or '' )
info = "* O ponto de acesso principal foi dado a um '''evento'''."
table.insert(infos, info)
if f130:sub(2, 2) ~= "#" then
info =
"* <strong class='error'>O segundo indicador do campo 130 foi preenchido, porém, ele não deve ser preenchido.</strong>"
table.insert(infos, info)
end
end
-- A seguir, testa se existe um ponto de acesso principal. Se existir, testa se o primeiro indicador do campo 245 condiz com essa realidade
--[[
--]]
end -- end if 245
return table.concat(infos, "\n")
Usuário anônimo