User:DomoViridi/TempTest/Testcases/nl
(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.
Contents
- 1 Classic, with lang and default= for Dutch
- 1.1 Straight-up classic entry, calling English
- 1.2 Straight-up classic entry, calling Dutch
- 1.3 Straight-up classic entry, calling French
- 1.4 Straight-up classic entry, calling Spanish
- 1.5 Only English, calling English
- 1.6 Only English, calling Dutch
- 1.7 Only English, calling Spanish
- 1.8 Only Dutch, calling English
- 1.9 Only Dutch, calling Dutch
- 1.10 Only Dutch, calling Spanish
- 2 With lang parameter
- 2.1 Straight-up classic entry, calling English
- 2.2 Straight-up classic entry, calling Dutch
- 2.3 Straight-up classic entry, calling French
- 2.4 Straight-up classic entry, calling Spanish
- 2.5 Only English, calling English
- 2.6 Only English, calling Dutch
- 2.7 Only English, calling Spanish
- 2.8 Only Dutch, calling English
- 2.9 Only Dutch, calling Dutch
- 2.10 Only Dutch, calling Spanish
- 3 No lang parameter
- 4 Adding a language span
- 5 With 'full' parameter
- 6 Spacing check
- 7 The real template
- 8 Problem with unnamed word parameter
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>
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|
}}
- k