Skip to content

docs: document gambit keyword localization and canonicalKey() pattern#524

Open
imorland wants to merge 1 commit intomainfrom
im/gambit-localization-docs
Open

docs: document gambit keyword localization and canonicalKey() pattern#524
imorland wants to merge 1 commit intomainfrom
im/gambit-localization-docs

Conversation

@imorland
Copy link
Copy Markdown
Member

Summary

Documents the gambit localization alias feature introduced in flarum/framework#4570.

  • Adds a "Localizing gambit keywords" section to search.md covering canonicalKey(), examples for both KeyValueGambit and BooleanGambit, toFilter() canonical value mapping, and a dedicated subsection for language pack maintainers with YAML locale examples.
  • Adds a callout to update-2_0.md flagging canonicalKey() as a required change for any extension whose gambit key() returns a translated string.
  • Adds a "Gambit Keywords" section to language-packs.md explaining gambit translation keys and linking to the full technical reference.

Test plan

  • Review rendered output — particularly the // highlight-start / // highlight-end markers in code blocks and the :::info admonition
  • Verify cross-links resolve: search#localizing-gambit-keywords, ./search#gambits

Adds a dedicated 'Localizing gambit keywords' section to search.md covering
how key() drives localized search tokens, the canonicalKey() English fallback,
examples for both KeyValueGambit and BooleanGambit, toFilter() canonical value
mapping, and a subsection for language pack maintainers.

Adds a brief note in update-2_0.md flagging canonicalKey() as a required change
for translated gambits. Adds a pointer in language-packs.md explaining gambit
keyword translation keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant