VisualEditor/Citation tool/bg

Инструментът за цитиране на Визуалния редактор' позволява на потребителите да използват шаблони за източници от уикито си вътре в самия редактор. За да активирате инструмента, е нужно следното: работеща инсталирана версия на Визуален редактор и Parsoid; шаблони за източници във вашето уики, които използват TemplateData, който посочва как те са използвани; и специално .json съобщение, за да се свържете Визуалния редактор и шаблоните заедно.

Внасяне на шаблони за източници
You'll need citation templates in your wiki's database in order to use any citation features. If you do not currently have citation templates on your wiki (for example, in the case of a new installation) you'll need to get them. Copying them from Wikipedia is the easiest way to do this. If you already have citation templates on your wiki, you can skip these steps.


 * 1) Install Extension:Scribunto, Extension:ParserFunctions, Extension:Cite, and Extension:TemplateData. Most citation templates on Wikipedia use the programming language Lua which Scribunto makes available, and they also use the extension's parser functions. The Cite extension allows you to use the tags.  Всички Уикипедии и други уикита на Фондация Уикимедия вече са инсталирали всички тези неща.
 * 2) Export citation templates from Wikipedia: Manual:Using_content_from_Wikipedia. Exporting w:Template:Cite web, w:Template:Cite news, w:Template:Cite journal, w:Template:Cite book is a good place to start. Последните версии на тези шаблони в английската Уикипедия, както и някои други, също изискват поддръжка на Lua модули.
 * 3) Качете вашите шаблони с помощта на Специални:Внасяне на страници във вашето уики.

Template data
You'll need Extension:TemplateData for the citation tool to be able to load the template data into the fields in VisualEditor and each template must have template data defined. For more information on how to define template data for citations, and to see screenshots of how a citation window should look with and without template data defined, see: Wikipedia:VisualEditor/TemplateData

Дефиниране на инструмента за цитиране
To enable the VisualEditor citation tool on your wiki, you need to create a special message on your wiki:. This is because each wiki is different and so needs to customise which features it wants to use; for example, the names of the templates used on your wiki might be different from those of other wikis.

Цел на конфигуриращото съобщение
Съобщението:

Once the  configuration message is created, the citation tool will be live for all VisualEditor users on your wiki within a few minutes.
 * Посочва кои шаблони за стандартно цитиране използва вашето уики (може да посочите до 5).
 * Имайте предвид, че всеки шаблон трябва да има TemplateData defined or the system will be very difficult for users to understand. If your wiki does not currently use citation templates, it is common to copy the templates from the English Wikipedia as a good general set.
 * Says which label you wish to use for each type of citation.
 * There are a standard four, "web", "book", "news" and "journal", which correspond to  etc.
 * Says which icon you wish to use for each type of citation.
 * There are a standard four, "ref-cite-web", "ref-cite-book", "ref-cite-news" and "ref-cite-journal", which correspond to CSS classes with the icon as a background SVG image called  etc.

Additional types
If you are considering adding an additional type, the development team would really like to talk with you first, to give advice, help create an appropriate icon, and so we can consider whether other wikis might also want this type defined for all wikis.

To add an additional type, you will need to:


 * 1) Decide what type you wish to create
 * 2) * In this example, say you wished to have a database reference, you could call the type "database".
 * 3) Create a label for it
 * 4) * For the example, you could make the label name "db" and add a label at   with the value "database". This should be in your wiki's content language. If your wiki uses multiple languages or scripts, you may need to create several of these labels.
 * 5) Create an icon for it
 * 6) * For the example, you could make the icon label "ref-cite-dbase", and create the icon as an SVG file uploaded to commons, create the icon class " " in  and add the icon you want with " " or similar.

Примери
You can see example definition messages on the English Wikipedia and the Polish Wikipedia.

Отстраняване на проблеми
If you navigate to Special:Version and TemplateData is installed, but fields aren't showing up in the citation dialog, you may need to open the citation template for editing, make no changes, and save it again. This is due to a bug where TemplateData which is transcluded (i.e. present in Template:Cite_web/doc instead of directly on Template:Cite_web) is not loaded into the database until the parent template is edited; see.

Please note that the user experience will differ slightly when using your own templates other than the standard 4. For instance, a list of fields won't show up initially in the citation dialog, but you will be able to request a list of all possible fields by clicking a button.