Module:Msg/keywords/doc

Revision as of 17:07, 31 August 2025 by Admin (talk | contribs) (Created page with "== 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: <pre> return { ["pokehero-keywords-attacking_type"] = { en = "Attacking Type", fr = "Type Offensif" }, ["pokehero-keywords-defending_type"] = { en = "Defending Type", fr = "Type Défensif" } } </pre> * Keys should follow the pattern `pokehero-keywords-<name...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Msg/keywords

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`.