Mòdul:MLMT age 2/ús

De la Viquipèdia, l'enciclopèdia lliure

Second example for Module:Multilang module tools. This example is of no real use, it is for educational purposes only.

Link to this module:

The first example Module:MLMT age 1.

Similar to the prior example, but with grouping arguments and with introduction message.

Examples[modifica]

main1[modifica]

{{#invoke:MLMT age 2|main1|1957|2001}} -> 44 anys

{{#invoke:MLMT age 2|main1|1957}} -> 67 anys

{{#invoke:MLMT age 2|main1|birth_year=1957}} -> Error de Lua: El nom de paràmetre "birth_year" no és vàlid.

{{#invoke:MLMT age 2|main1|any_naix=1957|intro=true}} -> Error de Lua: El nom de paràmetre "any_naix" no és vàlid.

{{#invoke:MLMT age 2|main1|mort=2013|any_naix=1957}} -> Error de Lua: El nom de paràmetre "mort" no és vàlid.

{{#invoke:MLMT age 2|main1|any_mort=2000}} -> Error de Lua: "any_naix/birth_year/1" = No té un valor assignat.


{{#invoke:MLMT age 2|main1|2001|1957}} -> Error de Lua: Any de la mort després de l'any de naixement.

{{#invoke:MLMT age 2|main1|2057}} -> Error de Lua: Any de naixement després de l'any en curs.

main2[modifica]

{{#invoke:MLMT age 2|main2|2001|1957}} -> Error de Lua: "any_mort/death_year/2" = 1.957 és menor de 2.001.

{{#invoke:MLMT age 2|main2|2057}} -> Error de Lua: "any_naix/birth_year/1" = 2.057 és major de 2.024.

Lists[modifica]

{{#invoke:MLMT age 2|main|allitems=params}}

KeyDefault namesLocalized names (i18n)T.
year.birthbirth_year, 1any_naixi+-R
year.deathdeath_year, 2any_morti+
other.introintrob

You can change the localizated text in: Module:MLMT age 2/i18nUsed argument types: i+ (positive integer), b (boolean). "-R" indicates required arguments.


{{#invoke:MLMT age 2|main|allitems=template}}


<templatedata>
{
"params": {
"any_naix": {
"aliases": [
"birth_year",
["1"]
],
"type": "number",
"required": true
},
"any_mort": {
"aliases": [
"death_year",
["2"]
],
"type": "number"
},
"intro": {
"type": "boolean"
}
},
"format": "block"
}
</templatedata>


{{#invoke:MLMT age 2|main|allitems=labels}}

KeySourceLocalization (i18n)
yearsyearsanys

You can change the localizated text in: Module:MLMT age 2/i18n


{{#invoke:MLMT age 2|main|allitems=msgs}}

KeySourceTranslation
introThe age isL'edat és

You can change the localizated text in: Module:MLMT age 2/i18n


{{#invoke:MLMT age 2|main|allitems=errors}}

KeySourceTranslation
birth_after_todayBirth year after current yearAny de naixement després de l'any en curs
death_after_todayDeath year after birth yearAny de la mort després de l'any de naixement

You can change the localizated text in: Module:MLMT age 2/i18n