Module:Citation/CS1: Difference between revisions
sync with sandbox, reposition translation error to avoid wrapping in url
m>Dragons flight (escape values that look like Lua back patterns) |
m>Dragons flight (sync with sandbox, reposition translation error to avoid wrapping in url) |
||
Line 1,021: | Line 1,021: | ||
Chapter = ""; | Chapter = ""; | ||
end | end | ||
local TransError = "" | |||
if TransChapter ~= "" and Chapter == "" then | if TransChapter ~= "" and Chapter == "" then | ||
TransError = " " .. seterror( 'trans_missing_chapter' ); | |||
end | end | ||
Chapter = Chapter .. TransChapter | Chapter = Chapter .. TransChapter | ||
Line 1,028: | Line 1,030: | ||
if ( ChapterLink == nil ) then | if ( ChapterLink == nil ) then | ||
if ( ChapterURL and "" < ChapterURL ) then | if ( ChapterURL and "" < ChapterURL ) then | ||
Chapter = "[" .. ChapterURL .. " " .. safeforurl( Chapter ) .. "]" | Chapter = "[" .. ChapterURL .. " " .. safeforurl( Chapter ) .. "]" .. TransError; | ||
if URL == nil or URL == "" then | if URL == nil or URL == "" then | ||
Chapter = Chapter .. Format; | Chapter = Chapter .. Format; | ||
Line 1,034: | Line 1,036: | ||
end | end | ||
elseif ( URL and "" < URL ) then | elseif ( URL and "" < URL ) then | ||
Chapter = "[" .. URL .. " " .. safeforurl( Chapter ) .. "]" .. Format | Chapter = "[" .. URL .. " " .. safeforurl( Chapter ) .. "]" .. TransError .. Format | ||
URL = nil | URL = nil | ||
Format = "" | Format = "" | ||
end | else | ||
Chapter = Chapter .. TransError; | |||
end | |||
elseif ChapterURL ~= nil and ChapterURL ~= "" then | elseif ChapterURL ~= nil and ChapterURL ~= "" then | ||
Chapter = Chapter .. " [" .. ChapterURL .. " " .. safeforurl( ChapterURL ) .. "]" .. | Chapter = Chapter .. " [" .. ChapterURL .. " " .. safeforurl( ChapterURL ) .. "]" .. | ||
seterror( 'bare_url_missing_title' ); | TransError .. " " .. seterror( 'bare_url_missing_title' ); | ||
else | |||
Chapter = Chapter .. TransError; | |||
end | end | ||
Chapter = Chapter .. sepc .. " " -- with end-space | Chapter = Chapter .. sepc .. " " -- with end-space | ||
Line 1,065: | Line 1,071: | ||
Title = ""; | Title = ""; | ||
end | end | ||
local TransError = ""; | |||
if TransTitle ~= "" and Title == "" then | if TransTitle ~= "" and Title == "" then | ||
TransError = " " .. seterror( 'trans_missing_title' ); | |||
end | end | ||
Title = Title .. TransTitle | Title = Title .. TransTitle | ||
if Title ~= "" then | if Title ~= "" then | ||
if ( TitleLink == nil and URL and "" < URL ) then | if ( TitleLink == nil and URL and "" < URL ) then | ||
Title = "[" .. URL .. " " .. safeforurl( Title ) .. "]" .. Format | Title = "[" .. URL .. " " .. safeforurl( Title ) .. "]" .. TransError .. Format | ||
URL = nil | URL = nil | ||
Format = '' | Format = '' | ||
else | |||
Title = Title .. TransError; | |||
end | end | ||
end | end |