Jump to content

Help:Contributing/quotation: Difference between revisions

From Wikibase
Document the internal {{#content:}} embed + Special:QuotationsOf listing (via update-page on MediaWiki MCP Server)
Several-authors wording for the quotation attribution (via update-page on MediaWiki MCP Server)
 
(8 intermediate revisions by the same user not shown)
Line 12: Line 12:
| Quotation text || The quotation itself. It is '''full wikitext''' — links, emphasis, <syntaxhighlight lang="wikitext" inline>[[File:…]]</syntaxhighlight> media and <syntaxhighlight lang="wikitext" inline>$…$</syntaxhighlight> math all render. Pick the language of the text in the '''Language''' combobox (any of the 500+ Wikibase languages).
| Quotation text || The quotation itself. It is '''full wikitext''' — links, emphasis, <syntaxhighlight lang="wikitext" inline>[[File:…]]</syntaxhighlight> media and <syntaxhighlight lang="wikitext" inline>$…$</syntaxhighlight> 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. <code>Q94</code>).
| Attributed to || The person or collective (organization, group, band…) who said or wrote it. Paste the name(s) in the '''Author(s)''' field and click '''Search for authors''' — each name is matched against existing person/collective items and must be confirmed (the create dialog starts with the external-authority search and always offers '''create the item manually instead'''). Several authors are allowed; each confirmed author becomes its own <code>attributed to</code> statement. You can also type an item id directly (e.g. <code>Q94</code>); the typeahead only suggests person/collective items, not sources. Optional when a source is selected: a source with exactly one author supplies the author; a source with several authors asks you to pick them.
|-
|-
| Source URL || Optional: the page or document the quotation comes from.
| 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]]).
| Source || The book or article the quotation is cited from (a source item created via [[Special:AddSource]]). At least one of '''Attributed to''' / '''Source''' is required.
|-
|-
| Date || Optional: when the quotation was made (format <code>YYYY-MM-DD</code>).
| Date || Optional: when the quotation was made (format <code>YYYY-MM-DD</code>).
|}
|}
At least one of '''Attributed to''' or '''Source''' is required. If you leave the author blank and select a source that has exactly one author, that author is inherited; a source with several authors asks you to specify the author(s) in the '''Attributed to''' field. A source with no author still counts as attribution.


Saving creates the item and redirects to it.
Saving creates the item and redirects to it.
Line 30: Line 32:


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 60:


* 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.
If you opened the edit form from the '''Add more''' success popup (the second button when adding), '''Update item''' returns you to the reopened [[Special:AddQuotation]] form and the popup shows the updated quotation again — the fields you filled for the next item are preserved, so you can keep adding.


== Embedding a quotation ==
== Embedding a quotation ==
Line 44: Line 71:
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 renders the quotation inline on any page of this wiki (the page language is negotiated automatically). The quotation's rich media and links render here too.
* '''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.


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).
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 <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 ==

Latest revision as of 09:17, 10 November 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 or collective (organization, group, band…) who said or wrote it. Paste the name(s) in the Author(s) field and click Search for authors — each name is matched against existing person/collective items and must be confirmed (the create dialog starts with the external-authority search and always offers create the item manually instead). Several authors are allowed; each confirmed author becomes its own attributed to statement. You can also type an item id directly (e.g. Q94); the typeahead only suggests person/collective items, not sources. Optional when a source is selected: a source with exactly one author supplies the author; a source with several authors asks you to pick them.
Source URL Optional: the page or document the quotation comes from.
Source The book or article the quotation is cited from (a source item created via Special:AddSource). At least one of Attributed to / Source is required.
Date Optional: when the quotation was made (format YYYY-MM-DD).

At least one of Attributed to or Source is required. If you leave the author blank and select a source that has exactly one author, that author is inherited; a source with several authors asks you to specify the author(s) in the Attributed to field. A source with no author still counts as attribution.

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.

If you opened the edit form from the Add more success popup (the second button when adding), Update item returns you to the reopened Special:AddQuotation form and the popup shows the updated quotation again — the fields you filled for the next item are preserved, so you can keep adding.

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