Jump to content

Help:Contributing/quotation: Difference between revisions

From Wikibase
Automated edit (via update-page on MediaWiki MCP Server)
Document quotation translations (Add translation + {{#content:Q|fr|en}}) — feature deploy (via update-page on MediaWiki MCP Server)
Line 30: Line 30:


An image (<syntaxhighlight lang="wikitext" inline>[[File:Example.png|thumb]]</syntaxhighlight>) and inline math (<syntaxhighlight lang="wikitext" inline>$e^{i\pi}+1=0$</syntaxhighlight>) work too. Rich media renders both on [[Special:QuotationsOf]] and wherever the quotation is embedded with <syntaxhighlight lang="wikitext" inline>{{#content:…}}</syntaxhighlight>.
An image (<syntaxhighlight lang="wikitext" inline>[[File:Example.png|thumb]]</syntaxhighlight>) and inline math (<syntaxhighlight lang="wikitext" inline>$e^{i\pi}+1=0$</syntaxhighlight>) work too. Rich media renders both on [[Special:QuotationsOf]] and wherever the quotation is embedded with <syntaxhighlight lang="wikitext" inline>{{#content:…}}</syntaxhighlight>.
== 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 [[Special:UpdateQuotation|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 <syntaxhighlight lang="wikitext" inline>{{#content:Q100|fr|en}}</syntaxhighlight>. The original renders first, then one block per language:
<syntaxhighlight lang="wikitext">
L'original.
'''fr translation:'''
Le texte traduit.
'''en translation:'''
en translation not found
</syntaxhighlight>
The language code labels each block. A requested language without a translation renders the <code>{code} translation not found</code> message in place of the text. With no language codes, <syntaxhighlight lang="wikitext" inline>{{#content:Q100}}</syntaxhighlight> negotiates the display language from the embedding page as before.


== Editing a quotation ==
== Editing a quotation ==
Line 36: Line 58:


* the '''Quotation text''' appears exactly as it was entered — multi-line text keeps its line breaks;
* 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.
* the language, attribution and source fields carry the current values;
* any added translations appear as prefilled rows (see [[#Translating a quotation|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.
Change what you need and click '''Update item'''. Fields you leave blank keep their existing values — the item's class never changes.
Line 44: Line 67:
Open the quotation's item page and click '''Copy embed code''' — it offers two flavours:
Open the quotation's item page and click '''Copy embed code''' — it offers two flavours:


* '''Internal (on-wiki)''' — <syntaxhighlight lang="wikitext" inline>{{#content:Q100}}</syntaxhighlight>, 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 <code>&lt;blockquote&gt;</code> for a quote box.
* '''Internal (on-wiki)''' — <syntaxhighlight lang="wikitext" inline>{{#content:Q100}}</syntaxhighlight>, 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 <code>&lt;blockquote&gt;</code> for a quote box. To show specific translations below the original, add the language codes: <syntaxhighlight lang="wikitext" inline>{{#content:Q100|fr|en}}</syntaxhighlight> (see [[#Translating a quotation|Translating a quotation]]).
* '''External (iframe)''' — an <syntaxhighlight lang="html" inline><iframe src="https://wikibase.ronzz.org/wiki/Special:Embed/Q100" loading="lazy" style="width:100%;border:0;min-height:120px"></iframe></syntaxhighlight> snippet for a third-party site.
* '''External (iframe)''' — an <syntaxhighlight lang="html" inline><iframe src="https://wikibase.ronzz.org/wiki/Special:Embed/Q100" loading="lazy" style="width:100%;border:0;min-height:120px"></iframe></syntaxhighlight> snippet for a third-party site.



Revision as of 20:11, 3 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.

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