User:DomoViridi/TempTest/Testcases/nl

From Gramps

(NL subpage)

Before the transclusion:

FULLPAGENAME for this page is User:DomoViridi/TempTest/Testcases/nl.

PAGELANGUAGE for this page is en, for English.

In the transcluded page:

Test cases for the sandbox Dict template.

FULLPAGENAME for this page is User:DomoViridi/TempTest/Testcases/nl.

PAGELANGUAGE for this page is en, for English.

Note: In this format, the case of the template name does matter. "Dict" works, but "dict" does not.

Classic, with lang and default= for Dutch

Straight-up classic entry, calling English

{{User:DomoViridi/TempTest/Dict | lang=en| word=sillius soddus
 | en=silly sod
 | default=sukkel
 }}
sillius soddus
silly sod

Straight-up classic entry, calling Dutch

{{User:DomoViridi/TempTest/Dict | lang=nl| word=sillius soddus
 | en=silly sod
 | default=sukkel
 }}
sillius soddus
sukkel

Straight-up classic entry, calling French

{{User:DomoViridi/TempTest/Dict | lang=fr| word=sillius soddus
 | en=silly sod
 | default=sukkel
 }}
sillius soddus

Straight-up classic entry, calling Spanish

{{User:DomoViridi/TempTest/Dict | lang=sp| word=sillius soddus
 | en=silly sod
 | default=sukkel
 }}
sillius soddus

Only English, calling English

{{User:DomoViridi/TempTest/Dict | lang=en| word=sillius soddus
 | en=silly sod
 }}
sillius soddus
silly sod

Only English, calling Dutch

{{User:DomoViridi/TempTest/Dict | lang=nl| word=sillius soddus
 | en=silly sod
 }}
sillius soddus

Only English, calling Spanish

{{User:DomoViridi/TempTest/Dict | lang=sp| word=sillius soddus
 | en=silly sod
 }}
sillius soddus

Only Dutch, calling English

{{User:DomoViridi/TempTest/Dict | lang=en| word=sillius soddus
 | default=sukkel
 }}
sillius soddus

Only Dutch, calling Dutch

{{User:DomoViridi/TempTest/Dict | lang=nl| word=sillius soddus
 | default=sukkel
 }}
sillius soddus
sukkel

Only Dutch, calling Spanish

{{User:DomoViridi/TempTest/Dict | lang=sp| word=sillius soddus
 | default=sukkel
 }}
sillius soddus




With lang parameter

Straight-up classic entry, calling English

{{User:DomoViridi/TempTest/Dict | lang=en| word=sillius soddus
 | en=silly sod
 | nl=sukkel
 }}
sillius soddus
silly sod

Straight-up classic entry, calling Dutch

{{User:DomoViridi/TempTest/Dict | lang=nl| word=sillius soddus
 | en=silly sod
 | nl=sukkel
 }}
sillius soddus
sukkel

Straight-up classic entry, calling French

{{User:DomoViridi/TempTest/Dict | lang=fr| word=sillius soddus
 | en=silly sod
 | nl=sukkel
 }}
sillius soddus

Straight-up classic entry, calling Spanish

{{User:DomoViridi/TempTest/Dict | lang=sp| word=sillius soddus
 | en=silly sod
 | nl=sukkel
 }}
sillius soddus

Only English, calling English

{{User:DomoViridi/TempTest/Dict | lang=en| word=sillius soddus
 | en=silly sod
 }}
sillius soddus
silly sod

Only English, calling Dutch

{{User:DomoViridi/TempTest/Dict | lang=nl| word=sillius soddus
 | en=silly sod
 }}
sillius soddus

Only English, calling Spanish

{{User:DomoViridi/TempTest/Dict | lang=sp| word=sillius soddus
 | en=silly sod
 }}
sillius soddus

Only Dutch, calling English

{{User:DomoViridi/TempTest/Dict | lang=en| word=sillius soddus
 | nl=sukkel
 }}
sillius soddus

Only Dutch, calling Dutch

{{User:DomoViridi/TempTest/Dict | lang=nl| word=sillius soddus
 | nl=sukkel
 }}
sillius soddus
sukkel

Only Dutch, calling Spanish

{{User:DomoViridi/TempTest/Dict | lang=sp| word=sillius soddus
 | nl=sukkel
 }}
sillius soddus


No lang parameter

Full

{{User:DomoViridi/TempTest/Dict | word=sillius soddus
 | en=silly sod
 | nl=sukkel
 }}
