Difference between revisions of "Template:Broken ref/sandbox"
imported>Gadget850 (ce) |
imported>Andy M. Wang (sync (+doc, cat)) |
||
| Line 1: | Line 1: | ||
| − | <!-- Prefix: MediaWiki:Cite error --> | + | <!-- Prefix: MediaWiki:Cite error -->{{#if:{{{prefix|}}} |
| − | {{#if:{{{prefix|}}} | ||
|{{#invoke:Namespace detect|main | |{{#invoke:Namespace detect|main | ||
| main = {{{prefix|}}} | | main = {{{prefix|}}} | ||
| Line 11: | Line 10: | ||
| draft = {{{prefix|}}} | | draft = {{{prefix|}}} | ||
| other = <span class="brokenref">{{{prefix|}}}</span> | | other = <span class="brokenref">{{{prefix|}}}</span> | ||
| − | }} | + | }}<!-- All other errors -->|{{#invoke:Namespace detect|main |
| − | <!-- All other errors --> | ||
| − | |{{#invoke:Namespace detect|main | ||
| main = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}} | | main = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}} | ||
| category = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}} | | category = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}} | ||
| Line 23: | Line 20: | ||
| draft = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}} | | draft = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}} | ||
| other = <span class="brokenref">{{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}} }}</span> | | other = <span class="brokenref">{{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}} }}</span> | ||
| − | }} | + | }}<!-- Category management -->{{#invoke:Namespace detect|main |
| − | <!-- Category management --> | ||
| − | {{#invoke:Namespace detect|main | ||
| main = {{broken ref/cat |help={{{help|}}} |nocat={{{nocat|}}} |sortkey=}} | | main = {{broken ref/cat |help={{{help|}}} |nocat={{{nocat|}}} |sortkey=}} | ||
| category = {{broken ref/cat |help={{{help|}}} |nocat={{{nocat|}}} |sortkey=γ}} | | category = {{broken ref/cat |help={{{help|}}} |nocat={{{nocat|}}} |sortkey=γ}} | ||
| Line 36: | Line 31: | ||
| other = | | other = | ||
}} | }} | ||
| − | }} | + | }}<noinclude>{{documentation}} |
| + | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
| + | {{reflist}} <!-- dummy to steer automated tools away from this template --> | ||
| + | </noinclude> | ||
Revision as of 20:09, 22 April 2016
().
| 50px | This is the template sandbox page for Template:Broken ref (diff). See also the companion subpage for test cases. |
Script error: No such module "about".
| 40px | This template is used on approximately 42,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
| 40x40px | This template is used in system messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please discuss any changes on the talk page before implementing them. |
Contents
Usage
Cite is the software extension for the footnotes system. Cite.php includes error checking and generates error messages using MediaWiki interface messages. When Cite.php encounters an error, it generates a message pulled from a MediaWiki interface page. The MediaWiki pages are customized to use {{Broken ref}} to control the display of the error message and to add a category. {{Broken ref}} uses namespace detection to choose whether pages are categorized or not and if error messages show or not.
Namespaces
This template causes error messages to show only in certain namespaces. Category sorting is set by a sortkey in the template.
<section begin=sortkeys />
| Namespace | Sortkey | Uppercase |
|---|---|---|
| main (article) | alphabetic | |
| category | γ | Γ |
| template | τ | Τ |
| file | ι | Ι |
| help | ω | Ω |
| portal | ρ | Ρ |
| wikipedia | ψ | Ψ |
| draft | δ | Δ |
<section end=sortkeys />
Errors on talk and other pages do not show by default but can be enabled by adding a rule to Template:Yourcss:
span.brokenref {
display: inline;
}
Categories
The template causes pages that show and error to be placed in a maintenance category. Pages in these categories are then repaired by editors. Errors on talk and other pages do not add the category. Category management is done through {{broken ref/cat}}.
- Category:Pages with citation errors: main category.
Parameters
Error messages use:
|msg=text of the error message|lang=language using ISO code|help=name of help page, main title only|nocat=set to 'true' to suppress the category and thebrokenrefclass; use when transcluding the WikiMedia interface page for documentation purposes
Prefix interface pages use:
|prefix=text that precedes the message|lang=language using ISO code
Examples
Use the following example when editing MediaWiki error message pages:
{{broken ref
|msg=The <code><ref></code> tag has too many names
|lang=en
|help=Cite error ref too many keys
|nocat={{{nocat|}}}
}}
By including |nocat={{{nocat|}}}, the |nocat= parameter can be passed to {{broken ref}}.
Transcluding error messages
When creating documentation, the error messages can be transcluded so that the messages are automatically updated. Add |nocat=true to suppress the error category and the class that hides the error in some namespaces. The message transclusion always adds a hard line break at the end.
| Markup | Renders as |
|---|---|
{{MediaWiki:Cite error ref too many keys|nocat=true}}
|
Invalid |
To style the text in red to more closely simulate the message, use the {{red}} template.
| Markup | Renders as |
|---|---|
{{red|{{MediaWiki:Cite error ref too many keys|nocat=true}}}}
|
Invalid |
To style the text to exactly simulate the message, use the {{error}} template.
| Markup | Renders as |
|---|---|
{{error|{{MediaWiki:Cite error ref too many keys|nocat=true}}}}
|
Invalid |
Languages
These languages are supported. The list of languages is selected from the top uses at Wikipedia:Database reports/User preferences. Language management is done through {{broken ref/lang}}.
- en: English
- es: español
- fr: français
- pt-br: português do Brasil
- ru: русский
- de: Deutsch
- id: Bahasa Indonesia
- ar: العربية
- nl: Nederlands
- zh-cn: 中文(中国大陆)
- ro: română
- it: italiano
- tr: Türkçe
Plus the English variants:
- en-gb: British English
- en-ca: Canadian English
- Originally these were transcluded, but not all MediaWiki pages support such transclusion.
Interface pages
Complete list of interface pages by language:
Extended content
|
|---|
|
en: English
invalid names, e.g. too many
refs with no name must have content
no text was provided for refs named
name cannot be a simple integer. Use a descriptive title
Define more in the [[MediaWiki:$2]] message.
Define more in the [[MediaWiki:Cite references link many format backlink labels]] message.
invalid names, e.g. too many
refs with no name must have content
no text was provided for refs named
name cannot be a simple integer. Use a descriptive title
Define more in the [[MediaWiki:$2]] message.
Define more in the [[MediaWiki:Cite references link many format backlink labels]] message.
invalid names, e.g. too many
refs with no name must have content
no text was provided for refs named
name cannot be a simple integer. Use a descriptive title
Define more in the [[MediaWiki:$2]] message.
Define more in the [[MediaWiki:Cite references link many format backlink labels]] message.
nombres no válidos, p. ej. demasiados
las referencias sin nombre deben tener contenido
no se ha definido el contenido de las referencias llamadas
el nombre no puede ser un número entero. Usa un título descriptivo
Define más en el mensaje [[MediaWiki:$2]].
Define más en [[MediaWiki:Cite references link many format backlink labels]].
noms incorrects, par exemple trop nombreux
les références sans nom doivent avoir un contenu
aucun texte n’a été fourni pour les références nommées
le nom ne peut être un entier simple. Utilisez un titre descriptif
Définissez-en plus dans le message [[MediaWiki:$2]].
Définissez-en un plus grand nombre dans le message [[MediaWiki:Cite references link many format backlink labels]].
nomes inválidos, por exemplo, muito extenso
refs sem nome devem possuir conteúdo
não foi fornecido texto para as refs chamadas
o nome não pode ser um número. Utilize um título descritivo
Defina mais na mensagem [[MediaWiki:$2]].
Defina mais na mensagem [[MediaWiki:Cite references link many format backlink labels]].
ошибочные имена, возможно, слишком много
элемент без имени должен иметь содержание
имя не может быть целым числом. Используйте описательное название
Определите дополнительные в сообщении [[MediaWiki:$2]].
Следует расширить системное сообщение [[MediaWiki:Cite references link many format backlink labels]]
Ein Administrator muss weitere mit der Systemnachricht [[MediaWiki:$2]] festlegen.
nama tidak sah; misalnya, terlalu banyak
referensi tanpa nama harus memiliki isi
tidak ditemukan teks untuk ref bernama
nama tidak boleh intejer sederhana. Gunakan nama deskriptif
Tambahkan ketentuan dalam pesan [[MediaWiki:$2]] .
Tambahkan lagi di pesan sistem [[MediaWiki:Cite references link many format backlink labels]]
أسماء غير صحيحة، على سبيل المثال كثيرة جدا
المراجع غير ذات الاسم يجب أن تمتلك محتوى
لا نص تم توفيره للمراجع المسماة
الاسم لا يمكن أن يكون عددا صحيحا بسيطا. استخدم عنوانا وصفيا
للحصول على تعريف أكثر انظر هذه [[MediaWiki:$2]] الرسالة.
عرف المزيد في رسالة [[MediaWiki:Cite references link many format backlink labels]]
onjuiste namen, bijvoorbeeld te veel
refs zonder naam moeten inhoud hebben
er is geen tekst opgegeven voor referenties met de naam
de naam kan geen eenvoudige integer zijn. Gebruik een beschrijvende titel
U kunt er meer instellen in het systeembericht [[MediaWiki:$2]].
Geef meer labels op in het bericht [[MediaWiki:Cite references link many format backlink labels]]
nume invalid, ex. prea multe nume
ref-urile fără nume trebuie să aibă conținut
niciun text nu a fost furnizat pentru ref-urile numite
numele nu poate fi un număr. Folosește un titlu descriptiv
Definiți mai multe etichete în cadrul mesajului [[MediaWiki:$2]].
Definiți mai multe etichete în cadrul mesajului [[MediaWiki:Cite references link many format backlink labels]].
geçersiz isimler, ör. çok fazla
isimsiz reflerin içeriği olmalı
içeriksiz reflerin bir ismi olmalı
isim basit bir tamsayı olamaz. Tanımlayıcı bir başlık kullanın
parametrelere izin verilmiyor.
[[MediaWiki:$2]] mesajında daha fazla tanımlayın.
[[MediaWiki:Cite references link many format backlink labels]] mesajında daha fazla tanımlayın
|
| The above documentation is transcluded from Template:Broken ref/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |