Citoid/Enabling Citoid on your wiki/ru

This page is a translated version of the page Citoid/Enabling Citoid on your wiki and the translation is 12% complete.
Основная страница: Citoid

Citoid is an auto-filled citation generator which automatically creates a citation template from online sources based on a URL or some academic reference identifiers like DOIs, PMIDs, PMCIDs and ISBNs. It is currently available as a VisualEditor feature, and in the Редактор вики-текста 2017 . Citoid uses Zotero translators to convert a page link into detailed information.

The Citoid service uses VisualEditor's Citation Tool. This is already enabled on most large Wikipedias and many smaller projects. If the citation tool is enabled, then the "Источники" menu will list one or more local citation templates, in addition to "Базовая" and "Повторное использование". If the citation tool is not enabled, then you need to enable it before proceeding, by following the steps described in the section Citation tool definition. Each citation template will require normal TemplateData to work.

Step 2: Configure Citoid

The Citoid extension must be configured using special TemplateData maps and a special Citoid-specific message. It is important to do these two steps in order!

Step 2.a: Create a 'citoid' maps value for each citation template 

Основная страница: Citoid/Maps TemplateData
The fields ISSN, ISBN, author, editor and some others are special fields which can also be Arrays [] or 2D Arrays [[]] in the citoid map. More details

Since Citoid has its own set of fields for each document type (for instance, the journal name is called 'publicationTitle' in Citoid, but 'journal' in Template:Cite_journal), you need to add a special mapping called 'citoid' in the maps object of the TemplateData for each citation template. This special mapping creates a map between Citoid's fields and the template's fields. The map must be called 'citoid' to let the Citoid extension know which map to look for. An unlimited number of maps with unique keys are allowed in the maps object. Note that you can only see TemplateData maps in edit mode; they are not visible in the TemplateData table. Also note that if you recently created TemplateData for your wiki by copying it from another wiki, it probably already includes the Citoid maps, so you can just skip this step after verifying.

The most up-to-date maps objects that are compatible with the Citoid extension are on the English Wikipedia:

Step 2.b: Configuring a special MediaWiki message

You'll need to configure a special MediaWiki: namespace message, MediaWiki:Citoid-template-type-map.json. This message maps the 34 native Citoid types (artwork, book, journalArticle, tvBroadcast, website, etc.) to the appropriate templates (Cite web, Cite book, Cite journal, etc.).

You should match a local citation template to every single Citoid type. If no template is matched, then Citoid will not work. It's better to have a bad match than none at all. For example, your wiki may not have a special template for citing the liner notes in the packaging for a DVD, so consider using a template designed for a book or a video in that case. You may consider using a generic template, such as en.wiki's Template:Citation, as a catch-all for types if there is no good match for the type of source you are mapping.

An example namespace message can be found on English Wikipedia: https://en.wikipedia.org/wiki/MediaWiki:Citoid-template-type-map.json.

Разрешение проблем

The new cite button does not appear in the toolbar 

 
Citoid's toolbar button

When you create the MediaWiki message in step 2.b, the previous cite drop-down menu (File:VisualEditor_-_Cite_Pulldown.png) should be replaced by a new button for the citoid service in the toolbar menu. Если новая кнопка не появляется на панели инструментов, это может вызвано проблемой с MediaWiki:Citoid-template-type-map.json. If this page does not exist locally, or if the JSON on that page is invalid, then citoid will not work. Alternatively, you may need to refresh your JavaScript cache.

Empty references appear 

Empty references most commonly appear when you are trying to insert a citation template that has no maps data. This problem also appears if the template has maps data, but that data is not reaching the MediaWiki API. If the maps object is present in TemplateData block in the template's documentation, then try making a "null edit" on the template. If that doesn't work, then there may be an issue with the map itself.

My favorite site isn't recognized by Citoid and only gets basic information 

The Citoid service relies on the brilliant Zotero community for much of the "magic", as Zotero translators need to be written for each site. Вы можете видеть список всех Zotero трансляторов на https://github.com/zotero/translators Right now, Zotero best supports English-language sources. We need your help to improve coverage of other sites. Вы можете написать собственный Zotero транслятор Start by looking at an existing translator of a similar website, and by reading the tutorial at Citoid/Creating Zotero translators.

Dates are formatted differently on my wiki

Dates with full information (month, year, and day) are in ISO format, which is an international standard. Если сообщество не устраивает, как это видит пользователь, возможно отредактировать шаблон преобразования дат из ISO в вид, принятый в вашем языке For instance, you can add logic to the template such that if the date is detected to be in ISO yyyy-mm-dd format, the date is reformatted *to appear* to be dd/mm/yyyy on the page. Однако, если сделаете это, исходные данные (т.е. когда вы редактируете викитекст или форму в VisualEditor) все еще останутся прежними

Dates with only month and year are in also in ISO (YYYY-MM) but these are not accepted by some citation templates. See задача T132308.

Many language wiki templates (pl, it, en) don't accept xx-XX style language codes

See задача T115326 for the related task. See the thread at задача T97256 to learn how different wikis decided to workaround this limitation.


См. также