Modul:LinkISBN: Unterschied zwischen den Versionen
i18n nach Module:LinkISBN/i18n ausgelagert
(Umbenennung) |
(i18n nach Module:LinkISBN/i18n ausgelagert) |
||
Zeile 2: | Zeile 2: | ||
local LinkISBN = { | local LinkISBN = { | ||
suite = 'LinkISBN', | suite = 'LinkISBN', | ||
serial = ' | serial = '2021-03-24', | ||
item = 65157187 | item = 65157187 | ||
} | } | ||
Zeile 12: | Zeile 12: | ||
local ci = require( 'Module:Check_isxn' ) | local ci = require( 'Module:Check_isxn' ) | ||
local fs = require( 'Module:Failsafe' ) | local fs = require( 'Module:Failsafe' ) | ||
local | local lb = require( 'Module:LinkISBN/i18n' ) | ||
local lu = require( 'Module:Link utilities' ) | local lu = require( 'Module:Link utilities' ) | ||
local yn = require( 'Module:Yesno' ) | local yn = require( 'Module:Yesno' ) | ||
Zeile 27: | Zeile 27: | ||
m = m:gsub( 'ISBN *', '' ):upper() -- x -> X | m = m:gsub( 'ISBN *', '' ):upper() -- x -> X | ||
local t = '<span class="' .. | local t = '<span class="' .. lb.booksourcesClass .. '">[[Special:Booksources/' | ||
.. m .. '|' .. 'ISBN ' .. m .. ']]</span>' | .. m .. '|' .. 'ISBN ' .. m .. ']]</span>' | ||
if not ignoreError then | if not ignoreError then | ||
t = t .. ci._check_isbn( m, | t = t .. ci._check_isbn( m, | ||
lb.invalidISBN .. ( demo and '' or lb.invalidCat ) ) | |||
end | end | ||
if comment ~= '' then | if comment ~= '' then | ||
Zeile 51: | Zeile 50: | ||
local ns = mw.title.getCurrentTitle().namespace | local ns = mw.title.getCurrentTitle().namespace | ||
local isDemo = ns == 10 or ns == 828 | local isDemo = ns == 10 or ns == 828 | ||
-- split separate ISBNs | -- split separate ISBNs | ||
local items = lu.splitItems( args.isbn, | local items = lu.splitItems( args.isbn, lb.delimiters ) | ||
-- analyse ISBNs | -- analyse ISBNs |