Skip to content

[2.x] fix: nest the gambit translations under the extension namespace - #167

Merged
imorland merged 1 commit into
2.xfrom
im/gambit-locale-namespace
Aug 3, 2026
Merged

[2.x] fix: nest the gambit translations under the extension namespace#167
imorland merged 1 commit into
2.xfrom
im/gambit-locale-namespace

Conversation

@imorland

@imorland imorland commented Aug 3, 2026

Copy link
Copy Markdown
Member

The is: line in the search modal listed a raw translation key instead of trending:

is: hidden, unread, following, ignoring, solved, private, locked, fof-gamification.lib.gambits.t…

lib sat at the root of resources/locale/en.yml rather than under fof-gamification, giving the file two top-level namespaces. TrendingGambit asks for fof-gamification.lib.gambits.trending.key, the translator only had lib.gambits.trending.key, and since the gambit resolves its key in raw mode the miss returned the key itself for display.

The block has been at the wrong level since #131, so the gambit has never shown a usable label on 2.x — #165 renamed hot to trending and carried the indentation with it.

Verified by parsing the file with the same YAML component Flarum uses: one top-level key afterwards, and fof-gamification.lib.gambits.trending.key resolving to trending.

Not fixed here, and not caused by this: the row still clips rather than wraps when the joined is: values outgrow the modal. That is core styling (.GambitsAutocomplete-gambit is a flex row with no min-width: 0 and no wrapping on the value), and it gets worse as more extensions register boolean gambits. Being handled separately in core.

The `lib` key sat at the root of the locale file rather than under
`fof-gamification`, so the gambit asked for
`fof-gamification.lib.gambits.trending.key` and the translator only had
`lib.gambits.trending.key` to offer it. Nothing matched, and because the
gambit looks the key up in raw mode the untranslated key itself was
returned — so the search modal listed the literal
`fof-gamification.lib.gambits.t...` among its `is:` options instead of
`trending`.

The block has been misplaced since the 2.0 update, so the gambit has
never shown a usable label on this branch; renaming `hot` to `trending`
carried the indentation along with it.
@imorland
imorland requested a review from a team as a code owner August 3, 2026 19:09
@imorland imorland changed the title fix: nest the gambit translations under the extension namespace [2.x] fix: nest the gambit translations under the extension namespace Aug 3, 2026
@imorland
imorland merged commit 4048ed9 into 2.x Aug 3, 2026
20 checks passed
@imorland
imorland deleted the im/gambit-locale-namespace branch August 3, 2026 19:11
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