Template:HeroStreetBrawlItems/doc: Difference between revisions

Vergir (talk | contribs)
Remove Documentation subpage template (not present on this wiki) (with help from vergir-bot LLM)
Document the translation keys used by the template (with help from vergir-bot LLM)
 
Line 25: Line 25:
* Legendary (Tier 5) cards omit the redundant tier badge, and all cards render in low-graphics mode to keep these card-heavy pages responsive.
* Legendary (Tier 5) cards omit the redundant tier badge, and all cards render in low-graphics mode to keep these card-heavy pages responsive.
* Styling comes from [[Template:HeroStreetBrawlItems/styles.css]], loaded automatically.
* Styling comes from [[Template:HeroStreetBrawlItems/styles.css]], loaded automatically.
== Localization ==
The template carries no hardcoded English. Every visible string is looked up at render time, and the language is taken from the page title suffix, so <code><nowiki>{{HeroStreetBrawlItems|Abrams}}</nowiki></code> on ''Abrams/ru'' renders in Russian with no extra parameters. [[Module:StreetBrawlItems]] itself holds no display text — all labels are passed in by this template.
The hero name in the intro and in the counter note goes through <code><nowiki>{{HeroIcon|…|no-file=true|no-link=true}}</nowiki></code>, which yields the localized hero name with no icon and no self-link.
The Legendary tier label reuses Valve's own string via <code><nowiki>{{#invoke:Lang|get_string|Citadel_ItemDraft_Legendary}}</nowiki></code>, so it is already translated everywhere. The remaining strings live in [[Data:Dictionary]]:
{| class="wikitable"
! Key !! English !! Notes
|-
| <code>HeroStreetBrawlItemsIntro</code> || ''(intro paragraph)'' || <code><nowiki>{{{1}}}</nowiki></code> is the hero name. Contains a link to [[Street Brawl]]; translations should point at the localized page.
|-
| <code>HeroStreetBrawlItemsHighChance</code> || High chance || Column heading
|-
| <code>HeroStreetBrawlItemsAverageChance</code> || Average chance || Column heading
|-
| <code>HeroStreetBrawlItemsLowChance</code> || Low chance || Column heading
|-
| <code>HeroStreetBrawlItemsTier</code> || Tier <nowiki>{{{1}}}</nowiki> || <code><nowiki>{{{1}}}</nowiki></code> is the tier number 1–4; word order may be changed freely
|-
| <code>HeroStreetBrawlItemsCounterHeading</code> || Counter items || Section heading
|-
| <code>HeroStreetBrawlItemsCounterNote</code> || ''(counter note)'' || <code><nowiki>{{{1}}}</nowiki></code> is the hero name
|-
| <code>HeroStreetBrawlItemsShowAll</code> || Show all items || Expand link; keep it short
|-
| <code>HeroStreetBrawlItemsHide</code> || Hide || Collapse link; keep it short
|}
Only English values exist so far. Until a language is filled in, that language falls back to English and the string is tagged with {{tl|NeedsTranslationTooltip}}.


<includeonly><!-- Categories for the template itself go below this line -->
<includeonly><!-- Categories for the template itself go below this line -->
</includeonly>
</includeonly>