Здесь указаны все параметры:

{{Тиэкистуһунан
| ААТА                  = 
| ПОДЗАГОЛОВОК          = 
| ЧАСТЬ                 = 
| ААПТАР                = 
| ААПТАРА_СУОХ          = 
| ААПТАРДАР             = 
| ААПТАР1               = 
| СОДЕРЖАНИЕ            = 
| ИЗЦИКЛА               = 
| ИЗСБОРНИКА            = 
| ДАТАСОЗДАНИЯ          = 
| ДАТАПУБЛИКАЦИИ        = 
| ЯЗЫКОРИГИНАЛА         = 
| НАЗВАНИЕОРИГИНАЛА     = 
| ПОДЗАГОЛОВОКОРИГИНАЛА = 
| ТЫЛБААСЧЫТ            = 
| ИСТОЧНИК              = 
| БИКИПИЭДЬИЙЭ          = 
| ВИКИЦИТАТНИК          = 
| ВИКИСКЛАД             = 
| ДРУГОЕ                = 
| ИЗОБРАЖЕНИЕ           = 
| ОПИСАНИЕИЗОБРАЖЕНИЯ   = 
| ПРЕДЫДУЩИЙ            = 
| СЛЕДУЮЩИЙ             = 
| КАЧЕСТВО              = 
| НЕОДНОЗНАЧНОСТЬ       = 
| НАВИГАЦИЯ             = 
}}

Новичку нужно знать, что нельзя использовать все четыре параметра «авторов» одновременно (| АВТОР= | НЕТ_АВТОРА= | АВТОРЫ= | АВТОР1=), но необходимо выбрать из них только одну графу. Чаще всего это | АВТОР1= (после чего вводится полное имя автора) или | АВТОР= (после чего вводится полное имя автора в двойных квадратных скобках, а также желательно его годы жизни в круглых скобках). Практически это выглядит так. Вы вводите, например:

{{Тиэкистуһунан
| ААПТАР1               = Джонни Сэнди
| ААТА                  = Сахара
| ЧАСТЬ                 = Часть 2
| ПОДЗАГОЛОВОК          = Проверка
| ИЗЦИКЛА               =
| ИЗСБОРНИКА            =
| ДАТАСОЗДАНИЯ          =
| ДАТАПУБЛИКАЦИИ        = 431 до. н. э.
| ЯЗЫКОРИГИНАЛА         = en
| НАЗВАНИЕОРИГИНАЛА     = Sand-box
| ПОДЗАГОЛОВОКОРИГИНАЛА = Test
| ТЫЛБААСЧЫТ            = Иван Иванович Иванов
| ИСТОЧНИК              = http://lib.ru
| ДРУГОЕ                = другое
| ВИКИПЕДИЯ             =
| ВИКИЦИТАТНИК          =
| ВИКИСКЛАД             =
| ИЗОБРАЖЕНИЕ           =
| ОПИСАНИЕИЗОБРАЖЕНИЯ   =
| ПРЕДЫДУЩИЙ            = [[Часть 1|Часть 1]]
| СЛЕДУЮЩИЙ             = [[Часть 1|Часть 3]]
| СОДЕРЖАНИЕ            =
| НЕОДНОЗНАЧНОСТЬ       = Сахара
}}

И результат выглядит так:

Сахара (Проверка) — Часть 2
ааптара биллибэт
Ошибка скрипта: Модуля «Атын төрүттэр» не существует.local currentProject = 'sahwikisource';

