Анонимный участник
Модуль:Sources: различия между версиями
Новая страница: «Test»
/>Vlsergey-at-work (Новая страница: «Test») |
/>Vlsergey-at-work (Новая страница: «Test») |
||
Строка 58: | Строка 58: | ||
local options_commas_nolinks = { separator = ', ', conjunction = ', ', format = function( src ) return src end, nolinks = true, preferids = false }; | local options_commas_nolinks = { separator = ', ', conjunction = ', ', format = function( src ) return src end, nolinks = true, preferids = false }; | ||
local options_commas_it = { separator = ', ', conjunction = ', ', format = function( src ) return "''" .. src .. "''" end, nolinks = false, preferids = false }; | local options_commas_it = { separator = ', ', conjunction = ', ', format = function( src ) return "''" .. src .. "''" end, nolinks = false, preferids = false }; | ||
local options_commas_it_short = { separator = ', ', conjunction = ', ', format = function( src ) return "''" .. src .. "''" end, nolinks = false, preferids = false, short = true }; | |||
local options_commas_it_nolinks = { separator = ', ', conjunction = ', ', format = function( src ) return "''" .. src .. "''" end, nolinks = true , preferids = false }; | local options_commas_it_nolinks = { separator = ', ', conjunction = ', ', format = function( src ) return "''" .. src .. "''" end, nolinks = true , preferids = false }; | ||
local options_citetypes = { separator = ' ', conjunction = ' ', format = function( src ) return 'citetype_' .. src end, nolinks = true , preferids = true }; | local options_citetypes = { separator = ' ', conjunction = ' ', format = function( src ) return 'citetype_' .. src end, nolinks = true , preferids = true }; | ||
Строка 201: | Строка 202: | ||
if ( type( src.publication.title or '') ~= 'string' ) then error('type of src.publication.title is not string but ' .. type( src.publication.title ) ) end; | if ( type( src.publication.title or '') ~= 'string' ) then error('type of src.publication.title is not string but ' .. type( src.publication.title ) ) end; | ||
result = result .. ' // ' .. toString( context, src.publication, | result = result .. ' // ' .. toString( context, src.publication, options_commas_it_short ); | ||
if ( src.publication.subtitle ) then | if ( src.publication.subtitle ) then | ||
result = result .. ': ' .. toString( context, src.publication.subtitle, | result = result .. ': ' .. toString( context, src.publication.subtitle, options_commas_it_short ); | ||
end | end | ||
end | end | ||
Строка 221: | Строка 222: | ||
end | end | ||
if ( src.publisher ) then | if ( src.publisher ) then | ||
result = result .. toString( context, src.publisher, | result = result .. toString( context, src.publisher, options_commas_short ); | ||
if ( src.year ) then | if ( src.year ) then | ||
result = result .. ', '; | result = result .. ', '; | ||
Строка 411: | Строка 412: | ||
and claim.mainsnak.datavalue.value.language == context.lang ) then | and claim.mainsnak.datavalue.value.language == context.lang ) then | ||
title = claim.mainsnak.datavalue.value.text; | title = claim.mainsnak.datavalue.value.text; | ||
mw.log('Got title of ' .. entityId .. ' from short name claim: «' .. title .. '»' ) | |||
break; | break; | ||
end | end |