sillius soddus

No parameters

{{User:DomoViridi/TempTest/Dict}}
{{{1}}} 

Only English

{{User:DomoViridi/TempTest/Dict | word=sillius soddus
 | en=silly sod
 }}
sillius soddus

Only Dutch

{{User:DomoViridi/TempTest/Dict | word=sillius soddus
 | nl=sukkel
 }}
sillius soddus


Adding a language span

Adding

<span lang=nl>...</span>

might set the PAGELANGUAGE magic word in the template.

Test on PAGELANGUAGE directly:

<span lang="nl">PAGELANGUAGE for this page is {{PAGELANGUAGE}}, for {{#language:{{PAGELANGUAGE}}}}.</span>

PAGELANGUAGE for this page is en, for English.

Or with a div:

Test on PAGELANGUAGE directly:

<div lang="nl" dir="ltr" class="mw-content-ltr">PAGELANGUAGE for this page is {{PAGELANGUAGE}}, for {{#language:{{PAGELANGUAGE}}}}.</div>
PAGELANGUAGE for this page is en, for English.

Test on a lemma:

<span lang=nl>{{User:DomoViridi/TempTest/Dict | word=sillius soddus
| en=silly sod
| nl=sukkel
}}</span>

sillius soddus


With 'full' parameter

Planned for future support for abbreviations.

Classical, with only the default parameter, containing the expansion (en).

{{User:DomoViridi/TempTest/Dict | lang=en| word=S.S. | default=Sillius Soddus}}
S.S.

Classical, with only the default parameter, containing the expansion (nl).

{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | default=Sillius Soddus}}
S.S.
Sillius Soddus

Modernised, with full parameter and en and nl translations (en).

{{User:DomoViridi/TempTest/Dict | lang=en| word=S.S. | full=Sillius Soddus 
 | en=silly sod
 | nl=sukkel
 }}
S.S. - Sillius Soddus
silly sod

Modernised, with full parameter and en and nl translations (nl).

{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus 
 | en=silly sod
 | nl=sukkel
 }}
S.S. - Sillius Soddus
sukkel

Spacing check

Does the template introduce extra newlines or spaces?

Calls close together

{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus
| en=silly sod
| nl=sukkel
}}
{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus
| en=silly sod
| nl=sukkel
}}
{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus
| en=silly sod
| nl=sukkel
}}
S.S. - Sillius Soddus
sukkel
S.S. - Sillius Soddus
sukkel
S.S. - Sillius Soddus
sukkel

These should generate only one HTML <dl> block.

Calls with blank line in between

{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus
| en=silly sod
| nl=sukkel
}}

{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus
| en=silly sod
| nl=sukkel
}}

{{User:DomoViridi/TempTest/Dict | lang=nl| word=S.S. | full=Sillius Soddus
| en=silly sod
| nl=sukkel
}}
S.S. - Sillius Soddus
sukkel
S.S. - Sillius Soddus
sukkel
S.S. - Sillius Soddus
sukkel

These will generate separate HTML <dl> blocks. The vertical space between entries should be slightly larger than with a single block.

Silly: two calls on one line

{{User:DomoViridi/TempTest/Dict|lang=nl|abamita|nl=overgrootmoeder}}{{User:DomoViridi/TempTest/Dict|lang=nl|abamita|nl=overgrootmoeder}}
abamita 
overgrootmoeder
abamita 
overgrootmoeder

These should also generate only one HTML <dl> block. Although: really tight template coding should produce malformed wiki code:

;abamita:overgrootmoeder;abimata:overgrootmoeder

resulting in

abamita
overgrootmoeder;abimata:overgrootmoeder

The real template

Word as first parameter (nl)

{{Dict|lang=nl|abamita|nl=overgrootmoeder}}
abamita 
overgrootmoeder


Problem with unnamed word parameter

Gives problem in Template:Latindict/K

The unnamed word parameter should not be followed by a newline. That newline becomes part of the value. That breaks up the description-list-entry format.

{{dict|lang ={{{1}}} |k
|nl= zie c
|en= see c
}}
k
:

Our local template:

{{User:DomoViridi/TempTest/Dict|lang ={{{1}}} |k
|nl= zie c
|en= see c
}}
k
:

Better:

{{User:DomoViridi/TempTest/Dict|lang ={{{1}}} |k|
nl= zie c|
en= see c|
}}