local otherSources = {

    { id = 'Q20078554', argument = 'БСЭ1',  title = 'БСЭ1',  project = 'sahwikisource',	titleVT = 'БСЭ1/$1',   titleDO = 'БСЭ1/$1'},
    { id = 'Q4086271',  argument = 'БЭАН',  title = 'БЭАН',  project = 'sahwikisource',	titleVT = 'БЭАН/$1',   titleDO = 'БЭАН/$1'},
    { id = 'Q4091878',  argument = 'БЭЮ',   title = 'БЭЮ',   project = 'sahwikisource',	titleVT = 'БЭЮ/$1',    titleDO = 'БЭЮ/$1'},
    { id = 'Q4114391',  argument = 'ВЭ',    title = 'ВЭ',    project = 'sahwikisource',	titleVT = 'ВЭ/ВТ/$1',  titleDO = 'ВЭ/ДО/$1'},
    { id = 'Q19147760', argument = 'ГСС',   title = 'ГСС',   project = 'sahwikisource',	titleVT = 'ГСС/ДО/$1', titleDO = 'ГСС/ДО/$1'},
    { id = 'Q4173137',  argument = 'ЕЭБЕ',  title = 'ЕЭБЕ',  project = 'sahwikisource',	titleVT = 'ЕЭБЕ/$1',   titleDO = 'ЕЭБЕ/$1'},
    { id = 'Q19180675', argument = 'МЭСБЕ', title = 'МЭСБЕ', project = 'sahwikisource',	titleVT = 'МЭСБЕ/$1',  titleDO = 'МЭСБЕ/$1'},
    { id = 'Q19190511', argument = 'НЭС',   title = 'НЭС',   project = 'sahwikisource',	titleVT = 'НЭС/$1',    titleDO = 'НЭС/$1'},
    { id = 'Q19211082', argument = 'ПБЭ',   title = 'ПБЭ',   project = 'sahwikisource',	titleVT = 'ПБЭ/ВТ/$1', titleDO = 'ПБЭ/ДО/$1'},
    { id = 'Q1960551',  argument = 'РБС',   title = 'РБС',   project = 'sahwikisource',	titleVT = 'РБС/ВТ/$1', titleDO = 'РБС/ДО/$1'},
    { id = 'Q19217220', argument = 'РЭСБ',  title = 'РЭСБ',  project = 'sahwikisource',	titleVT = 'РЭСБ/$1',   titleDO = 'РЭСБ/$1'},
    { id = 'Q1970746',  argument = 'ТСД',   title = 'ТСД',   project = 'sahwikisource',	titleVT = 'ТСД/$1',    titleDO = 'ТСД/$1/ДО'},
    { id = 'Q20078551', argument = 'ТЭ1',   title = 'ТЭ1',   project = 'sahwikisource',	titleVT = 'ТЭ1/$1',    titleDO = 'ТЭ1/$1'},
    { id = 'Q4532135',  argument = 'ЭЛ',    title = 'ЭЛ',    project = 'sahwikisource',	titleVT = 'ЭЛ/ВТ/$1',  titleDO = 'ЭЛ/ДО/$1'},     
    { id = 'Q602358',   argument = 'ЭСБЕ',  title = 'ЭСБЕ',  project = 'sahwikisource',	titleVT = 'ЭСБЕ/$1',   titleDO = 'ЭСБЕ/$1/ДО'},
    { id = 'Q590208',		argument = 'ADB',			title = 'ADB',							project = 'dewikisource',	projectCode = 'de:',	prefix='ADB:',											suffix=	},
    { id = 'Q19077875',	argument = 'AC',			title = 'American Cycl. (1879)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The American Cyclopædia (1879)/',				suffix=	},
    { id = 'Q19037977',	argument = 'AMB',			title = 'American Med. Biogr. (1920)',	project = 'enwikisource',	projectCode = 'en:',	prefix='American Medical Biographies/',					suffix=	},
    { id = 'Q12912667',	argument = 'ACAB-1',		title = 'Appletons\' (1887—1901)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Appletons\' Cyclopædia of American Biography/',	suffix=	},
    { id = 'Q20096917',	argument = 'Британника-9',	title = 'Britannica (9-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='Encyclopædia Britannica, Ninth Edition/',		suffix=	},
    { id = 'Q867541',		argument = 'Британника',	title = 'Britannica (11-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1911 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q15987490',	argument = 'Британника-12',	title = 'Britannica (12-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1922 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q302556',		argument = 'Catholic',		title = 'Catholic Enc. (1907—13)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Catholic Encyclopedia (1913)/',					suffix=	},
    { id = 'Q15987216',	argument = 'DNB', 			title = 'DNB (1885—1900)',			project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB00)'},
    { id = 'Q16014700',	argument = 'DNB01',			title = 'DNB (1901)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB01)'},
    { id = 'Q16014697',	argument = 'DNB12',			title = 'DNB (1912)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB12)'},
    { id = 'Q653922',		argument = 'JE',			title = 'JE (1901—06)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Jewish Encyclopedia/',							suffix=	},
    { id = 'Q20089963',	argument = 'NIE',			title = 'NIE (1902—05)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New International Encyclopædia/',			suffix=	},
    { id = 'Q16082057',	argument = 'NSRW',			title = 'NSRW (1914)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New Student\'s Reference Work/',			suffix=	}

}

local function getClaimValues( entity, propertyId )

   local result = {}
   local claim = entity.claims[ propertyId ];
   if ( claim == nil ) then
       return result;
   end
   for _, statement in pairs( claim ) do
       local mainsnak = statement.mainsnak;
       if ( mainsnak ~= nil and mainsnak.datavalue ~= nil ) then
           if ( mainsnak.datavalue.type == "string" ) then
               result[#result+1] = mainsnak.datavalue.value;
           elseif ( mainsnak.datavalue.type == "wikibase-entityid" ) then
               result[#result+1] = 'Q' .. mainsnak.datavalue.value["numeric-id"];
           else 
               result[#result+1] = mainsnak.datavalue.value;
           end
       end
   end
   return result;

end

local function getQualifierValues( statement, qualifierName )

   local result = {}
       if (statement ~= nil
           and statement.qualifiers ~= nil
           and statement.qualifiers[qualifierName] ~= nil) then
       local qualifiers = statement.qualifiers[qualifierName];
       for _, qualifier in pairs( qualifiers ) do
           if (qualifier.datavalue ~= nil
               and qualifier.datavalue.type ~= nil
               and qualifier.datavalue.value ~= nil) then

               if ( qualifier.datavalue.type == "wikibase-entityid" ) then
                   result[#result+1] = 'Q' .. qualifier.datavalue.value["numeric-id"];
               end
           end
       end
   end
   return result;

end

local p = {};

function p.populateOtherSourcesByEntityId( entityId, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entityId == nil ) then
       return result;
   end
   local entity = mw.wikibase.getEntity( entityId );
   if ( entity == nil ) then
       return result;
   end
   return p.populateOtherSourcesByEntity( entity, result );

end

function p.populateOtherSourcesByEntity( entity, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entity == nil or entity.claims == nil ) then
       return result;
   end
   -- first check current item references
   local describedByClaim = entity.claims[ 'P1343' ];
   if ( describedByClaim ~= nil ) then
       for _, statement in pairs( describedByClaim ) do
           if ( statement.mainsnak ~= nil
           		and statement.rank ~= 'deprecated'
                   and statement.mainsnak.datavalue.type == "wikibase-entityid"
                   and statement.mainsnak.datavalue.value["numeric-id"] ~= nil ) then
               local dictId = 'Q' .. statement.mainsnak.datavalue.value["numeric-id"]
               for _, sourceDescription in pairs( otherSources ) do
                   local dictionaryShortTitle = sourceDescription.argument;
                   local dictinaryEntityId = sourceDescription.id;
                   if ( dictinaryEntityId == dictId ) then
                       for _, qualifierValue in pairs( getQualifierValues( statement, 'P248' ) ) do
                           local dictLinks = result[ dictionaryShortTitle ];
                           if ( dictLinks == nil ) then
                               dictLinks = {};
                               result[ dictionaryShortTitle ] = dictLinks;
                           end
                           dictLinks[ qualifierValue ] = qualifierValue;
                       end
                   end
               end
           end
       end
   end
   -- check if entity have main topic item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P921' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   -- check if entity have edition of item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P629' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   return result;

end

local function getLink( sourceDescription, entityId ) if ( sourceDescription.project ~= currentProject ) then local entity = mw.wikibase.getEntity( entityId ); if ( not entity) then return nil; end if ( not entity.sitelinks or not entity.sitelinks[sourceDescription.project]) then return nil; end return ':' .. sourceDescription.projectCode .. entity.sitelinks[sourceDescription.project].title;

   end
   -- TODO: handle interwikis
   return mw.wikibase.sitelink( entityId );

end

local function isNotBlank( str )

   return str ~= nil and mw.ustring.len( str ) > 0;

end

local function getFirstCurrentTitlePart( )

   local title = mw.title.getCurrentTitle().baseText;
   local slashPos = mw.ustring.find( title, '/' );
   if ( slashPos == nil ) then
       return title;
   end
   return mw.ustring.sub( title, 0, slashPos - 1 );

end

local function isCurrentPageDO( )

   local title = mw.title.getCurrentTitle().text;
   return mw.ustring.find( title, '/ДО/' ) ~= nil or mw.ustring.find( title, '/ДО' ) == mw.ustring.len( title ) - 2;

end

local function getPageTitleFromArgument( sourceDescription, title, isDO ) if ( sourceDescription.project ~= currentProject ) then return ':' .. sourceDescription.projectCode .. sourceDescription.prefix .. title .. sourceDescription.suffix; end

   if ( isDO ) then
       local linkDO = string.gsub(sourceDescription.titleDO, "$1", title);
       local linkVT = string.gsub(sourceDescription.titleVT, "$1", title);
       if ( mw.title.new( linkDO , 0 ).exists ) then
           return linkDO;
       end
       if ( mw.title.new( linkVT , 0 ).exists ) then
           return linkVT;
       end
       return linkDO;
   end
   local template = sourceDescription.titleVT;
   local link = string.gsub(template, "$1", title);
   return link;

end

local function getLinkFromArgument( sourceDescription, title, isDO )

   return ': ' .. sourceDescription.title .. ' ';

end

function p.renderOtherSources( frame )

   local args = frame:getParent().args;
   local otherSourcesIds = p.populateOtherSourcesByEntity( mw.wikibase.getEntity(), nil );
   local titleFirstPart = getFirstCurrentTitlePart( );
   local isDO = isCurrentPageDO();
   local result = "Атын төрүттэр";
   local count = 0;
   for _, sourceDescription in pairs( otherSources ) do
       local dictArgName = sourceDescription.argument;
       local id = sourceDescription.id;
       if ( titleFirstPart ~= dictArgName ) then
           if ( isNotBlank( args[ dictArgName ] ) ) then
           	mw.log( dictArgName );
           	-- local keyword to suppress WD output
           	if args[ dictArgName ] ~= '__NULL__' then
               	result = result .. getLinkFromArgument( sourceDescription, args[ dictArgName ], isDO ) .. ;
               	count = count + 1;
           	end
           elseif ( otherSourcesIds[ dictArgName ] ~= nil ) then
               local ids = otherSourcesIds[ dictArgName ];
               for _, id in pairs( ids) do
                   result = result .. ': ' .. sourceDescription.title .. ' ';
                   count = count + 1;
               end
           end
       end
   end
   if ( count == 0 ) then
       return nil;
   end
   return frame:preprocess( 'Халыып:* ' .. result );

end

return p;

Ошибка скрипта: Модуля «Header» не существует.


Или, если вы вводите:

{{Тиэкистуһунан
| ААПТАР                = [[Tao]] (460 — 400 до н. эры) 
| ААТА                  = Книга перемен
| ЧАСТЬ                 = Часть 2
| ПОДЗАГОЛОВОК          = И цзин 
| ИЗЦИКЛА               = [[Синь]]
| ИЗСБОРНИКА            = [[Минь]]
| ДАТАСОЗДАНИЯ          = 433 до н. эры
| ДАТАПУБЛИКАЦИИ        = 431 до н. эры
| ЯЗЫКОРИГИНАЛА         = китайский
| НАЗВАНИЕОРИГИНАЛА     = 易經 
| ПОДЗАГОЛОВОКОРИГИНАЛА = Yì Jīng
| ТЫЛБААСЧЫТ            = Иван Иванович Иванов
| ИСТОЧНИК              = http://lib.ru
| ДРУГОЕ                = правильно «Кано́н Переме́н»
| БИКИПИЭДЬИЙЭ          = Книга Перемен
| ИЗОБРАЖЕНИЕ           = Symbol Media Picture1.jpg|100px|center|
| ОПИСАНИЕИЗОБРАЖЕНИЯ   = Symbol Media Picture1.jpg
| ПРЕДЫДУЩИЙ            = [[Часть 1|Часть 1]]
| СЛЕДУЮЩИЙ             = [[Часть 1|Часть 3]]
| СОДЕРЖАНИЕ            = [[Книга перемен]], [[гл. 111]], раздел [[Инь и Янь]]
| НЕОДНОЗНАЧНОСТЬ       = Книга перемен
}}

То получаете следующий результат

Книга перемен (И цзин) — Часть 2
ааптара биллибэт
Из цикла «Синь». Ошибка скрипта: Модуля «Атын төрүттэр» не существует.local currentProject = 'sahwikisource';

local otherSources = {

    { id = 'Q20078554', argument = 'БСЭ1',  title = 'БСЭ1',  project = 'sahwikisource',	titleVT = 'БСЭ1/$1',   titleDO = 'БСЭ1/$1'},
    { id = 'Q4086271',  argument = 'БЭАН',  title = 'БЭАН',  project = 'sahwikisource',	titleVT = 'БЭАН/$1',   titleDO = 'БЭАН/$1'},
    { id = 'Q4091878',  argument = 'БЭЮ',   title = 'БЭЮ',   project = 'sahwikisource',	titleVT = 'БЭЮ/$1',    titleDO = 'БЭЮ/$1'},
    { id = 'Q4114391',  argument = 'ВЭ',    title = 'ВЭ',    project = 'sahwikisource',	titleVT = 'ВЭ/ВТ/$1',  titleDO = 'ВЭ/ДО/$1'},
    { id = 'Q19147760', argument = 'ГСС',   title = 'ГСС',   project = 'sahwikisource',	titleVT = 'ГСС/ДО/$1', titleDO = 'ГСС/ДО/$1'},
    { id = 'Q4173137',  argument = 'ЕЭБЕ',  title = 'ЕЭБЕ',  project = 'sahwikisource',	titleVT = 'ЕЭБЕ/$1',   titleDO = 'ЕЭБЕ/$1'},
    { id = 'Q19180675', argument = 'МЭСБЕ', title = 'МЭСБЕ', project = 'sahwikisource',	titleVT = 'МЭСБЕ/$1',  titleDO = 'МЭСБЕ/$1'},
    { id = 'Q19190511', argument = 'НЭС',   title = 'НЭС',   project = 'sahwikisource',	titleVT = 'НЭС/$1',    titleDO = 'НЭС/$1'},
    { id = 'Q19211082', argument = 'ПБЭ',   title = 'ПБЭ',   project = 'sahwikisource',	titleVT = 'ПБЭ/ВТ/$1', titleDO = 'ПБЭ/ДО/$1'},
    { id = 'Q1960551',  argument = 'РБС',   title = 'РБС',   project = 'sahwikisource',	titleVT = 'РБС/ВТ/$1', titleDO = 'РБС/ДО/$1'},
    { id = 'Q19217220', argument = 'РЭСБ',  title = 'РЭСБ',  project = 'sahwikisource',	titleVT = 'РЭСБ/$1',   titleDO = 'РЭСБ/$1'},
    { id = 'Q1970746',  argument = 'ТСД',   title = 'ТСД',   project = 'sahwikisource',	titleVT = 'ТСД/$1',    titleDO = 'ТСД/$1/ДО'},
    { id = 'Q20078551', argument = 'ТЭ1',   title = 'ТЭ1',   project = 'sahwikisource',	titleVT = 'ТЭ1/$1',    titleDO = 'ТЭ1/$1'},
    { id = 'Q4532135',  argument = 'ЭЛ',    title = 'ЭЛ',    project = 'sahwikisource',	titleVT = 'ЭЛ/ВТ/$1',  titleDO = 'ЭЛ/ДО/$1'},     
    { id = 'Q602358',   argument = 'ЭСБЕ',  title = 'ЭСБЕ',  project = 'sahwikisource',	titleVT = 'ЭСБЕ/$1',   titleDO = 'ЭСБЕ/$1/ДО'},
    { id = 'Q590208',		argument = 'ADB',			title = 'ADB',							project = 'dewikisource',	projectCode = 'de:',	prefix='ADB:',											suffix=	},
    { id = 'Q19077875',	argument = 'AC',			title = 'American Cycl. (1879)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The American Cyclopædia (1879)/',				suffix=	},
    { id = 'Q19037977',	argument = 'AMB',			title = 'American Med. Biogr. (1920)',	project = 'enwikisource',	projectCode = 'en:',	prefix='American Medical Biographies/',					suffix=	},
    { id = 'Q12912667',	argument = 'ACAB-1',		title = 'Appletons\' (1887—1901)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Appletons\' Cyclopædia of American Biography/',	suffix=	},
    { id = 'Q20096917',	argument = 'Британника-9',	title = 'Britannica (9-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='Encyclopædia Britannica, Ninth Edition/',		suffix=	},
    { id = 'Q867541',		argument = 'Британника',	title = 'Britannica (11-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1911 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q15987490',	argument = 'Британника-12',	title = 'Britannica (12-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1922 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q302556',		argument = 'Catholic',		title = 'Catholic Enc. (1907—13)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Catholic Encyclopedia (1913)/',					suffix=	},
    { id = 'Q15987216',	argument = 'DNB', 			title = 'DNB (1885—1900)',			project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB00)'},
    { id = 'Q16014700',	argument = 'DNB01',			title = 'DNB (1901)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB01)'},
    { id = 'Q16014697',	argument = 'DNB12',			title = 'DNB (1912)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB12)'},
    { id = 'Q653922',		argument = 'JE',			title = 'JE (1901—06)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Jewish Encyclopedia/',							suffix=	},
    { id = 'Q20089963',	argument = 'NIE',			title = 'NIE (1902—05)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New International Encyclopædia/',			suffix=	},
    { id = 'Q16082057',	argument = 'NSRW',			title = 'NSRW (1914)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New Student\'s Reference Work/',			suffix=	}

}

local function getClaimValues( entity, propertyId )

   local result = {}
   local claim = entity.claims[ propertyId ];
   if ( claim == nil ) then
       return result;
   end
   for _, statement in pairs( claim ) do
       local mainsnak = statement.mainsnak;
       if ( mainsnak ~= nil and mainsnak.datavalue ~= nil ) then
           if ( mainsnak.datavalue.type == "string" ) then
               result[#result+1] = mainsnak.datavalue.value;
           elseif ( mainsnak.datavalue.type == "wikibase-entityid" ) then
               result[#result+1] = 'Q' .. mainsnak.datavalue.value["numeric-id"];
           else 
               result[#result+1] = mainsnak.datavalue.value;
           end
       end
   end
   return result;

end

local function getQualifierValues( statement, qualifierName )

   local result = {}
       if (statement ~= nil
           and statement.qualifiers ~= nil
           and statement.qualifiers[qualifierName] ~= nil) then
       local qualifiers = statement.qualifiers[qualifierName];
       for _, qualifier in pairs( qualifiers ) do
           if (qualifier.datavalue ~= nil
               and qualifier.datavalue.type ~= nil
               and qualifier.datavalue.value ~= nil) then

               if ( qualifier.datavalue.type == "wikibase-entityid" ) then
                   result[#result+1] = 'Q' .. qualifier.datavalue.value["numeric-id"];
               end
           end
       end
   end
   return result;

end

local p = {};

function p.populateOtherSourcesByEntityId( entityId, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entityId == nil ) then
       return result;
   end
   local entity = mw.wikibase.getEntity( entityId );
   if ( entity == nil ) then
       return result;
   end
   return p.populateOtherSourcesByEntity( entity, result );

end

function p.populateOtherSourcesByEntity( entity, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entity == nil or entity.claims == nil ) then
       return result;
   end
   -- first check current item references
   local describedByClaim = entity.claims[ 'P1343' ];
   if ( describedByClaim ~= nil ) then
       for _, statement in pairs( describedByClaim ) do
           if ( statement.mainsnak ~= nil
           		and statement.rank ~= 'deprecated'
                   and statement.mainsnak.datavalue.type == "wikibase-entityid"
                   and statement.mainsnak.datavalue.value["numeric-id"] ~= nil ) then
               local dictId = 'Q' .. statement.mainsnak.datavalue.value["numeric-id"]
               for _, sourceDescription in pairs( otherSources ) do
                   local dictionaryShortTitle = sourceDescription.argument;
                   local dictinaryEntityId = sourceDescription.id;
                   if ( dictinaryEntityId == dictId ) then
                       for _, qualifierValue in pairs( getQualifierValues( statement, 'P248' ) ) do
                           local dictLinks = result[ dictionaryShortTitle ];
                           if ( dictLinks == nil ) then
                               dictLinks = {};
                               result[ dictionaryShortTitle ] = dictLinks;
                           end
                           dictLinks[ qualifierValue ] = qualifierValue;
                       end
                   end
               end
           end
       end
   end
   -- check if entity have main topic item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P921' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   -- check if entity have edition of item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P629' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   return result;

end

local function getLink( sourceDescription, entityId ) if ( sourceDescription.project ~= currentProject ) then local entity = mw.wikibase.getEntity( entityId ); if ( not entity) then return nil; end if ( not entity.sitelinks or not entity.sitelinks[sourceDescription.project]) then return nil; end return ':' .. sourceDescription.projectCode .. entity.sitelinks[sourceDescription.project].title;

   end
   -- TODO: handle interwikis
   return mw.wikibase.sitelink( entityId );

end

local function isNotBlank( str )

   return str ~= nil and mw.ustring.len( str ) > 0;

end

local function getFirstCurrentTitlePart( )

   local title = mw.title.getCurrentTitle().baseText;
   local slashPos = mw.ustring.find( title, '/' );
   if ( slashPos == nil ) then
       return title;
   end
   return mw.ustring.sub( title, 0, slashPos - 1 );

end

local function isCurrentPageDO( )

   local title = mw.title.getCurrentTitle().text;
   return mw.ustring.find( title, '/ДО/' ) ~= nil or mw.ustring.find( title, '/ДО' ) == mw.ustring.len( title ) - 2;

end

local function getPageTitleFromArgument( sourceDescription, title, isDO ) if ( sourceDescription.project ~= currentProject ) then return ':' .. sourceDescription.projectCode .. sourceDescription.prefix .. title .. sourceDescription.suffix; end

   if ( isDO ) then
       local linkDO = string.gsub(sourceDescription.titleDO, "$1", title);
       local linkVT = string.gsub(sourceDescription.titleVT, "$1", title);
       if ( mw.title.new( linkDO , 0 ).exists ) then
           return linkDO;
       end
       if ( mw.title.new( linkVT , 0 ).exists ) then
           return linkVT;
       end
       return linkDO;
   end
   local template = sourceDescription.titleVT;
   local link = string.gsub(template, "$1", title);
   return link;

end

local function getLinkFromArgument( sourceDescription, title, isDO )

   return ': ' .. sourceDescription.title .. ' ';

end

function p.renderOtherSources( frame )

   local args = frame:getParent().args;
   local otherSourcesIds = p.populateOtherSourcesByEntity( mw.wikibase.getEntity(), nil );
   local titleFirstPart = getFirstCurrentTitlePart( );
   local isDO = isCurrentPageDO();
   local result = "Атын төрүттэр";
   local count = 0;
   for _, sourceDescription in pairs( otherSources ) do
       local dictArgName = sourceDescription.argument;
       local id = sourceDescription.id;
       if ( titleFirstPart ~= dictArgName ) then
           if ( isNotBlank( args[ dictArgName ] ) ) then
           	mw.log( dictArgName );
           	-- local keyword to suppress WD output
           	if args[ dictArgName ] ~= '__NULL__' then
               	result = result .. getLinkFromArgument( sourceDescription, args[ dictArgName ], isDO ) .. ;
               	count = count + 1;
           	end
           elseif ( otherSourcesIds[ dictArgName ] ~= nil ) then
               local ids = otherSourcesIds[ dictArgName ];
               for _, id in pairs( ids) do
                   result = result .. ': ' .. sourceDescription.title .. ' ';
                   count = count + 1;
               end
           end
       end
   end
   if ( count == 0 ) then
       return nil;
   end
   return frame:preprocess( 'Халыып:* ' .. result );

end

return p;

Ошибка скрипта: Модуля «Header» не существует.
 













Параметр [[Авторы]] аналогичен параметру [[Автор]], за тем отличием что при его использовании в шаблоне выводится «Авторы:», а не «Автор»

Песни аборигенов Сахары — Часть 2
авторы: Джонни Сэнди и Джимми Сэнди
Ошибка скрипта: Модуля «Атын төрүттэр» не существует.local currentProject = 'sahwikisource';

local otherSources = {

    { id = 'Q20078554', argument = 'БСЭ1',  title = 'БСЭ1',  project = 'sahwikisource',	titleVT = 'БСЭ1/$1',   titleDO = 'БСЭ1/$1'},
    { id = 'Q4086271',  argument = 'БЭАН',  title = 'БЭАН',  project = 'sahwikisource',	titleVT = 'БЭАН/$1',   titleDO = 'БЭАН/$1'},
    { id = 'Q4091878',  argument = 'БЭЮ',   title = 'БЭЮ',   project = 'sahwikisource',	titleVT = 'БЭЮ/$1',    titleDO = 'БЭЮ/$1'},
    { id = 'Q4114391',  argument = 'ВЭ',    title = 'ВЭ',    project = 'sahwikisource',	titleVT = 'ВЭ/ВТ/$1',  titleDO = 'ВЭ/ДО/$1'},
    { id = 'Q19147760', argument = 'ГСС',   title = 'ГСС',   project = 'sahwikisource',	titleVT = 'ГСС/ДО/$1', titleDO = 'ГСС/ДО/$1'},
    { id = 'Q4173137',  argument = 'ЕЭБЕ',  title = 'ЕЭБЕ',  project = 'sahwikisource',	titleVT = 'ЕЭБЕ/$1',   titleDO = 'ЕЭБЕ/$1'},
    { id = 'Q19180675', argument = 'МЭСБЕ', title = 'МЭСБЕ', project = 'sahwikisource',	titleVT = 'МЭСБЕ/$1',  titleDO = 'МЭСБЕ/$1'},
    { id = 'Q19190511', argument = 'НЭС',   title = 'НЭС',   project = 'sahwikisource',	titleVT = 'НЭС/$1',    titleDO = 'НЭС/$1'},
    { id = 'Q19211082', argument = 'ПБЭ',   title = 'ПБЭ',   project = 'sahwikisource',	titleVT = 'ПБЭ/ВТ/$1', titleDO = 'ПБЭ/ДО/$1'},
    { id = 'Q1960551',  argument = 'РБС',   title = 'РБС',   project = 'sahwikisource',	titleVT = 'РБС/ВТ/$1', titleDO = 'РБС/ДО/$1'},
    { id = 'Q19217220', argument = 'РЭСБ',  title = 'РЭСБ',  project = 'sahwikisource',	titleVT = 'РЭСБ/$1',   titleDO = 'РЭСБ/$1'},
    { id = 'Q1970746',  argument = 'ТСД',   title = 'ТСД',   project = 'sahwikisource',	titleVT = 'ТСД/$1',    titleDO = 'ТСД/$1/ДО'},
    { id = 'Q20078551', argument = 'ТЭ1',   title = 'ТЭ1',   project = 'sahwikisource',	titleVT = 'ТЭ1/$1',    titleDO = 'ТЭ1/$1'},
    { id = 'Q4532135',  argument = 'ЭЛ',    title = 'ЭЛ',    project = 'sahwikisource',	titleVT = 'ЭЛ/ВТ/$1',  titleDO = 'ЭЛ/ДО/$1'},     
    { id = 'Q602358',   argument = 'ЭСБЕ',  title = 'ЭСБЕ',  project = 'sahwikisource',	titleVT = 'ЭСБЕ/$1',   titleDO = 'ЭСБЕ/$1/ДО'},
    { id = 'Q590208',		argument = 'ADB',			title = 'ADB',							project = 'dewikisource',	projectCode = 'de:',	prefix='ADB:',											suffix=	},
    { id = 'Q19077875',	argument = 'AC',			title = 'American Cycl. (1879)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The American Cyclopædia (1879)/',				suffix=	},
    { id = 'Q19037977',	argument = 'AMB',			title = 'American Med. Biogr. (1920)',	project = 'enwikisource',	projectCode = 'en:',	prefix='American Medical Biographies/',					suffix=	},
    { id = 'Q12912667',	argument = 'ACAB-1',		title = 'Appletons\' (1887—1901)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Appletons\' Cyclopædia of American Biography/',	suffix=	},
    { id = 'Q20096917',	argument = 'Британника-9',	title = 'Britannica (9-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='Encyclopædia Britannica, Ninth Edition/',		suffix=	},
    { id = 'Q867541',		argument = 'Британника',	title = 'Britannica (11-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1911 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q15987490',	argument = 'Британника-12',	title = 'Britannica (12-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1922 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q302556',		argument = 'Catholic',		title = 'Catholic Enc. (1907—13)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Catholic Encyclopedia (1913)/',					suffix=	},
    { id = 'Q15987216',	argument = 'DNB', 			title = 'DNB (1885—1900)',			project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB00)'},
    { id = 'Q16014700',	argument = 'DNB01',			title = 'DNB (1901)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB01)'},
    { id = 'Q16014697',	argument = 'DNB12',			title = 'DNB (1912)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB12)'},
    { id = 'Q653922',		argument = 'JE',			title = 'JE (1901—06)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Jewish Encyclopedia/',							suffix=	},
    { id = 'Q20089963',	argument = 'NIE',			title = 'NIE (1902—05)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New International Encyclopædia/',			suffix=	},
    { id = 'Q16082057',	argument = 'NSRW',			title = 'NSRW (1914)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New Student\'s Reference Work/',			suffix=	}

}

local function getClaimValues( entity, propertyId )

   local result = {}
   local claim = entity.claims[ propertyId ];
   if ( claim == nil ) then
       return result;
   end
   for _, statement in pairs( claim ) do
       local mainsnak = statement.mainsnak;
       if ( mainsnak ~= nil and mainsnak.datavalue ~= nil ) then
           if ( mainsnak.datavalue.type == "string" ) then
               result[#result+1] = mainsnak.datavalue.value;
           elseif ( mainsnak.datavalue.type == "wikibase-entityid" ) then
               result[#result+1] = 'Q' .. mainsnak.datavalue.value["numeric-id"];
           else 
               result[#result+1] = mainsnak.datavalue.value;
           end
       end
   end
   return result;

end

local function getQualifierValues( statement, qualifierName )

   local result = {}
       if (statement ~= nil
           and statement.qualifiers ~= nil
           and statement.qualifiers[qualifierName] ~= nil) then
       local qualifiers = statement.qualifiers[qualifierName];
       for _, qualifier in pairs( qualifiers ) do
           if (qualifier.datavalue ~= nil
               and qualifier.datavalue.type ~= nil
               and qualifier.datavalue.value ~= nil) then

               if ( qualifier.datavalue.type == "wikibase-entityid" ) then
                   result[#result+1] = 'Q' .. qualifier.datavalue.value["numeric-id"];
               end
           end
       end
   end
   return result;

end

local p = {};

function p.populateOtherSourcesByEntityId( entityId, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entityId == nil ) then
       return result;
   end
   local entity = mw.wikibase.getEntity( entityId );
   if ( entity == nil ) then
       return result;
   end
   return p.populateOtherSourcesByEntity( entity, result );

end

function p.populateOtherSourcesByEntity( entity, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entity == nil or entity.claims == nil ) then
       return result;
   end
   -- first check current item references
   local describedByClaim = entity.claims[ 'P1343' ];
   if ( describedByClaim ~= nil ) then
       for _, statement in pairs( describedByClaim ) do
           if ( statement.mainsnak ~= nil
           		and statement.rank ~= 'deprecated'
                   and statement.mainsnak.datavalue.type == "wikibase-entityid"
                   and statement.mainsnak.datavalue.value["numeric-id"] ~= nil ) then
               local dictId = 'Q' .. statement.mainsnak.datavalue.value["numeric-id"]
               for _, sourceDescription in pairs( otherSources ) do
                   local dictionaryShortTitle = sourceDescription.argument;
                   local dictinaryEntityId = sourceDescription.id;
                   if ( dictinaryEntityId == dictId ) then
                       for _, qualifierValue in pairs( getQualifierValues( statement, 'P248' ) ) do
                           local dictLinks = result[ dictionaryShortTitle ];
                           if ( dictLinks == nil ) then
                               dictLinks = {};
                               result[ dictionaryShortTitle ] = dictLinks;
                           end
                           dictLinks[ qualifierValue ] = qualifierValue;
                       end
                   end
               end
           end
       end
   end
   -- check if entity have main topic item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P921' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   -- check if entity have edition of item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P629' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   return result;

end

local function getLink( sourceDescription, entityId ) if ( sourceDescription.project ~= currentProject ) then local entity = mw.wikibase.getEntity( entityId ); if ( not entity) then return nil; end if ( not entity.sitelinks or not entity.sitelinks[sourceDescription.project]) then return nil; end return ':' .. sourceDescription.projectCode .. entity.sitelinks[sourceDescription.project].title;

   end
   -- TODO: handle interwikis
   return mw.wikibase.sitelink( entityId );

end

local function isNotBlank( str )

   return str ~= nil and mw.ustring.len( str ) > 0;

end

local function getFirstCurrentTitlePart( )

   local title = mw.title.getCurrentTitle().baseText;
   local slashPos = mw.ustring.find( title, '/' );
   if ( slashPos == nil ) then
       return title;
   end
   return mw.ustring.sub( title, 0, slashPos - 1 );

end

local function isCurrentPageDO( )

   local title = mw.title.getCurrentTitle().text;
   return mw.ustring.find( title, '/ДО/' ) ~= nil or mw.ustring.find( title, '/ДО' ) == mw.ustring.len( title ) - 2;

end

local function getPageTitleFromArgument( sourceDescription, title, isDO ) if ( sourceDescription.project ~= currentProject ) then return ':' .. sourceDescription.projectCode .. sourceDescription.prefix .. title .. sourceDescription.suffix; end

   if ( isDO ) then
       local linkDO = string.gsub(sourceDescription.titleDO, "$1", title);
       local linkVT = string.gsub(sourceDescription.titleVT, "$1", title);
       if ( mw.title.new( linkDO , 0 ).exists ) then
           return linkDO;
       end
       if ( mw.title.new( linkVT , 0 ).exists ) then
           return linkVT;
       end
       return linkDO;
   end
   local template = sourceDescription.titleVT;
   local link = string.gsub(template, "$1", title);
   return link;

end

local function getLinkFromArgument( sourceDescription, title, isDO )

   return ': ' .. sourceDescription.title .. ' ';

end

function p.renderOtherSources( frame )

   local args = frame:getParent().args;
   local otherSourcesIds = p.populateOtherSourcesByEntity( mw.wikibase.getEntity(), nil );
   local titleFirstPart = getFirstCurrentTitlePart( );
   local isDO = isCurrentPageDO();
   local result = "Атын төрүттэр";
   local count = 0;
   for _, sourceDescription in pairs( otherSources ) do
       local dictArgName = sourceDescription.argument;
       local id = sourceDescription.id;
       if ( titleFirstPart ~= dictArgName ) then
           if ( isNotBlank( args[ dictArgName ] ) ) then
           	mw.log( dictArgName );
           	-- local keyword to suppress WD output
           	if args[ dictArgName ] ~= '__NULL__' then
               	result = result .. getLinkFromArgument( sourceDescription, args[ dictArgName ], isDO ) .. ;
               	count = count + 1;
           	end
           elseif ( otherSourcesIds[ dictArgName ] ~= nil ) then
               local ids = otherSourcesIds[ dictArgName ];
               for _, id in pairs( ids) do
                   result = result .. ': ' .. sourceDescription.title .. ' ';
                   count = count + 1;
               end
           end
       end
   end
   if ( count == 0 ) then
       return nil;
   end
   return frame:preprocess( 'Халыып:* ' .. result );

end

return p;

Ошибка скрипта: Модуля «Header» не существует.


Параметр [[ААПТАРА_СУОХ]] используется в двух случаях:

а) когда автор неизвестен, в этом случае параметр оставляется пустым, например:

{{Тиэкистуһунан
| ААПТАРА_СУОХ            =
| ААТА              = Песни аборигенов Сахары
| ЧАСТЬ                 = Часть 2
}} 

Песни аборигенов Сахары — Часть 2
ааптара биллибэт
Ошибка скрипта: Модуля «Атын төрүттэр» не существует.local currentProject = 'sahwikisource';

local otherSources = {

    { id = 'Q20078554', argument = 'БСЭ1',  title = 'БСЭ1',  project = 'sahwikisource',	titleVT = 'БСЭ1/$1',   titleDO = 'БСЭ1/$1'},
    { id = 'Q4086271',  argument = 'БЭАН',  title = 'БЭАН',  project = 'sahwikisource',	titleVT = 'БЭАН/$1',   titleDO = 'БЭАН/$1'},
    { id = 'Q4091878',  argument = 'БЭЮ',   title = 'БЭЮ',   project = 'sahwikisource',	titleVT = 'БЭЮ/$1',    titleDO = 'БЭЮ/$1'},
    { id = 'Q4114391',  argument = 'ВЭ',    title = 'ВЭ',    project = 'sahwikisource',	titleVT = 'ВЭ/ВТ/$1',  titleDO = 'ВЭ/ДО/$1'},
    { id = 'Q19147760', argument = 'ГСС',   title = 'ГСС',   project = 'sahwikisource',	titleVT = 'ГСС/ДО/$1', titleDO = 'ГСС/ДО/$1'},
    { id = 'Q4173137',  argument = 'ЕЭБЕ',  title = 'ЕЭБЕ',  project = 'sahwikisource',	titleVT = 'ЕЭБЕ/$1',   titleDO = 'ЕЭБЕ/$1'},
    { id = 'Q19180675', argument = 'МЭСБЕ', title = 'МЭСБЕ', project = 'sahwikisource',	titleVT = 'МЭСБЕ/$1',  titleDO = 'МЭСБЕ/$1'},
    { id = 'Q19190511', argument = 'НЭС',   title = 'НЭС',   project = 'sahwikisource',	titleVT = 'НЭС/$1',    titleDO = 'НЭС/$1'},
    { id = 'Q19211082', argument = 'ПБЭ',   title = 'ПБЭ',   project = 'sahwikisource',	titleVT = 'ПБЭ/ВТ/$1', titleDO = 'ПБЭ/ДО/$1'},
    { id = 'Q1960551',  argument = 'РБС',   title = 'РБС',   project = 'sahwikisource',	titleVT = 'РБС/ВТ/$1', titleDO = 'РБС/ДО/$1'},
    { id = 'Q19217220', argument = 'РЭСБ',  title = 'РЭСБ',  project = 'sahwikisource',	titleVT = 'РЭСБ/$1',   titleDO = 'РЭСБ/$1'},
    { id = 'Q1970746',  argument = 'ТСД',   title = 'ТСД',   project = 'sahwikisource',	titleVT = 'ТСД/$1',    titleDO = 'ТСД/$1/ДО'},
    { id = 'Q20078551', argument = 'ТЭ1',   title = 'ТЭ1',   project = 'sahwikisource',	titleVT = 'ТЭ1/$1',    titleDO = 'ТЭ1/$1'},
    { id = 'Q4532135',  argument = 'ЭЛ',    title = 'ЭЛ',    project = 'sahwikisource',	titleVT = 'ЭЛ/ВТ/$1',  titleDO = 'ЭЛ/ДО/$1'},     
    { id = 'Q602358',   argument = 'ЭСБЕ',  title = 'ЭСБЕ',  project = 'sahwikisource',	titleVT = 'ЭСБЕ/$1',   titleDO = 'ЭСБЕ/$1/ДО'},
    { id = 'Q590208',		argument = 'ADB',			title = 'ADB',							project = 'dewikisource',	projectCode = 'de:',	prefix='ADB:',											suffix=	},
    { id = 'Q19077875',	argument = 'AC',			title = 'American Cycl. (1879)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The American Cyclopædia (1879)/',				suffix=	},
    { id = 'Q19037977',	argument = 'AMB',			title = 'American Med. Biogr. (1920)',	project = 'enwikisource',	projectCode = 'en:',	prefix='American Medical Biographies/',					suffix=	},
    { id = 'Q12912667',	argument = 'ACAB-1',		title = 'Appletons\' (1887—1901)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Appletons\' Cyclopædia of American Biography/',	suffix=	},
    { id = 'Q20096917',	argument = 'Британника-9',	title = 'Britannica (9-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='Encyclopædia Britannica, Ninth Edition/',		suffix=	},
    { id = 'Q867541',		argument = 'Британника',	title = 'Britannica (11-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1911 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q15987490',	argument = 'Британника-12',	title = 'Britannica (12-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1922 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q302556',		argument = 'Catholic',		title = 'Catholic Enc. (1907—13)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Catholic Encyclopedia (1913)/',					suffix=	},
    { id = 'Q15987216',	argument = 'DNB', 			title = 'DNB (1885—1900)',			project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB00)'},
    { id = 'Q16014700',	argument = 'DNB01',			title = 'DNB (1901)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB01)'},
    { id = 'Q16014697',	argument = 'DNB12',			title = 'DNB (1912)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB12)'},
    { id = 'Q653922',		argument = 'JE',			title = 'JE (1901—06)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Jewish Encyclopedia/',							suffix=	},
    { id = 'Q20089963',	argument = 'NIE',			title = 'NIE (1902—05)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New International Encyclopædia/',			suffix=	},
    { id = 'Q16082057',	argument = 'NSRW',			title = 'NSRW (1914)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New Student\'s Reference Work/',			suffix=	}

}

local function getClaimValues( entity, propertyId )

   local result = {}
   local claim = entity.claims[ propertyId ];
   if ( claim == nil ) then
       return result;
   end
   for _, statement in pairs( claim ) do
       local mainsnak = statement.mainsnak;
       if ( mainsnak ~= nil and mainsnak.datavalue ~= nil ) then
           if ( mainsnak.datavalue.type == "string" ) then
               result[#result+1] = mainsnak.datavalue.value;
           elseif ( mainsnak.datavalue.type == "wikibase-entityid" ) then
               result[#result+1] = 'Q' .. mainsnak.datavalue.value["numeric-id"];
           else 
               result[#result+1] = mainsnak.datavalue.value;
           end
       end
   end
   return result;

end

local function getQualifierValues( statement, qualifierName )

   local result = {}
       if (statement ~= nil
           and statement.qualifiers ~= nil
           and statement.qualifiers[qualifierName] ~= nil) then
       local qualifiers = statement.qualifiers[qualifierName];
       for _, qualifier in pairs( qualifiers ) do
           if (qualifier.datavalue ~= nil
               and qualifier.datavalue.type ~= nil
               and qualifier.datavalue.value ~= nil) then

               if ( qualifier.datavalue.type == "wikibase-entityid" ) then
                   result[#result+1] = 'Q' .. qualifier.datavalue.value["numeric-id"];
               end
           end
       end
   end
   return result;

end

local p = {};

function p.populateOtherSourcesByEntityId( entityId, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entityId == nil ) then
       return result;
   end
   local entity = mw.wikibase.getEntity( entityId );
   if ( entity == nil ) then
       return result;
   end
   return p.populateOtherSourcesByEntity( entity, result );

end

function p.populateOtherSourcesByEntity( entity, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entity == nil or entity.claims == nil ) then
       return result;
   end
   -- first check current item references
   local describedByClaim = entity.claims[ 'P1343' ];
   if ( describedByClaim ~= nil ) then
       for _, statement in pairs( describedByClaim ) do
           if ( statement.mainsnak ~= nil
           		and statement.rank ~= 'deprecated'
                   and statement.mainsnak.datavalue.type == "wikibase-entityid"
                   and statement.mainsnak.datavalue.value["numeric-id"] ~= nil ) then
               local dictId = 'Q' .. statement.mainsnak.datavalue.value["numeric-id"]
               for _, sourceDescription in pairs( otherSources ) do
                   local dictionaryShortTitle = sourceDescription.argument;
                   local dictinaryEntityId = sourceDescription.id;
                   if ( dictinaryEntityId == dictId ) then
                       for _, qualifierValue in pairs( getQualifierValues( statement, 'P248' ) ) do
                           local dictLinks = result[ dictionaryShortTitle ];
                           if ( dictLinks == nil ) then
                               dictLinks = {};
                               result[ dictionaryShortTitle ] = dictLinks;
                           end
                           dictLinks[ qualifierValue ] = qualifierValue;
                       end
                   end
               end
           end
       end
   end
   -- check if entity have main topic item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P921' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   -- check if entity have edition of item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P629' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   return result;

end

local function getLink( sourceDescription, entityId ) if ( sourceDescription.project ~= currentProject ) then local entity = mw.wikibase.getEntity( entityId ); if ( not entity) then return nil; end if ( not entity.sitelinks or not entity.sitelinks[sourceDescription.project]) then return nil; end return ':' .. sourceDescription.projectCode .. entity.sitelinks[sourceDescription.project].title;

   end
   -- TODO: handle interwikis
   return mw.wikibase.sitelink( entityId );

end

local function isNotBlank( str )

   return str ~= nil and mw.ustring.len( str ) > 0;

end

local function getFirstCurrentTitlePart( )

   local title = mw.title.getCurrentTitle().baseText;
   local slashPos = mw.ustring.find( title, '/' );
   if ( slashPos == nil ) then
       return title;
   end
   return mw.ustring.sub( title, 0, slashPos - 1 );

end

local function isCurrentPageDO( )

   local title = mw.title.getCurrentTitle().text;
   return mw.ustring.find( title, '/ДО/' ) ~= nil or mw.ustring.find( title, '/ДО' ) == mw.ustring.len( title ) - 2;

end

local function getPageTitleFromArgument( sourceDescription, title, isDO ) if ( sourceDescription.project ~= currentProject ) then return ':' .. sourceDescription.projectCode .. sourceDescription.prefix .. title .. sourceDescription.suffix; end

   if ( isDO ) then
       local linkDO = string.gsub(sourceDescription.titleDO, "$1", title);
       local linkVT = string.gsub(sourceDescription.titleVT, "$1", title);
       if ( mw.title.new( linkDO , 0 ).exists ) then
           return linkDO;
       end
       if ( mw.title.new( linkVT , 0 ).exists ) then
           return linkVT;
       end
       return linkDO;
   end
   local template = sourceDescription.titleVT;
   local link = string.gsub(template, "$1", title);
   return link;

end

local function getLinkFromArgument( sourceDescription, title, isDO )

   return ': ' .. sourceDescription.title .. ' ';

end

function p.renderOtherSources( frame )

   local args = frame:getParent().args;
   local otherSourcesIds = p.populateOtherSourcesByEntity( mw.wikibase.getEntity(), nil );
   local titleFirstPart = getFirstCurrentTitlePart( );
   local isDO = isCurrentPageDO();
   local result = "Атын төрүттэр";
   local count = 0;
   for _, sourceDescription in pairs( otherSources ) do
       local dictArgName = sourceDescription.argument;
       local id = sourceDescription.id;
       if ( titleFirstPart ~= dictArgName ) then
           if ( isNotBlank( args[ dictArgName ] ) ) then
           	mw.log( dictArgName );
           	-- local keyword to suppress WD output
           	if args[ dictArgName ] ~= '__NULL__' then
               	result = result .. getLinkFromArgument( sourceDescription, args[ dictArgName ], isDO ) .. ;
               	count = count + 1;
           	end
           elseif ( otherSourcesIds[ dictArgName ] ~= nil ) then
               local ids = otherSourcesIds[ dictArgName ];
               for _, id in pairs( ids) do
                   result = result .. ': ' .. sourceDescription.title .. ' ';
                   count = count + 1;
               end
           end
       end
   end
   if ( count == 0 ) then
       return nil;
   end
   return frame:preprocess( 'Халыып:* ' .. result );

end

return p;

Ошибка скрипта: Модуля «Header» не существует.


б) когда автор — коллективный орган. В этом случае в значении параметра указывается название коллективного органа, а слово «автор» в шаблоне не выводится. Пример:

{{Тиэкистуһунан
| ААПТАРА_СУОХ = Приказ народного комиссара обороны СССР
| ААТА   = О мерах предотвращения порчи материальной части ВВС РККА по злому умыслу
}}

О мерах предотвращения порчи материальной части ВВС РККА по злому умыслу
ааптара биллибэт
Ошибка скрипта: Модуля «Атын төрүттэр» не существует.local currentProject = 'sahwikisource';

local otherSources = {

    { id = 'Q20078554', argument = 'БСЭ1',  title = 'БСЭ1',  project = 'sahwikisource',	titleVT = 'БСЭ1/$1',   titleDO = 'БСЭ1/$1'},
    { id = 'Q4086271',  argument = 'БЭАН',  title = 'БЭАН',  project = 'sahwikisource',	titleVT = 'БЭАН/$1',   titleDO = 'БЭАН/$1'},
    { id = 'Q4091878',  argument = 'БЭЮ',   title = 'БЭЮ',   project = 'sahwikisource',	titleVT = 'БЭЮ/$1',    titleDO = 'БЭЮ/$1'},
    { id = 'Q4114391',  argument = 'ВЭ',    title = 'ВЭ',    project = 'sahwikisource',	titleVT = 'ВЭ/ВТ/$1',  titleDO = 'ВЭ/ДО/$1'},
    { id = 'Q19147760', argument = 'ГСС',   title = 'ГСС',   project = 'sahwikisource',	titleVT = 'ГСС/ДО/$1', titleDO = 'ГСС/ДО/$1'},
    { id = 'Q4173137',  argument = 'ЕЭБЕ',  title = 'ЕЭБЕ',  project = 'sahwikisource',	titleVT = 'ЕЭБЕ/$1',   titleDO = 'ЕЭБЕ/$1'},
    { id = 'Q19180675', argument = 'МЭСБЕ', title = 'МЭСБЕ', project = 'sahwikisource',	titleVT = 'МЭСБЕ/$1',  titleDO = 'МЭСБЕ/$1'},
    { id = 'Q19190511', argument = 'НЭС',   title = 'НЭС',   project = 'sahwikisource',	titleVT = 'НЭС/$1',    titleDO = 'НЭС/$1'},
    { id = 'Q19211082', argument = 'ПБЭ',   title = 'ПБЭ',   project = 'sahwikisource',	titleVT = 'ПБЭ/ВТ/$1', titleDO = 'ПБЭ/ДО/$1'},
    { id = 'Q1960551',  argument = 'РБС',   title = 'РБС',   project = 'sahwikisource',	titleVT = 'РБС/ВТ/$1', titleDO = 'РБС/ДО/$1'},
    { id = 'Q19217220', argument = 'РЭСБ',  title = 'РЭСБ',  project = 'sahwikisource',	titleVT = 'РЭСБ/$1',   titleDO = 'РЭСБ/$1'},
    { id = 'Q1970746',  argument = 'ТСД',   title = 'ТСД',   project = 'sahwikisource',	titleVT = 'ТСД/$1',    titleDO = 'ТСД/$1/ДО'},
    { id = 'Q20078551', argument = 'ТЭ1',   title = 'ТЭ1',   project = 'sahwikisource',	titleVT = 'ТЭ1/$1',    titleDO = 'ТЭ1/$1'},
    { id = 'Q4532135',  argument = 'ЭЛ',    title = 'ЭЛ',    project = 'sahwikisource',	titleVT = 'ЭЛ/ВТ/$1',  titleDO = 'ЭЛ/ДО/$1'},     
    { id = 'Q602358',   argument = 'ЭСБЕ',  title = 'ЭСБЕ',  project = 'sahwikisource',	titleVT = 'ЭСБЕ/$1',   titleDO = 'ЭСБЕ/$1/ДО'},
    { id = 'Q590208',		argument = 'ADB',			title = 'ADB',							project = 'dewikisource',	projectCode = 'de:',	prefix='ADB:',											suffix=	},
    { id = 'Q19077875',	argument = 'AC',			title = 'American Cycl. (1879)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The American Cyclopædia (1879)/',				suffix=	},
    { id = 'Q19037977',	argument = 'AMB',			title = 'American Med. Biogr. (1920)',	project = 'enwikisource',	projectCode = 'en:',	prefix='American Medical Biographies/',					suffix=	},
    { id = 'Q12912667',	argument = 'ACAB-1',		title = 'Appletons\' (1887—1901)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Appletons\' Cyclopædia of American Biography/',	suffix=	},
    { id = 'Q20096917',	argument = 'Британника-9',	title = 'Britannica (9-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='Encyclopædia Britannica, Ninth Edition/',		suffix=	},
    { id = 'Q867541',		argument = 'Британника',	title = 'Britannica (11-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1911 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q15987490',	argument = 'Британника-12',	title = 'Britannica (12-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1922 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q302556',		argument = 'Catholic',		title = 'Catholic Enc. (1907—13)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Catholic Encyclopedia (1913)/',					suffix=	},
    { id = 'Q15987216',	argument = 'DNB', 			title = 'DNB (1885—1900)',			project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB00)'},
    { id = 'Q16014700',	argument = 'DNB01',			title = 'DNB (1901)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB01)'},
    { id = 'Q16014697',	argument = 'DNB12',			title = 'DNB (1912)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB12)'},
    { id = 'Q653922',		argument = 'JE',			title = 'JE (1901—06)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Jewish Encyclopedia/',							suffix=	},
    { id = 'Q20089963',	argument = 'NIE',			title = 'NIE (1902—05)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New International Encyclopædia/',			suffix=	},
    { id = 'Q16082057',	argument = 'NSRW',			title = 'NSRW (1914)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New Student\'s Reference Work/',			suffix=	}

}

local function getClaimValues( entity, propertyId )

   local result = {}
   local claim = entity.claims[ propertyId ];
   if ( claim == nil ) then
       return result;
   end
   for _, statement in pairs( claim ) do
       local mainsnak = statement.mainsnak;
       if ( mainsnak ~= nil and mainsnak.datavalue ~= nil ) then
           if ( mainsnak.datavalue.type == "string" ) then
               result[#result+1] = mainsnak.datavalue.value;
           elseif ( mainsnak.datavalue.type == "wikibase-entityid" ) then
               result[#result+1] = 'Q' .. mainsnak.datavalue.value["numeric-id"];
           else 
               result[#result+1] = mainsnak.datavalue.value;
           end
       end
   end
   return result;

end

local function getQualifierValues( statement, qualifierName )

   local result = {}
       if (statement ~= nil
           and statement.qualifiers ~= nil
           and statement.qualifiers[qualifierName] ~= nil) then
       local qualifiers = statement.qualifiers[qualifierName];
       for _, qualifier in pairs( qualifiers ) do
           if (qualifier.datavalue ~= nil
               and qualifier.datavalue.type ~= nil
               and qualifier.datavalue.value ~= nil) then

               if ( qualifier.datavalue.type == "wikibase-entityid" ) then
                   result[#result+1] = 'Q' .. qualifier.datavalue.value["numeric-id"];
               end
           end
       end
   end
   return result;

end

local p = {};

function p.populateOtherSourcesByEntityId( entityId, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entityId == nil ) then
       return result;
   end
   local entity = mw.wikibase.getEntity( entityId );
   if ( entity == nil ) then
       return result;
   end
   return p.populateOtherSourcesByEntity( entity, result );

end

function p.populateOtherSourcesByEntity( entity, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entity == nil or entity.claims == nil ) then
       return result;
   end
   -- first check current item references
   local describedByClaim = entity.claims[ 'P1343' ];
   if ( describedByClaim ~= nil ) then
       for _, statement in pairs( describedByClaim ) do
           if ( statement.mainsnak ~= nil
           		and statement.rank ~= 'deprecated'
                   and statement.mainsnak.datavalue.type == "wikibase-entityid"
                   and statement.mainsnak.datavalue.value["numeric-id"] ~= nil ) then
               local dictId = 'Q' .. statement.mainsnak.datavalue.value["numeric-id"]
               for _, sourceDescription in pairs( otherSources ) do
                   local dictionaryShortTitle = sourceDescription.argument;
                   local dictinaryEntityId = sourceDescription.id;
                   if ( dictinaryEntityId == dictId ) then
                       for _, qualifierValue in pairs( getQualifierValues( statement, 'P248' ) ) do
                           local dictLinks = result[ dictionaryShortTitle ];
                           if ( dictLinks == nil ) then
                               dictLinks = {};
                               result[ dictionaryShortTitle ] = dictLinks;
                           end
                           dictLinks[ qualifierValue ] = qualifierValue;
                       end
                   end
               end
           end
       end
   end
   -- check if entity have main topic item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P921' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   -- check if entity have edition of item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P629' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   return result;

end

local function getLink( sourceDescription, entityId ) if ( sourceDescription.project ~= currentProject ) then local entity = mw.wikibase.getEntity( entityId ); if ( not entity) then return nil; end if ( not entity.sitelinks or not entity.sitelinks[sourceDescription.project]) then return nil; end return ':' .. sourceDescription.projectCode .. entity.sitelinks[sourceDescription.project].title;

   end
   -- TODO: handle interwikis
   return mw.wikibase.sitelink( entityId );

end

local function isNotBlank( str )

   return str ~= nil and mw.ustring.len( str ) > 0;

end

local function getFirstCurrentTitlePart( )

   local title = mw.title.getCurrentTitle().baseText;
   local slashPos = mw.ustring.find( title, '/' );
   if ( slashPos == nil ) then
       return title;
   end
   return mw.ustring.sub( title, 0, slashPos - 1 );

end

local function isCurrentPageDO( )

   local title = mw.title.getCurrentTitle().text;
   return mw.ustring.find( title, '/ДО/' ) ~= nil or mw.ustring.find( title, '/ДО' ) == mw.ustring.len( title ) - 2;

end

local function getPageTitleFromArgument( sourceDescription, title, isDO ) if ( sourceDescription.project ~= currentProject ) then return ':' .. sourceDescription.projectCode .. sourceDescription.prefix .. title .. sourceDescription.suffix; end

   if ( isDO ) then
       local linkDO = string.gsub(sourceDescription.titleDO, "$1", title);
       local linkVT = string.gsub(sourceDescription.titleVT, "$1", title);
       if ( mw.title.new( linkDO , 0 ).exists ) then
           return linkDO;
       end
       if ( mw.title.new( linkVT , 0 ).exists ) then
           return linkVT;
       end
       return linkDO;
   end
   local template = sourceDescription.titleVT;
   local link = string.gsub(template, "$1", title);
   return link;

end

local function getLinkFromArgument( sourceDescription, title, isDO )

   return ': ' .. sourceDescription.title .. ' ';

end

function p.renderOtherSources( frame )

   local args = frame:getParent().args;
   local otherSourcesIds = p.populateOtherSourcesByEntity( mw.wikibase.getEntity(), nil );
   local titleFirstPart = getFirstCurrentTitlePart( );
   local isDO = isCurrentPageDO();
   local result = "Атын төрүттэр";
   local count = 0;
   for _, sourceDescription in pairs( otherSources ) do
       local dictArgName = sourceDescription.argument;
       local id = sourceDescription.id;
       if ( titleFirstPart ~= dictArgName ) then
           if ( isNotBlank( args[ dictArgName ] ) ) then
           	mw.log( dictArgName );
           	-- local keyword to suppress WD output
           	if args[ dictArgName ] ~= '__NULL__' then
               	result = result .. getLinkFromArgument( sourceDescription, args[ dictArgName ], isDO ) .. ;
               	count = count + 1;
           	end
           elseif ( otherSourcesIds[ dictArgName ] ~= nil ) then
               local ids = otherSourcesIds[ dictArgName ];
               for _, id in pairs( ids) do
                   result = result .. ': ' .. sourceDescription.title .. ' ';
                   count = count + 1;
               end
           end
       end
   end
   if ( count == 0 ) then
       return nil;
   end
   return frame:preprocess( 'Халыып:* ' .. result );

end

return p;

Ошибка скрипта: Модуля «Header» не существует.



На практике участники пользуются сокращённой версией шаблона, выбирая только нужные параметры.
Например, если ввести:

{{Тиэкистуһунан
| ААПТАР                 = [[Михаил Юрьевич Лермонтов]]  ([[w:1814|1814]] — [[w:1841|1841]])
| ААТА                  = Ангел
| ДАТАСОЗДАНИЯ          = 1831
| ДАТАПУБЛИКАЦИИ        = 1840
| ИСТОЧНИК              = [http://feb-web.ru/feb/lermont/texts/fvers/l21/l21-2222.htm ФЭБ 1989]
| ДРУГОЕ                = Стихотворение №227 (ПСС 1989).
| СОДЕРЖАНИЕ            = [[Стихотворения Лермонтова 1828—1832#1831|Стихотворения 1831]] 
| ПРЕДЫДУЩИЙ            = [[Кто в утро зимнее, когда валит (Лермонтов)|Кто в утро зимнее, когда валит...]]
| СЛЕДУЮЩИЙ             = [[Стансы к Д *** (Я не могу ни произнесть — Лермонтов)|Стансы к Д ***]]
| НЕОДНОЗНАЧНОСТЬ       = Ангел
}}

Получится следующий результат:

Ангел
ааптара биллибэт
Ошибка скрипта: Модуля «Атын төрүттэр» не существует.local currentProject = 'sahwikisource';

local otherSources = {

    { id = 'Q20078554', argument = 'БСЭ1',  title = 'БСЭ1',  project = 'sahwikisource',	titleVT = 'БСЭ1/$1',   titleDO = 'БСЭ1/$1'},
    { id = 'Q4086271',  argument = 'БЭАН',  title = 'БЭАН',  project = 'sahwikisource',	titleVT = 'БЭАН/$1',   titleDO = 'БЭАН/$1'},
    { id = 'Q4091878',  argument = 'БЭЮ',   title = 'БЭЮ',   project = 'sahwikisource',	titleVT = 'БЭЮ/$1',    titleDO = 'БЭЮ/$1'},
    { id = 'Q4114391',  argument = 'ВЭ',    title = 'ВЭ',    project = 'sahwikisource',	titleVT = 'ВЭ/ВТ/$1',  titleDO = 'ВЭ/ДО/$1'},
    { id = 'Q19147760', argument = 'ГСС',   title = 'ГСС',   project = 'sahwikisource',	titleVT = 'ГСС/ДО/$1', titleDO = 'ГСС/ДО/$1'},
    { id = 'Q4173137',  argument = 'ЕЭБЕ',  title = 'ЕЭБЕ',  project = 'sahwikisource',	titleVT = 'ЕЭБЕ/$1',   titleDO = 'ЕЭБЕ/$1'},
    { id = 'Q19180675', argument = 'МЭСБЕ', title = 'МЭСБЕ', project = 'sahwikisource',	titleVT = 'МЭСБЕ/$1',  titleDO = 'МЭСБЕ/$1'},
    { id = 'Q19190511', argument = 'НЭС',   title = 'НЭС',   project = 'sahwikisource',	titleVT = 'НЭС/$1',    titleDO = 'НЭС/$1'},
    { id = 'Q19211082', argument = 'ПБЭ',   title = 'ПБЭ',   project = 'sahwikisource',	titleVT = 'ПБЭ/ВТ/$1', titleDO = 'ПБЭ/ДО/$1'},
    { id = 'Q1960551',  argument = 'РБС',   title = 'РБС',   project = 'sahwikisource',	titleVT = 'РБС/ВТ/$1', titleDO = 'РБС/ДО/$1'},
    { id = 'Q19217220', argument = 'РЭСБ',  title = 'РЭСБ',  project = 'sahwikisource',	titleVT = 'РЭСБ/$1',   titleDO = 'РЭСБ/$1'},
    { id = 'Q1970746',  argument = 'ТСД',   title = 'ТСД',   project = 'sahwikisource',	titleVT = 'ТСД/$1',    titleDO = 'ТСД/$1/ДО'},
    { id = 'Q20078551', argument = 'ТЭ1',   title = 'ТЭ1',   project = 'sahwikisource',	titleVT = 'ТЭ1/$1',    titleDO = 'ТЭ1/$1'},
    { id = 'Q4532135',  argument = 'ЭЛ',    title = 'ЭЛ',    project = 'sahwikisource',	titleVT = 'ЭЛ/ВТ/$1',  titleDO = 'ЭЛ/ДО/$1'},     
    { id = 'Q602358',   argument = 'ЭСБЕ',  title = 'ЭСБЕ',  project = 'sahwikisource',	titleVT = 'ЭСБЕ/$1',   titleDO = 'ЭСБЕ/$1/ДО'},
    { id = 'Q590208',		argument = 'ADB',			title = 'ADB',							project = 'dewikisource',	projectCode = 'de:',	prefix='ADB:',											suffix=	},
    { id = 'Q19077875',	argument = 'AC',			title = 'American Cycl. (1879)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The American Cyclopædia (1879)/',				suffix=	},
    { id = 'Q19037977',	argument = 'AMB',			title = 'American Med. Biogr. (1920)',	project = 'enwikisource',	projectCode = 'en:',	prefix='American Medical Biographies/',					suffix=	},
    { id = 'Q12912667',	argument = 'ACAB-1',		title = 'Appletons\' (1887—1901)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Appletons\' Cyclopædia of American Biography/',	suffix=	},
    { id = 'Q20096917',	argument = 'Британника-9',	title = 'Britannica (9-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='Encyclopædia Britannica, Ninth Edition/',		suffix=	},
    { id = 'Q867541',		argument = 'Британника',	title = 'Britannica (11-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1911 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q15987490',	argument = 'Британника-12',	title = 'Britannica (12-th)',			project = 'enwikisource',	projectCode = 'en:',	prefix='1922 Encyclopædia Britannica/',					suffix=	},
    { id = 'Q302556',		argument = 'Catholic',		title = 'Catholic Enc. (1907—13)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Catholic Encyclopedia (1913)/',					suffix=	},
    { id = 'Q15987216',	argument = 'DNB', 			title = 'DNB (1885—1900)',			project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB00)'},
    { id = 'Q16014700',	argument = 'DNB01',			title = 'DNB (1901)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB01)'},
    { id = 'Q16014697',	argument = 'DNB12',			title = 'DNB (1912)',					project = 'enwikisource',	projectCode = 'en:',	prefix=,												suffix=' (DNB12)'},
    { id = 'Q653922',		argument = 'JE',			title = 'JE (1901—06)',		project = 'enwikisource',	projectCode = 'en:',	prefix='Jewish Encyclopedia/',							suffix=	},
    { id = 'Q20089963',	argument = 'NIE',			title = 'NIE (1902—05)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New International Encyclopædia/',			suffix=	},
    { id = 'Q16082057',	argument = 'NSRW',			title = 'NSRW (1914)',		project = 'enwikisource',	projectCode = 'en:',	prefix='The New Student\'s Reference Work/',			suffix=	}

}

local function getClaimValues( entity, propertyId )

   local result = {}
   local claim = entity.claims[ propertyId ];
   if ( claim == nil ) then
       return result;
   end
   for _, statement in pairs( claim ) do
       local mainsnak = statement.mainsnak;
       if ( mainsnak ~= nil and mainsnak.datavalue ~= nil ) then
           if ( mainsnak.datavalue.type == "string" ) then
               result[#result+1] = mainsnak.datavalue.value;
           elseif ( mainsnak.datavalue.type == "wikibase-entityid" ) then
               result[#result+1] = 'Q' .. mainsnak.datavalue.value["numeric-id"];
           else 
               result[#result+1] = mainsnak.datavalue.value;
           end
       end
   end
   return result;

end

local function getQualifierValues( statement, qualifierName )

   local result = {}
       if (statement ~= nil
           and statement.qualifiers ~= nil
           and statement.qualifiers[qualifierName] ~= nil) then
       local qualifiers = statement.qualifiers[qualifierName];
       for _, qualifier in pairs( qualifiers ) do
           if (qualifier.datavalue ~= nil
               and qualifier.datavalue.type ~= nil
               and qualifier.datavalue.value ~= nil) then

               if ( qualifier.datavalue.type == "wikibase-entityid" ) then
                   result[#result+1] = 'Q' .. qualifier.datavalue.value["numeric-id"];
               end
           end
       end
   end
   return result;

end

local p = {};

function p.populateOtherSourcesByEntityId( entityId, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entityId == nil ) then
       return result;
   end
   local entity = mw.wikibase.getEntity( entityId );
   if ( entity == nil ) then
       return result;
   end
   return p.populateOtherSourcesByEntity( entity, result );

end

function p.populateOtherSourcesByEntity( entity, result )

   if ( result == nil ) then
       result = {};
   end
   if ( entity == nil or entity.claims == nil ) then
       return result;
   end
   -- first check current item references
   local describedByClaim = entity.claims[ 'P1343' ];
   if ( describedByClaim ~= nil ) then
       for _, statement in pairs( describedByClaim ) do
           if ( statement.mainsnak ~= nil
           		and statement.rank ~= 'deprecated'
                   and statement.mainsnak.datavalue.type == "wikibase-entityid"
                   and statement.mainsnak.datavalue.value["numeric-id"] ~= nil ) then
               local dictId = 'Q' .. statement.mainsnak.datavalue.value["numeric-id"]
               for _, sourceDescription in pairs( otherSources ) do
                   local dictionaryShortTitle = sourceDescription.argument;
                   local dictinaryEntityId = sourceDescription.id;
                   if ( dictinaryEntityId == dictId ) then
                       for _, qualifierValue in pairs( getQualifierValues( statement, 'P248' ) ) do
                           local dictLinks = result[ dictionaryShortTitle ];
                           if ( dictLinks == nil ) then
                               dictLinks = {};
                               result[ dictionaryShortTitle ] = dictLinks;
                           end
                           dictLinks[ qualifierValue ] = qualifierValue;
                       end
                   end
               end
           end
       end
   end
   -- check if entity have main topic item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P921' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   -- check if entity have edition of item
   if ( entity ) then
       local parentEntityIds = getClaimValues( entity, 'P629' );
       for _, parentEntityId in pairs( parentEntityIds ) do
           p.populateOtherSourcesByEntityId( parentEntityId, result );
       end
   end
   return result;

end

local function getLink( sourceDescription, entityId ) if ( sourceDescription.project ~= currentProject ) then local entity = mw.wikibase.getEntity( entityId ); if ( not entity) then return nil; end if ( not entity.sitelinks or not entity.sitelinks[sourceDescription.project]) then return nil; end return ':' .. sourceDescription.projectCode .. entity.sitelinks[sourceDescription.project].title;

   end
   -- TODO: handle interwikis
   return mw.wikibase.sitelink( entityId );

end

local function isNotBlank( str )

   return str ~= nil and mw.ustring.len( str ) > 0;

end

local function getFirstCurrentTitlePart( )

   local title = mw.title.getCurrentTitle().baseText;
   local slashPos = mw.ustring.find( title, '/' );
   if ( slashPos == nil ) then
       return title;
   end
   return mw.ustring.sub( title, 0, slashPos - 1 );

end

local function isCurrentPageDO( )

   local title = mw.title.getCurrentTitle().text;
   return mw.ustring.find( title, '/ДО/' ) ~= nil or mw.ustring.find( title, '/ДО' ) == mw.ustring.len( title ) - 2;

end

local function getPageTitleFromArgument( sourceDescription, title, isDO ) if ( sourceDescription.project ~= currentProject ) then return ':' .. sourceDescription.projectCode .. sourceDescription.prefix .. title .. sourceDescription.suffix; end

   if ( isDO ) then
       local linkDO = string.gsub(sourceDescription.titleDO, "$1", title);
       local linkVT = string.gsub(sourceDescription.titleVT, "$1", title);
       if ( mw.title.new( linkDO , 0 ).exists ) then
           return linkDO;
       end
       if ( mw.title.new( linkVT , 0 ).exists ) then
           return linkVT;
       end
       return linkDO;
   end
   local template = sourceDescription.titleVT;
   local link = string.gsub(template, "$1", title);
   return link;

end

local function getLinkFromArgument( sourceDescription, title, isDO )

   return ': ' .. sourceDescription.title .. ' ';

end

function p.renderOtherSources( frame )

   local args = frame:getParent().args;
   local otherSourcesIds = p.populateOtherSourcesByEntity( mw.wikibase.getEntity(), nil );
   local titleFirstPart = getFirstCurrentTitlePart( );
   local isDO = isCurrentPageDO();
   local result = "Атын төрүттэр";
   local count = 0;
   for _, sourceDescription in pairs( otherSources ) do
       local dictArgName = sourceDescription.argument;
       local id = sourceDescription.id;
       if ( titleFirstPart ~= dictArgName ) then
           if ( isNotBlank( args[ dictArgName ] ) ) then
           	mw.log( dictArgName );
           	-- local keyword to suppress WD output
           	if args[ dictArgName ] ~= '__NULL__' then
               	result = result .. getLinkFromArgument( sourceDescription, args[ dictArgName ], isDO ) .. ;
               	count = count + 1;
           	end
           elseif ( otherSourcesIds[ dictArgName ] ~= nil ) then
               local ids = otherSourcesIds[ dictArgName ];
               for _, id in pairs( ids) do
                   result = result .. ': ' .. sourceDescription.title .. ' ';
                   count = count + 1;
               end
           end
       end
   end
   if ( count == 0 ) then
       return nil;
   end
   return frame:preprocess( 'Халыып:* ' .. result );

end

return p;

Ошибка скрипта: Модуля «Header» не существует.


Параметр КАЧЕСТВО позволяет прямо указать качество обработки текста. Поддерживаемые форматы значений: 0/1/2/3/4, 00/25/50/100, 00%/25%/50%/100%. Использование этого параметра аналогично применению шаблона {{TextQuality}}.

Параметр НЕОДНОЗНАЧНОСТЬ позволяет указать на страницу разрешения неоднозначностей (т.е. на список произведений с одним названием, например, Молитва).

На базе шаблона {{Отексте}} разработаны также и специализированные шаблоны для описания конкретного вида документов (ниже перечислены не все шаблоны):

Халыып Ханнык түгэҥҥэ туттуллара
{{Приказ НКО}} Для оформления текстов приказов народного комиссара обороны СССР
{{Закон РФ}} Для оформления текстов законов Российской Федерации
{{Федеральный закон}} Для оформления текстов федеральных законов Российской Федерации
{{Краевой закон}} Для оформления текстов законов краев Российской Федерации
{{Областной закон}} Для оформления текстов законов областей Российской Федерации
{{Закон РСФСР}} Для оформления текстов законов РСФСР
{{Указ Президиума Верховного Совета}} Для оформления Указов Президиумов Верховного Совета СССР и РСФСР
{{Документ}} Для оформления документов разного вида (см. документацию к шаблону)

Параметр НАВИГАЦИЯ позволяет указать дополнительную полосу навигации (см. шаблон {{Sub-nav}})

См. также уларыт