Modul:Citation: Unterschied zwischen den Versionen
K
Anzeige MB / KB
KKeine Bearbeitungszusammenfassung |
K (Anzeige MB / KB) |
||
| Zeile 97: | Zeile 97: | ||
dbJstor = '[[w:JSTOR|JSTOR]] [https://www.jstor.org/stable/%s %s]', | dbJstor = '[[w:JSTOR|JSTOR]] [https://www.jstor.org/stable/%s %s]', | ||
wbAccess = 'Internetabruf am %s', | wbAccess = 'Internetabruf am %s', | ||
wbKBytes = 'Dateigröße %s KByte' | wbKBytes = 'Dateigröße %s KByte', | ||
wbMBytes = 'Dateigröße %s MByte' | |||
} | } | ||
| Zeile 467: | Zeile 468: | ||
local function makeWebInfo( args, tab ) | local function makeWebInfo( args, tab ) | ||
local kb | |||
if isSet( args.url ) or isSet( args.articleUrl ) then | if isSet( args.url ) or isSet( args.articleUrl ) then | ||
if isSet( args.accessDate ) then | if isSet( args.accessDate ) then | ||
| Zeile 476: | Zeile 478: | ||
end | end | ||
if isSet( args.KBytes ) then | if isSet( args.KBytes ) then | ||
table.insert( tab, | kb = tonumber( args.KBytes ) or 0 | ||
mw.ustring.format( formatters.wbKBytes, args.KBytes ) ) | if kb >= 1024 then | ||
table.insert( tab, | |||
mw.ustring.format( formatters.wbMBytes, tostring( kb / 1024 ) ) ) | |||
else | |||
table.insert( tab, | |||
mw.ustring.format( formatters.wbKBytes, args.KBytes ) ) | |||
end | |||
end | end | ||
end | end | ||