Jump to content

Help:Contributing/quotation: Difference between revisions

From Wikibase
Document quotation translations (Add translation + {{#content:Q|fr|en}}) — feature deploy (via update-page on MediaWiki MCP Server)
Embedding: legal provisions (Special:AddSource/law) are embeddable the same way (deploy 2026-10-08) (via update-page on MediaWiki MCP Server)
Line 73: Line 73:


When the quotation carries an '''attributed to''' and/or a '''source''' statement, the internal <syntaxhighlight lang="wikitext" inline>{{#content:…}}</syntaxhighlight> call also renders an attribution line below the text — <code>-Author, ''Source''</code>. The source is italic and links to its classic page when it has one (for example <code>-Toni Morrison, ''[[Source:Beloved (Book)|Beloved]]''</code>); a missing author or source is simply omitted. The iframe/embed-page surfaces keep their own framed rendering.
When the quotation carries an '''attributed to''' and/or a '''source''' statement, the internal <syntaxhighlight lang="wikitext" inline>{{#content:…}}</syntaxhighlight> call also renders an attribution line below the text — <code>-Author, ''Source''</code>. The source is italic and links to its classic page when it has one (for example <code>-Toni Morrison, ''[[Source:Beloved (Book)|Beloved]]''</code>); a missing author or source is simply omitted. The iframe/embed-page surfaces keep their own framed rendering.
'''Legal provisions''' (a clause of a legislation, created through [[Special:AddSource/law]]) are content items too: their <code>Source:</code> page carries the same '''Copy embed code''' button, and the same <syntaxhighlight lang="wikitext" inline>{{#content:Q…}}</syntaxhighlight> / <code>Special:Embed/Q…</code> snippet renders the clause. The translation syntax is identical — for example <syntaxhighlight lang="wikitext" inline>{{#content:Q2074|en}}</syntaxhighlight> shows the clause followed by the requested translations — and a legal provision carries no attribution line (its context is the parent legislation, not an author).


== Listing a source's quotations ==
== Listing a source's quotations ==

Revision as of 12:09, 8 October 2026

Languages: English · français · Esperanto

Quotations are stored as items on this instance and embedded on pages with the embed snippet. Creating one is a two-step flow: add the quotation item, then embed it.

Adding a quotation

Open Special:AddQuotation and fill the form:

Field What it is
Label A short title for the quotation (e.g. its first words or a topic).
Quotation text The quotation itself. It is full wikitext — links, emphasis, [[File:…]] media and $…$ math all render. Pick the language of the text in the Language combobox (any of the 500+ Wikibase languages).
Attributed to The person who said or wrote it — search and pick the entity, or type the item id directly (e.g. Q94).
Source URL Optional: the page or document the quotation comes from.
Source Optional: the book or article the quotation is cited from (a source item created via Special:AddSource).
Date Optional: when the quotation was made (format YYYY-MM-DD).

Saving creates the item and redirects to it.

Rich content (wikitext)

The quotation text is parsed as wikitext, so a quotation can carry the same markup as a page — a link to the author or the work, emphasis, an image that illustrates it, or math:

''Cogito, ergo sum.'' — see [[Item:Q94|René Descartes]]

An image ([[File:Example.png|thumb]]) and inline math ($e^{i\pi}+1=0$) work too. Rich media renders both on Special:QuotationsOf and wherever the quotation is embedded with {{#content:…}}.

Translating a quotation

A quotation's original text is the one entered in the Quotation text field; its translations are added separately.

To add a translation, open Special:AddQuotation and click Add translation: pick the language, type the translated text, and repeat for each language. Each row has an X button that removes it, with a confirmation prompt. The rows appear prefilled when you edit the quotation, so a translation can be corrected or deleted there.

To render the original followed by chosen translations, pass the language codes to {{#content:Q100|fr|en}}. The original renders first, then one block per language:

L'original.

'''fr translation:'''

Le texte traduit.

'''en translation:'''

en translation not found

The language code labels each block. A requested language without a translation renders the {code} translation not found message in place of the text. With no language codes, {{#content:Q100}} negotiates the display language from the embedding page as before.

Editing a quotation

Open the quotation's item page and click Edit content under the title — or go straight to Special:UpdateQuotation with the item's id (e.g. Special:UpdateQuotation/Q100). The form is the same as adding, prefilled from the item:

  • the Quotation text appears exactly as it was entered — multi-line text keeps its line breaks;
  • the language, attribution and source fields carry the current values;
  • any added translations appear as prefilled rows (see Translating a quotation).

Change what you need and click Update item. Fields you leave blank keep their existing values — the item's class never changes.

Embedding a quotation

Open the quotation's item page and click Copy embed code — it offers two flavours:

  • Internal (on-wiki) — {{#content:Q100}}, which expands the quotation's wikitext onto the page. The page language is negotiated automatically, and its rich media and links render there too. There is no automatic frame — wrap the call in <blockquote> for a quote box. To show specific translations below the original, add the language codes: {{#content:Q100|fr|en}} (see Translating a quotation).
  • External (iframe) — an <iframe src="https://wikibase.ronzz.org/wiki/Special:Embed/Q100" loading="lazy" style="width:100%;border:0;min-height:120px"></iframe> snippet for a third-party site.

Multi-language quotations show a language selector next to the embed button: Auto (the server negotiates), All languages, or one specific language (it applies to the iframe flavour; the internal one negotiates from the embedding page).

When the quotation carries an attributed to and/or a source statement, the internal {{#content:…}} call also renders an attribution line below the text — -Author, Source. The source is italic and links to its classic page when it has one (for example -Toni Morrison, Beloved); a missing author or source is simply omitted. The iframe/embed-page surfaces keep their own framed rendering.

Legal provisions (a clause of a legislation, created through Special:AddSource/law) are content items too: their Source: page carries the same Copy embed code button, and the same {{#content:Q…}} / Special:Embed/Q… snippet renders the clause. The translation syntax is identical — for example {{#content:Q2074|en}} shows the clause followed by the requested translations — and a legal provision carries no attribution line (its context is the parent legislation, not an author).

Listing a source's quotations

All quotations citing a source are listed at Special:QuotationsOf with the source's id (e.g. Special:QuotationsOf/Q1134), each with its rich content. Source pages show the quotation count automatically and link to the list.

See also