Template:Example: Difference between revisions

From sona pona, the Toki Pona wiki
Content added Content deleted
No edit summary
(add templatedata)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><blockquote>
<includeonly><blockquote>
{{#if:{{{sp|}}}||{{#if:{{{from|}}}||{{#if:{{{3|}}}|{{sps|{{Trim|{{{3}}}}}}}|{{sps|{{#replace:{{Trim|{{{1}}}}}|.|&#x3000;}}}} }}<br>}}}}
{{#if:{{{sp|}}}||{{#if:{{{from|}}}||<div class="noexcerpt">{{#if:{{{3|}}}|{{sps|{{Trim|{{{3}}}}}}}|{{sps|{{Trim|{{#replace:{{#replace:{{{1}}}|.|&#x3000;}}|,|}}}}}}}}</div>}}}}
{{#if:{{{2|<noinclude><nowiki /></noinclude>}}}|'''}}{{#if:{{{from|}}}|{{lang|{{{from}}}|{{{1}}}}}|{{tp|{{{1}}}}}}}{{#if:{{{2|<noinclude><nowiki /></noinclude>}}}|'''}}
{{#if:{{{2|<noinclude><nowiki /></noinclude>}}}|'''}}{{#if:{{{from|}}}|{{lang|{{{from}}}|{{{1}}}}}|{{tp|{{{1}}}}}}}{{#if:{{{2|<noinclude><nowiki /></noinclude>}}}|'''}}
{{#if:{{{2|<noinclude><nowiki /></noinclude>}}}|{{Indent|
{{#if:{{{2|<noinclude><nowiki /></noinclude>}}}|{{Indent|
Line 14: Line 14:


<code><nowiki>{{Example|ma Kanata|Canada|ma [kasi alasa nasin awen telo a]}}</nowiki></code> becomes {{Example|ma Kanata|Canada|ma [kasi alasa nasin awen telo a]}}
<code><nowiki>{{Example|ma Kanata|Canada|ma [kasi alasa nasin awen telo a]}}</nowiki></code> becomes {{Example|ma Kanata|Canada|ma [kasi alasa nasin awen telo a]}}
<templatedata>
</noinclude>
{
"params": {
"1": {
"label": "Word",
"description": "Type in sitelen latin to display both sitelen pona and sitelen latin.",
"type": "string"
},
"2": {
"label": "Translation",
"description": "Input the English translation here",
"type": "string"
},
"3": {
"label": "Override sitelen pona?",
"description": "Overrides the auto-generated sitelen pona. Main use case is to input proper nouns.",
"example": "ma [kasi alasa nasin awen telo a]",
"type": "string"
},
"sp": {
"label": "Include sitelen pona?",
"type": "boolean",
"default": "yes"
},
"from": {
"description": "use ISO language codes; hides the toki pona translations",
"example": "en, kr, "
}
},
"description": "Automatically adds sitelen pona, translation, and/or sitelen latin for examples",
"paramOrder": [
"1",
"2",
"3",
"sp",
"from"
]
}
</templatedata></noinclude>

Latest revision as of 12:06, 8 December 2023

{{Example|ma}} becomes

ma

ma

{{Example|place|from=en}} becomes

place

{{Example|ma|place}} becomes

ma

ma

place

{{Example|ma|place|sp=no}} (or anything other than "no") becomes

ma

place

{{Example|ma Kanata|Canada|ma [kasi alasa nasin awen telo a]}} becomes

ma [kasi alasa nasin awen telo a]

ma Kanata

Canada

Automatically adds sitelen pona, translation, and/or sitelen latin for examples

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Word1

Type in sitelen latin to display both sitelen pona and sitelen latin.

Stringoptional
Translation2

Input the English translation here

Stringoptional
Override sitelen pona?3

Overrides the auto-generated sitelen pona. Main use case is to input proper nouns.

Example
ma [kasi alasa nasin awen telo a]
Stringoptional
Include sitelen pona?sp

no description

Default
yes
Booleanoptional
fromfrom

use ISO language codes; hides the toki pona translations

Example
en, kr,
Unknownoptional