Difference between revisions of "Template:Literal translation/doc"

From blackwiki
Jump to navigation Jump to search
imported>Menchi
(explantion)
imported>ItsPugle
(Improving template data)
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
 
* <code><nowiki>{{literal translation}}</nowiki></code> &rarr; {{literal translation}}
 
* <code><nowiki>{{literal translation}}</nowiki></code> &rarr; {{literal translation}}
 
* <code><nowiki>{{literal translation|lk=yes}}</nowiki></code> &rarr; {{literal translation|lk=yes}}
 
* <code><nowiki>{{literal translation|lk=yes}}</nowiki></code> &rarr; {{literal translation|lk=yes}}
* <code><nowiki>{{literal translation|i=yes}}</nowiki></code> &rarr; {{literal translation|i=yes}}
+
* <code><nowiki>{{literal translation|lk=no}}</nowiki></code> &rarr; {{literal translation|lk=no}}
 
* <code><nowiki>{{literal translation|a}}</nowiki></code> &rarr; {{literal translation|a}}
 
* <code><nowiki>{{literal translation|a}}</nowiki></code> &rarr; {{literal translation|a}}
* <code><nowiki>{{literal translation|''a''}}</nowiki></code> &rarr; {{literal translation|''a''}}
+
* <code><nowiki>{{literal translation|''a'' A}}</nowiki></code> &rarr; {{literal translation|''a'' A}}
 
* <code><nowiki>{{literal translation|a|b}}</nowiki></code> &rarr; {{literal translation|a|b}}
 
* <code><nowiki>{{literal translation|a|b}}</nowiki></code> &rarr; {{literal translation|a|b}}
 
* <code><nowiki>{{literal translation|a|b|c|d}}</nowiki></code> &rarr; {{literal translation|a|b|c|d}}
 
* <code><nowiki>{{literal translation|a|b|c|d}}</nowiki></code> &rarr; {{literal translation|a|b|c|d}}
  
 
For now, the template takes up to four separate translations (<code>|a|b|c|d</code>). If each meaning is a single word, using serial commas is another stylistic choice: <code>a, b, c, d</code>.
 
For now, the template takes up to four separate translations (<code>|a|b|c|d</code>). If each meaning is a single word, using serial commas is another stylistic choice: <code>a, b, c, d</code>.
 +
 +
Unlinking (<code>lk=no</code>) avoids cluttering the same paragraph or list with repetitive overlinking of "{{lit.}}".
  
 
== Spacing demonstration ==
 
== Spacing demonstration ==
Line 32: Line 34:
 
"params": {
 
"params": {
 
"1": {
 
"1": {
"label": "literal meaning",
+
"label": "Literal meaning",
"example": "\"not is\"",
+
"description": "Gloss for a term",
 
"type": "string",
 
"type": "string",
 
"required": true
 
"required": true
 
},
 
},
 
"2": {
 
"2": {
"label": "second literal meaning",
+
"label": "2nd literal meaning",
 +
"description": "Another meaning, if any",
 +
"type": "string"
 +
},
 +
"3": {
 +
"label": "3rd literal meaning",
 +
"description": "Another meaning, if any",
 +
"type": "string"
 +
},
 +
"4": {
 +
"label": "4th literal meaning",
 +
"description": "Another meaning (last possible), if any",
 
"type": "string"
 
"type": "string"
 
},
 
},
 
"sortable": {
 
"sortable": {
"type": "string"
+
"label": "Sortable",
 +
"type": "string",
 +
"description": "In sortable tables, ignore 'lit.'"
 
},
 
},
 
"i": {
 
"i": {
"label": "italic",
+
"label": "Italic",
 +
"description": "If 'yes', the prefix 'lit.' is italicized. The meaning is still not italicized. Italics of either is almost never necessary stylistically.",
 
"type": "string"
 
"type": "string"
 
},
 
},
 
"lk": {
 
"lk": {
"label": "link",
+
"label": "Link",
"type": "string"
+
"type": "string",
 +
"description": "If 'yes' or 'on', linked to the article on literal translation. If 'no' or 'off', no links or dashed underlines."
 
}
 
}
}
+
},
 +
"description": "Formats the literal translation of a word or phrase per Manual of Style guidelines."
 
}
 
}
 
</templatedata>
 
</templatedata>
 +
 +
==Redirects==
 +
Any of the following can be used instead of {{tl|literal translation}}, with the same parameters and results:
 +
*{{tl|Lit}} / {{tl|lit}}
 +
*{{tl|Lit.}} / {{tl|lit.}}
 +
*{{tl|Literally}} / {{tl|literally}}

Latest revision as of 01:34, 4 November 2020

Currently this template uses single quotation marks ('…'), because the present Wikipedia's Manual of Style (MOS:SINGLE) suggests that simple glosses be enclosed this way.

Usage

For now, the template takes up to four separate translations (|a|b|c|d). If each meaning is a single word, using serial commas is another stylistic choice: a, b, c, d.

Unlinking (lk=no) avoids cluttering the same paragraph or list with repetitive overlinking of "lit.".

Spacing demonstration

  • a{{literal translation}}bcd → alit.bcd
  • a{{literal translation|i=yes}}bcd → alit.bcd
  • a{{literal translation|b}}cd → alit.Template:Sp 'b'cd
  • a{{literal translation|b|i=yes}}cd → alit.Template:Sp 'b'cd
  • a{{literal translation|b|c}}d → alit.Template:Sp 'b'Template:Sp or 'c'd
  • a{{literal translation|b|c|i=yes}}d → alit.Template:Sp 'b'Template:Sp or 'c'd


Formats the literal translation of a word or phrase per Manual of Style guidelines.

Template parameters

ParameterDescriptionTypeStatus
Literal meaning1

Gloss for a term

Stringrequired
2nd literal meaning2

Another meaning, if any

Stringoptional
3rd literal meaning3

Another meaning, if any

Stringoptional
4th literal meaning4

Another meaning (last possible), if any

Stringoptional
Sortablesortable

In sortable tables, ignore 'lit.'

Stringoptional
Italici

If 'yes', the prefix 'lit.' is italicized. The meaning is still not italicized. Italics of either is almost never necessary stylistically.

Stringoptional
Linklk

If 'yes' or 'on', linked to the article on literal translation. If 'no' or 'off', no links or dashed underlines.

Stringoptional

Redirects

Any of the following can be used instead of {{literal translation}}, with the same parameters and results: