Skip to content

Add localized default labels for TwoOptions - #65

Merged
brYch97 merged 2 commits into
TALXIS:masterfrom
tompivny:fix/two-options-default-labels
Aug 26, 2026
Merged

brYch97 merged 2 commits into
TALXIS:masterfrom
tompivny:fix/two-options-default-labels

Conversation

@tompivny

Copy link
Copy Markdown
Contributor

Problem

When column metadata carries no boolean option labels, TwoOptions fell back to hardcoded English 'Yes' / 'No', ignoring the user's language.

Change

  • New translations.ts wired through useControl
  • Options built once: metadata labels win, missing ones use the localized defaults.
  • Color branch gets the same options — before it rendered no labels at all with empty metadata.
  • Translations generic changed from any, so consumers can override.

@tompivny
tompivny requested a review from a team August 25, 2026 09:00
@brYch97

brYch97 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for the change, I would only prefer to use the labels object directly behind the || instead of merging it to the options array, otherwise lgtm.

Review feedback: keep the metadata options array untouched and put the
localized labels behind the || in the Toggle props.
@tompivny
tompivny force-pushed the fix/two-options-default-labels branch from e4c7beb to 87f5801 Compare August 26, 2026 06:32
@brYch97
brYch97 merged commit 5e9f69e into TALXIS:master Aug 26, 2026
1 check passed
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.

2 participants