Skip to content

Commit b9cf6c7

Browse files
authored
fix(ui): Where query selectors for checkboxes are now translated (#7309)
Fixes #7204
1 parent f2b3305 commit b9cf6c7

File tree

1 file changed

+3
-1
lines changed
  • packages/ui/src/elements/WhereBuilder/Condition

1 file changed

+3
-1
lines changed

packages/ui/src/elements/WhereBuilder/Condition/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import type { Option } from '../../ReactSelect/index.js'
4343

4444
import { RenderCustomClientComponent } from '../../../elements/RenderCustomClientComponent/index.js'
4545
import { useDebounce } from '../../../hooks/useDebounce.js'
46+
import { useTranslation } from '../../../providers/Translation/index.js'
4647
import { Button } from '../../Button/index.js'
4748
import { ReactSelect } from '../../ReactSelect/index.js'
4849
import { DateField } from './Date/index.js'
@@ -78,6 +79,7 @@ export const Condition: React.FC<Props> = (props) => {
7879
const [internalField, setInternalField] = useState<FieldCondition>(() =>
7980
fields.find((field) => fieldName === field.value),
8081
)
82+
const { t } = useTranslation()
8183
const [internalOperatorOption, setInternalOperatorOption] = useState<Operator>(operator)
8284
const [internalQueryValue, setInternalQueryValue] = useState<string>(initialValue)
8385

@@ -116,7 +118,7 @@ export const Condition: React.FC<Props> = (props) => {
116118

117119
let valueOptions
118120
if (booleanSelect) {
119-
valueOptions = ['true', 'false']
121+
valueOptions = [t('general:true'), t('general:false')]
120122
} else if (internalField?.props && 'options' in internalField.props) {
121123
valueOptions = internalField.props.options
122124
}

0 commit comments

Comments
 (0)