Edición de «Módulo:Citas»
De Bioeticawiki
Advertencia: no has iniciado sesión. Tu dirección IP se hará pública si haces cualquier edición. Si inicias sesión o creas una cuenta, tus ediciones se atribuirán a tu nombre de usuario, además de otros beneficios.
Puedes deshacer la edición. Antes de deshacer la edición, comprueba la siguiente comparación para verificar que realmente es lo que quieres hacer, y entonces publica los cambios para así efectuar la reversión.
Revisión actual | Tu texto | ||
Línea 243: | Línea 243: | ||
if not checkurl( URL ) then | if not checkurl( URL ) then | ||
error_str = seterror( 'bad_url', {}, false, " " ) .. error_str; | error_str = seterror( 'bad_url', {}, false, " " ) .. error_str; | ||
end | end | ||
return table.concat({ "[", URL, " ", safeforurl( label ), "]", error_str }); | return table.concat({ "[", URL, " ", safeforurl( label ), "]", error_str }); | ||
Línea 336: | Línea 332: | ||
]] | ]] | ||
function pmid(id) | function pmid(id) | ||
local test_limit = | local test_limit = 30000000; -- update this value as PMIDs approach | ||
local handler = cfg.id_handlers['PMID']; | local handler = cfg.id_handlers['PMID']; | ||
local err_cat = ''; -- presume that PMID is valid | local err_cat = ''; -- presume that PMID is valid | ||
Línea 382: | Línea 378: | ||
]] | ]] | ||
function pmc(id, embargo) | function pmc(id, embargo) | ||
local test_limit = | local test_limit = 6000000; -- update this value as PMCs approach | ||
local handler = cfg.id_handlers['PMC']; | local handler = cfg.id_handlers['PMC']; | ||
local err_cat = ''; -- presume that PMC is valid | local err_cat = ''; -- presume that PMC is valid | ||
Línea 427: | Línea 423: | ||
text = "[[" .. handler.link .. "|" .. handler.label .. "]]:" .. id; | text = "[[" .. handler.link .. "|" .. handler.label .. "]]:" .. id; | ||
if is_set(inactive_year) then | if is_set(inactive_year) then | ||
table.insert( z.error_categories, " | table.insert( z.error_categories, "Bioeticawiki:Páginas con DOI inactivos desde " .. inactive_year ); | ||
else | else | ||
table.insert( z.error_categories, " | table.insert( z.error_categories, "Bioeticawiki:Páginas con DOI inactivos" ); -- when inactive doesn't contain a recognizable year | ||
end | end | ||
inactive = " (" .. cfg.messages['inactive'] .. " " .. inactive .. ")" | inactive = " (" .. cfg.messages['inactive'] .. " " .. inactive .. ")" | ||
Línea 1915: | Línea 1911: | ||
if is_set(Volume) then | if is_set(Volume) then | ||
if Volume | if ( mw.ustring.len(Volume) > 4 ) | ||
then Volume = " <b>" .. dashtohyphen(Volume) .. "</b>" | then Volume = sepc .." " .. Volume; | ||
else Volume = " <b>" .. dashtohyphen(Volume) .. "</b>"; | |||
end | end | ||
end | end | ||
Línea 2172: | Línea 2168: | ||
local in_text = " "; | local in_text = " "; | ||
local post_text = ""; | local post_text = ""; | ||
if | if is_set(Chapter) then | ||
in_text = in_text .. cfg.messages['in'] .. " " | |||
else | else | ||
post_text = ", " .. cfg.messages['editors']; | if EditorCount <= 1 then | ||
end | post_text = ", " .. cfg.messages['editor']; | ||
Editors = Editors .. post_text; | else | ||
post_text = ", " .. cfg.messages['editors']; | |||
end | |||
end | |||
if (sepc ~= '.') then in_text = in_text:lower() end | |||
Editors = in_text .. Editors .. post_text; | |||
if (string.sub(Editors,-1,-1) == sepc) | if (string.sub(Editors,-1,-1) == sepc) | ||
then Editors = Editors .. " " | then Editors = Editors .. " " |