Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Template:L10n/row"

From PCGamingWiki, the wiki about fixing PC games
(fixed language status handling for Cargo)
(removed Semantic MediaWiki tagging (migrated to Cargo))
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<includeonly><tr class="template-infotable-body table-l10n-body-row">
 
<includeonly><tr class="template-infotable-body table-l10n-body-row">
<th scope="row" class="table-l10n-body-parameter">[[Supported language::{{{lang}}}| ]]{{#switch:{{{lang|}}}
+
<th scope="row" class="table-l10n-body-parameter">{{#switch:{{{lang|}}}
 
|Persian={{abbr|Persian|Also known as Farsi}}
 
|Persian={{abbr|Persian|Also known as Farsi}}
 
|Latin American Spanish={{abbr|Latin American Spanish|May be listed as Mexican Spanish or require OS language setting (see notes).}}
 
|Latin American Spanish={{abbr|Latin American Spanish|May be listed as Mexican Spanish or require OS language setting (see notes).}}
 
|#default={{{lang|}}}
 
|#default={{{lang|}}}
 
}}</th>
 
}}</th>
<td class="table-l10n-body-rating-ui">{{Tickcross|{{{ui}}}|{{{lang}}} interface|{{{notes|}}}}}</td>
+
<td class="table-l10n-body-rating-ui">{{Tickcross|{{{ui}}}||{{{notes|}}}}}</td>
<td class="table-l10n-body-rating-audio">{{Tickcross-na-nr|{{{audio}}}|{{{lang}}} audio|{{{notes|}}}}}</td>
+
<td class="table-l10n-body-rating-audio">{{Tickcross-na-nr|{{{audio}}}||{{{notes|}}}}}</td>
<td class="table-l10n-body-rating-sub">{{Tickcross-na-nr|{{{subs}}}|{{{lang}}} subtitles|{{{notes|}}}}}</td>
+
<td class="table-l10n-body-rating-sub">{{Tickcross-na-nr|{{{subs}}}||{{{notes|}}}}}</td>
<td class="table-l10n-body-notes">{{{notes|}}}{{{ref|}}}{{#if:{{{fan|}}}|{{#switch:{{{fan|}}} | false = [[{{{lang}}} status::official| ]]{{#vardefine:lang status|official}} | true = [[{{{lang}}} status::fan| ]]{{#vardefine:lang status|fan}}{{#if:{{{notes|}}}||''Fan translation. Details missing—please {{edit|edit this page}} ''and add it.''[[Category:Invalid template usage (Localizations)]]}} | #default = <div title="Error: fan translation status '{{{fan|}}}' not recognised. Supported values for fan status (case sensitive): true, false, or blank" class="svg-icon svg-25 tickcross-error"></div>[[{{{lang}}} status::official| ]]{{#vardefine:lang status|official}}[[Category:Invalid template usage (Localizations)]]}}|[[{{{lang}}} status::official| ]]{{#vardefine:lang status|official}}}}</td>
+
<td class="table-l10n-body-notes">{{{notes|}}}{{{ref|}}}{{#if:{{{fan|}}}|{{#switch:{{{fan|}}} | false = {{#vardefine:lang status|official}} | true = {{#vardefine:lang status|fan}}{{#if:{{{notes|}}}||''Fan translation. Details missing—please {{edit|edit this page}} ''and add it.''[[Category:Invalid template usage (Localizations)]]}} | #default = <div title="Error: fan translation status '{{{fan|}}}' not recognised. Supported values for fan status (case sensitive): true, false, or blank" class="svg-icon svg-25 tickcross-error"></div>{{#vardefine:lang status|official}}[[Category:Invalid template usage (Localizations)]]}}|{{#vardefine:lang status|official}}}}</td>
</tr>{{#set:|{{{lang}}} notes={{{notes|}}}}}</includeonly><noinclude>{{#cargo_declare:
+
</tr></includeonly><noinclude>{{#cargo_declare:
 
_table=L10n
 
_table=L10n
 
|Language=String
 
|Language=String

Revision as of 10:17, 18 October 2021

This template defines the table "L10n". View table.

Documentation for the above template (sometimes hidden from view).

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:

  1. References in the notes field break the table and/or property assignment.