Zum Inhalt springen

Modul:LinkISBN: Unterschied zwischen den Versionen

Wartung
(local)
(Wartung)
Zeile 1: Zeile 1:
-- I18n
-- documentation
local LinkISBN = {
suite  = 'LinkISBN',
serial = '2019-07-09',
item  = 65157187
}
 
-- module variable, i18n
local li = {
local li = {
invalid    = '&nbsp;<span class="error">Ungültige ISBN</span>',
invalid    = '&nbsp;<span class="error">Ungültige ISBN</span>',
Zeile 12: Zeile 19:
}
}


-- module import
local ci = require( 'Module:Check_isxn' )
local ci = require( 'Module:Check_isxn' )
local lb = require( 'Module:LinkBase' )
local lb = require( 'Module:LinkBase' )
Zeile 47: Zeile 55:


function li.linkISBNSet( args )
function li.linkISBNSet( args )
local ns    = mw.title.getCurrentTitle().namespace
local isDemo = ns == 10 or ns == 828
args.isbn    = args.isbn or args[1] or ''
args.isbn    = args.isbn or args[1] or ''
args.noerror = yn( args.noerror or '', false )
args.noerror = yn( args.noerror or '', false )
Zeile 56: Zeile 61:
end
end


local ns    = mw.title.getCurrentTitle().namespace
local isDemo = ns == 10 or ns == 828
local result = '', i, s
local result = '', i, s


Zeile 65: Zeile 73:
s = li.linkISBN( items[ i ], args.noerror, isDemo )
s = li.linkISBN( items[ i ], args.noerror, isDemo )
if s ~= '' then
if s ~= '' then
if result == '' then
result = ( result ~= '' and result .. ', ' or '' ) .. s
result = s
else
result = result .. ', ' .. s
end
end
end
end
end
Anonymer Benutzer