Diferencia entre revisiones de «Módulo:Citas»
m 1 revisión importada |
wikitves>Techso01 Sin resumen de edición |
||
Línea 280: | Línea 280: | ||
end | end | ||
return table.concat({ "[", URL, " ", safeforurl( label ), "]", error_str }); | return table.concat({ "[", URL, " ", safeforurl( label ), "]", error_str }); | ||
end | end | ||
--[[--------------------------< N O R M A L I Z E _ L C C N >-------------------------------------------------- | --[[--------------------------< N O R M A L I Z E _ L C C N >-------------------------------------------------- | ||
Línea 917: | Línea 852: | ||
elseif k == 'DOI' then | elseif k == 'DOI' then | ||
table.insert( new_list, {handler.label, doi( v, options.DoiBroken ) } ); | table.insert( new_list, {handler.label, doi( v, options.DoiBroken ) } ); | ||
elseif k == 'LCCN' then | elseif k == 'LCCN' then | ||
table.insert( new_list, {handler.label, lccn( v ) } ); | table.insert( new_list, {handler.label, lccn( v ) } ); | ||
Línea 1337: | Línea 1270: | ||
local Quote = A['Quote']; | local Quote = A['Quote']; | ||
local PostScript = A['PostScript']; | local TransQuote = A['TransQuote']; | ||
local PostScript = A['PostScript']; | |||
local LayURL = A['LayURL']; | local LayURL = A['LayURL']; | ||
Línea 1898: | Línea 1832: | ||
if is_set(Title) then | if is_set(Title) then | ||
if not is_set(TitleLink) and is_set(URL) then | if not is_set(TitleLink) and is_set(URL) then | ||
Title = externallink( URL, Title ) .. TransError .. Format | Title = externallink( URL, Title, URL_origin, UrlAccess ) .. TransError .. Format | ||
URL = ""; | URL = ""; | ||
TieneURL = true; | TieneURL = true; | ||
Línea 2123: | Línea 2057: | ||
if is_set(URL) then | if is_set(URL) then | ||
URL = " " .. externallink( URL, nil, URLorigin ); | URL = " " .. externallink( URL, nil, URLorigin, UrlAccess ); | ||
end | end | ||
Línea 2137: | Línea 2071: | ||
end | end | ||
if is_set(Quote) then | if is_set(Quote) or is_set(TransQuote) then | ||
-- Eliminar comillas de Quote | -- Eliminar comillas de Quote | ||
if (Quote:sub(1,1) == '"' and Quote:sub(-1,-1) == '"') or | if (Quote:sub(1,1) == '"' and Quote:sub(-1,-1) == '"') or | ||
Línea 2148: | Línea 2082: | ||
Quote:sub(-1,-1) == '!' then | Quote:sub(-1,-1) == '!' then | ||
PostScript = "" | PostScript = "" | ||
end | end | ||
-- Eliminar comillas de TransQuote | |||
if (TransQuote:sub(1, 1) == '"' and TransQuote:sub(-1, -1) == '"') or | |||
(Quote:sub(1,1) == '«' and Quote:sub(-1,-1) == '»') then | |||
TransQuote = TransQuote:sub(2, -2); | |||
end | |||
-- No añadir el punto final a la cita si el campo TransQuote ya incluye un punto | |||
if TransQuote:sub(-1,-1) == '.' or TransQuote:sub(-1,-1) == '?' or | |||
TransQuote:sub(-1,-1) == '!' then | |||
PostScript = "" | |||
end | |||
Quote = Quote .. " " .. wrap( 'trans-quoted-title', TransQuote ); | |||
TransQuote = wrap( 'trans-quoted-title', TransQuote ); | |||
Quote = sepc .." " .. wrap( 'quoted-text', Quote ); | Quote = sepc .." " .. wrap( 'quoted-text', Quote ); | ||
end | end |