Template:T: Difference between revisions

From The Toaq Wiki
mNo edit summary
(add nowrap property so that the link arrow (↗︎) doesn't break into a new line)
 
(26 intermediate revisions by 2 users not shown)
Line 4: Line 4:
Applies appropriate formatting and language tags to Toaq text. Please enclose ''each and every'' snippet of Toaq in this template.
Applies appropriate formatting and language tags to Toaq text. Please enclose ''each and every'' snippet of Toaq in this template.


== Arguments ==
== Positional arguments ==


; toaq (required)
#; toaq (required)
; definition (recommended) : shown as tooltip
#
; [[toadua]] query (optional) : if provided but left empty, the query is prefilled with the word itself
#; definition (recommended) : shown as tooltip
#
#; [[toadua]] query (optional) : if provided but left empty, the query is prefilled with the word itself
#
#; show query (optional) : if present (no matter the content), the query (as supplied above) will be displayed next to the link arrow


== Examples ==
== Examples ==


: <code><nowiki>{{t|bao|{{x}} is white.}}</nowiki></code> → {{t|bao|{{x}} is white.}}
Toadua-linked entries are preferred to ones without a link or a tooltip. If supplying single words without appropriate context to determine their meaning, please use the <code><nowiki>{{t|bao||}}</nowiki></code> form.
: <code><nowiki>{{t|bao|{{x}} is white.|}}</nowiki></code> → {{t|bao|{{x}} is white.|}}
 
: <code><nowiki>{{t|tẻst word||#aaaaaaa}}</nowiki></code> → {{t|tẻst word||#aaaaaaa}}
* No Toadua link
**
**; Plain Toaq text
**: <code><nowiki>{{t|bao}}</nowiki></code> → {{t|bao}}
**
**; Word with user-defined definition tooltip
**: <code><nowiki>{{t|bao|{{x}} is white.}}</nowiki></code> → {{t|bao|{{x}} is white.}}
*
* Implicit Toadua link
**
**; Word with implicit Toadua link but no tooltip
**: <code><nowiki>{{t|bao||}}</nowiki></code> → {{t|bao||}}
**
**; Word with definition tooltip and implicit Toadua link
**: <code><nowiki>{{t|bao|{{x}} is white.|}}</nowiki></code> → {{t|bao|{{x}} is white.|}}
*
* Explicit Toadua link
**
**; Word with explicit Toadua query link
**: <code><nowiki>{{t|tẻst word||#aaaaaaa}}</nowiki></code> → {{t|tẻst word||#aaaaaaa}}
**
**; Word with definition tooltip, explicit Toadua link, ''and'' an indication of what query that link will take you to
**: <code><nowiki>{{t|bao|{{x}} is white.|#my cool definition of bao}}</nowiki></code> → {{t|bao|{{x}} is white.|#my cool definition of bao}}
 
</noinclude><includeonly
</noinclude><includeonly
><span class="toaq" lang="toaq" {{#if:
><span class="toaq" {{#if: {{{3|}}} | style="white-space: nowrap;"
      {{{2|}}}
                                    | }}
    | title="{{{2}}}"
  ><span lang="toaq"
     | }}>{{#if: {{{3|}}}
        {{#if: {{{2|}}} | title="{{#replace:{{{2|}}}|{{x}}|___}}"
              | [[toadua:{{{3}}}|{{{1}}}]]
                        | }}
              | {{#ifeq: {{{3|}}} | {{{3}}}
    >{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:
                        | [[toadua:{{{1}}}|{{{1}}}]]
    {{{1}}}
                        | {{{1}}} }} }}</span
     |i|ı}}
    |ạ́|á&#x323;}}
    |ạ̈|ä&#x323;}}
    |ậ|â&#x323;}}
    |ụ́|ú&#x323;}}
    |ụ̈|ü&#x323;}}
    |ụ̂|û&#x323;}}
    |ị́|í&#x323;}}
    |ị̈|ï&#x323;}}
    |ị̂|î&#x323;}}
    |ọ́|ó&#x323;}}
    |ọ̈|ö&#x323;}}
    |ộ|ô&#x323;}}
    |ẹ́|é&#x323;}}
    |ẹ̈|ë&#x323;}}
    |ệ|ê&#x323;}}</span
  >{{#if: {{{3|}}}
        | {{#ifeq: {{{4|}}} | {{{4}}} | <sup>[https://toadua.uakci.pl/#{{{3}}} <nowiki></nowiki>{{{3}}}]</sup>
                                      | <sup>[https://toadua.uakci.pl/#{{{3}}} <nowiki></nowiki>]</sup      > }}
        | {{#ifeq: {{{3|}}} | {{{3}}} | <sup>[https://toadua.uakci.pl/#{{{1}}} <nowiki></nowiki>]</sup      > | }} }}</span
></includeonly>
></includeonly>

Latest revision as of 19:13, 2 December 2023

Synopsis

Applies appropriate formatting and language tags to Toaq text. Please enclose each and every snippet of Toaq in this template.

Positional arguments

  1. toaq (required)
  2. definition (recommended)
    shown as tooltip
  3. toadua query (optional)
    if provided but left empty, the query is prefilled with the word itself
  4. show query (optional)
    if present (no matter the content), the query (as supplied above) will be displayed next to the link arrow

Examples

Toadua-linked entries are preferred to ones without a link or a tooltip. If supplying single words without appropriate context to determine their meaning, please use the {{t|bao||}} form.

  • No Toadua link
    • Plain Toaq text
      {{t|bao}}bao
    • Word with user-defined definition tooltip
      {{t|bao|{{x}} is white.}}bao
  • Implicit Toadua link
    • Word with implicit Toadua link but no tooltip
      {{t|bao||}}bao
    • Word with definition tooltip and implicit Toadua link
      {{t|bao|{{x}} is white.|}}bao
  • Explicit Toadua link
    • Word with explicit Toadua query link
      {{t|tẻst word||#aaaaaaa}}tẻst word
    • Word with definition tooltip, explicit Toadua link, and an indication of what query that link will take you to
      {{t|bao|{{x}} is white.|#my cool definition of bao}}baocool definition of bao