Module:Msg/types

Revision as of 15:21, 31 August 2025 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Module:Msg/types

This submodule contains translations for all Pokehero types used in the PokeHero wiki.

Structure

The table maps message keys to translations for each language. Example:

return {
    ["pokehero-types-normal"]    = { en = "Normal", fr = "Normal" },
    ["pokehero-types-fighting"]  = { en = "Fighting", fr = "Combat" },
    ["pokehero-types-energy"]    = { en = "Energy", fr = "Énergie" }
}
  • Keys should follow the pattern pokehero-types-<name> for consistency.
  • Languages use their ISO codes (en, fr, etc.).
  • Add new types by adding new entries to this table.

Usage

Access the types table via `Module:Msg`:

{{#invoke:Msg|msg|types|energy}}

This automatically returns the correct translation for the page language or falls back to English if necessary.

Notes

  • This table is only loaded when requested to minimize memory usage.
  • Missing keys or translations are handled gracefully by `Module:Msg`.

return {
    ["pokehero-types-normal"]    = { en = "Normal", fr = "Normal" },
    ["pokehero-types-fighting"]  = { en = "Fighting", fr = "Combat" },
    ["pokehero-types-energy"]    = { en = "Energy", fr = "Énergie" },
    ["pokehero-types-element"]   = { en = "Element", fr = "Élément" },
    ["pokehero-types-mental"]    = { en = "Mental", fr = "Mental" },
    ["pokehero-types-ninja"]     = { en = "Ninja", fr = "Ninja" },
    ["pokehero-types-sword"]     = { en = "Sword", fr = "Épéiste" },
    ["pokehero-types-demon"]     = { en = "Demon", fr = "Démon" },
    ["pokehero-types-glitch"]    = { en = "Glitch", fr = "Glitch" },
    ["pokehero-types-god"]       = { en = "God", fr = "Dieu" }
}