Jump to content

Citoid/Configurar o Citoid na sua wiki

From mediawiki.org
This page is a translated version of the page Citoid/Enabling Citoid on your wiki and the translation is 28% complete.
Main page: Citoid

Citoid é um gerador de citação preenchido automaticamente que cria automaticamente um modelo de citação" a partir de fontes on-line com base num URL ou alguns identificadores académicos, tais como like DOIs, PMIDs, PMCIDs and ISBNs. Este, atualmente, está disponível como uma funcionalidade do Editor Visual, e no Editor de Texto Wiki 2017 . Citoid utiliza os tradutores de Zotero para converter uma hiperligação de página em informação detalhada.

center|700px

Passo 1: Ativar a ferramenta de modelo de citação

O serviço Citoid utiliza a Ferramenta de Citação do Editor Visual. Já está ativado nas Wikipédias maiores e em outros projetos mais pequenos. Se a ferramenta de citação estiver ativada, então o menu "Citar" irá listar um ou mais modelos de citação locais, em adição a "Básica" e "Reutilizar". Se a ferramenta de citação não está ativada, então, tem de a ativar antes de prosseguir, seguindo os passos descritos na secção 'Definição da ferramenta de citação'. Cada modelo de citação irá requerer 'TemplateData' para funcionar.

Passo 2: Configurar 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!

Passo 2.a: Verificar se a sua wiki tem modelos de citação

If your local wiki has citation templates, proceed to step 2.b. If it does not, you'll need to create or import some first.

Passo 2.b: Criar um valor de mapa 'Citoid' para cada modelo de citação

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
Click on the "Editar mapas" button in the TemplateData editor to add or edit the citoid map JSON.

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 w:Template:Cite journal), you need to click Adicionar novo mapa and add a special mapping called citoid in TemplateData for each citation template.

If you prefer using wikitext, edit ‎<templatedata /> (usually inside a /doc or /TemplateData subpage) and add the citoid mapping in the maps object:

{
	"description": "…",
	"params": {},
	"paramOrder": [],
	"maps": {
		"citoid": {
			,
			"publicationTitle": "journal",
			
		}
	},
	"format": "{{_ |_=_}}"
}

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. If you recently created TemplateData for your wiki by copying it from English Wikipedia, it probably already includes the Citoid maps. However if the TemplateData is too old, it may not contain it.

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

Passo 2.c: Configurar uma mensagem especial do MediWiki

You'll need to configure a special message in the built-in MediaWiki: namespace, 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: w:MediaWiki:Citoid-template-type-map.json.

Resolução de problemas

O novo botão cite não aparece na barra de ferramentas

Citoid's toolbar button

When you create the MediaWiki message in step 2.c, 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. If the new button does not appear in the toolbar, then there may be a problem with 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.

Nós não conseguimos criar a citação para si.

If this message occurs for every or most citations, then you may be trying to insert citation templates that have no maps data. Check your browser console as you will see a warning with the name of the template if this is the case. 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. Also ensure that blank template data on the template page itself isn't over-writing the template data from a transcluded documentation page. If that doesn't work, then there may be an issue with the map itself. Note that if this error occurs inconsistently, then there may just be a problem with the particular url you're trying to cite. To check this, try citing the url from the API. If it doesn't work there either, it is not a config issue.


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. You can see a list of all Zotero translators at https://github.com/zotero/translators. Right now, Zotero best supports English-language sources. We need your help to improve coverage of other sites. You can write your own Zotero translator. 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. If the community doesn't like the way this looks to the user, it is possible to edit the citation template to format the ISO dates to something that is standard in your language. 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. However, if you do this, the underlying data (i.e. when you edit the wikitext, or the form in VisualEditor) will still remain the same.

Dates with only month and year are in also in ISO (YYYY-MM) but these are not accepted by some citation templates. Consulte 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.

Consultar também