Difference between revisions of "Template:L10n/row"
m (added per cell CSS classes for more in-depth styling) |
m (added ref parameter handling (workaround for references not being supported in notes property) |
||
Line 4: | Line 4: | ||
<td class="table-l10n-body-rating-audio">{{Tickcross-na|{{#if: {{{audio|}}} | {{{audio}}} | unknown }}|{{{lang}}} audio}}</td> | <td class="table-l10n-body-rating-audio">{{Tickcross-na|{{#if: {{{audio|}}} | {{{audio}}} | unknown }}|{{{lang}}} audio}}</td> | ||
<td class="table-l10n-body-rating-sub">{{Tickcross-na|{{#if: {{{subs|}}} | {{{subs}}} | unknown }}|{{{lang}}} subtitles}}</td> | <td class="table-l10n-body-rating-sub">{{Tickcross-na|{{#if: {{{subs|}}} | {{{subs}}} | unknown }}|{{{lang}}} subtitles}}</td> | ||
− | <td class="table-l10n-body-notes">{{{notes|}}}{{#switch:{{lc:{{{fan|}}}}} | yes | true = [[{{{lang}}} status::fan| ]]{{#if:{{{notes|}}}||[[Category:Invalid template usage (Audio settings)]]}} | #default = {{#if:{{{fannotes|}}}|<br/>{{{fannotes|}}}[[{{{lang}}} status::fan| ]][[Category:Invalid template usage (Audio settings)]] | [[{{{lang}}} status::official| ]] }} }}</td> | + | <td class="table-l10n-body-notes">{{{notes|}}}{{{ref|}}}{{#switch:{{lc:{{{fan|}}}}} | yes | true = [[{{{lang}}} status::fan| ]]{{#if:{{{notes|}}}||[[Category:Invalid template usage (Audio settings)]]}} | #default = {{#if:{{{fannotes|}}}|<br/>{{{fannotes|}}}[[{{{lang}}} status::fan| ]][[Category:Invalid template usage (Audio settings)]] | [[{{{lang}}} status::official| ]] }} }}</td> |
</tr>{{#set:|{{{lang}}} notes={{{notes|}}}}}[[{{{lang}}} notes::{{{fannotes|}}}| ]]</includeonly><noinclude>{{Documentation}}</noinclude> | </tr>{{#set:|{{{lang}}} notes={{{notes|}}}}}[[{{{lang}}} notes::{{{fannotes|}}}| ]]</includeonly><noinclude>{{Documentation}}</noinclude> |
Revision as of 15:55, 11 March 2019
This template is what construct each row and cell used when calling Template:L10n/switch. While Template:L10n/switch filters out unsupported from supported languages, this row is the one that does the actual magic and building of each row, based on the parameters sent to it by Template:L10n/switch.
It's important to understand and remember that Template:L10n/switch also performs variable/parameter translation, so the variables used in the code of Template:L10n/row is not or might not be the same that is visible to the end-user who sees the Template:L10n/switch call. Check the code for Template:L10n/switch out to learn and understand what variables/parameters translations are performed before Template:L10n/row is called.
Current template issues:
- References in the notes field break the table and/or property assignment.