Template:o nnp: Difference between revisions

From sona pona, the Toki Pona wiki
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{nnp|{{#if:{{{panalukin|}}}||<span title="{{{1}}}">}}{{#ifexpr:{{{1}}}>1000000000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000|{{o nanpa|{{#expr:({{{1}}}/100000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000|{{o nanpa|{{#expr:({{{1}}}/1000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000|{{o nanpa|{{#expr:({{{1}}}/10000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100|{{o nanpa|{{#expr:({{{1}}}/100) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{o nanpa|{{#expr:{{{1}}} mod 100}}|panalukin=ala}}{{#if:{{{panalukin|}}}||</span>}}<!--|{{{1}}}-->}}</includeonly><noinclude>This template is currently broken<!--<code><nowiki>{{o nnp|1234567890}}</nowiki></code> becomes <code>{{o nnp|1234567890}}</code>--></noinclude>
<includeonly>{{#if:{{{nasin|}}}|{{nnp|{{#if:{{{panalukin|}}}||<span title="{{{1}}}">}}{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#ifexpr:{{{1}}}>1000000000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000000000000000) mod 100|panalukin=ala}}}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000000000) mod 100|panalukin=ala}}}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000|{{o nanpa|{{#expr:({{{1}}}/100000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000|{{o nanpa|{{#expr:({{{1}}}/1000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000|{{o nanpa|{{#expr:({{{1}}}/10000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100|{{o nanpa|{{#expr:({{{1}}}/100) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{o nanpa|{{#expr:{{{1}}} mod 100}}|panalukin=ala}}|ale{{space}}|A{{wbr}}}}|mute{{space}}|M{{wbr}}}}|luka{{space}}|L{{wbr}}}}|tu{{space}}|T{{wbr}}}}|wan{{space}}|W{{wbr}}}}|ala{{space}}|X{{wbr}}}}|ale{{nbsp}}|A}}|mute{{nbsp}}|M}}|luka{{nbsp}}|L}}|tu{{nbsp}}|T}}|wan{{nbsp}}|W}}|ala{{nbsp}}|X}}|ale|A}}|mute|M}}|luka|L}}|tu|T}}|wan|W}}|ala|X}}{{#if:{{{panalukin|}}}||</span>}}|{{#if:{{{brackets|}}}|{{{1}}}|}}}}|{{nnp|{{#if:{{{panalukin|}}}||<span title="{{{1}}}">}}{{#ifexpr:{{{1}}}>1000000000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000000000|{{o nanpa|{{#expr:({{{1}}}/100000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000000000|{{o nanpa|{{#expr:({{{1}}}/1000000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000000000|{{o nanpa|{{#expr:({{{1}}}/10000000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100000000|{{o nanpa|{{#expr:({{{1}}}/100000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>1000000|{{o nanpa|{{#expr:({{{1}}}/1000000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>10000|{{o nanpa|{{#expr:({{{1}}}/10000) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{#ifexpr:{{{1}}}>100|{{o nanpa|{{#expr:({{{1}}}/100) mod 100}}|panalukin=ala}}{{nbsp}}ale }}{{o nanpa|{{#expr:{{{1}}} mod 100}}|panalukin=ala}}{{#if:{{{panalukin|}}}||</span>}}|{{#if:{{{brackets|}}}|{{{1}}}|}}}}}}</includeonly><noinclude>Documentation:

<code><nowiki>{{o nnp|1234567890}}</nowiki></code> becomes <code>{{o nnp|1234567890}}</code>

<code><nowiki>{{o nnp|1 234 567 890|nasin=sitelen|brackets=yes}}</nowiki></code> becomes <code>{{o nnp|1234567890|nasin=sitelen|brackets=yes}}</code>

The template itself allows for numbers over 1 000 000 000 000 000 000 000 000 000 000, but this will reach the character limit and break.</noinclude>

Revision as of 16:03, 9 March 2023

Documentation:

{{o nnp|1234567890}} becomes luka luka tu alemute luka luka tu tu alemute mute luka luka luka wan alemute mute mute luka luka luka tu wan alemute mute mute mute luka luka [nnp]

{{o nnp|1 234 567 890|nasin=sitelen|brackets=yes}} becomes Error: String exceeds 1,000 character limit. (1234567890 in nasin nanpa pona)

The template itself allows for numbers over 1 000 000 000 000 000 000 000 000 000 000, but this will reach the character limit and break.