Jump to content

Module:Msg/keywords

From PokeHero Official Wiki
Revision as of 14:30, 5 September 2025 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Module:Msg/keywords

This submodule contains translations for diverse keywords used in the PokeHero wiki.

Structure

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

return {
    ["pokehero-keywords-attacking_type"]    = { en = "Attacking Type", fr = "Type Offensif" },
    ["pokehero-keywords-defending_type"]    = { en = "Defending Type", fr = "Type Défensif" }
}
  • Keys should follow the pattern pokehero-keywords-<name> for consistency.
  • Languages use their ISO codes (en, fr, etc.).
  • Add new keywords by adding new entries to this table.

Usage

Access the keywords table via Module:Msg:

{{#invoke:Msg|msg|keywords|attacking_type}}

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-keywords-attacking_type"]    = { en = "Attacking Type", fr = "Type Offensif" },
    ["pokehero-keywords-defending_type"]    = { en = "Defending Type", fr = "Type Défensif" },
    ["pokehero-keywords-physical"]    = { en = "Physical", fr = "Physique" },
    ["pokehero-keywords-special"]    = { en = "Special", fr = "Spécial" },
    ["pokehero-keywords-status"]    = { en = "Status", fr = "Statut" }
}