1
0
Fork 0

fix(react): Display doNotTranslate list option values (#358)

When testing with the repository studio, it fixes the issue with Breanna (the only design that uses `doNotTranslate` list options), and I didn't see any regressions with other designs like Hi.

Fixes #347

Co-authored-by: Benjamin Fan <ben-git@swinglonga.com>
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/358
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
Co-committed-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
This commit is contained in:
Benjamin Fan 2025-05-18 10:58:16 +00:00 committed by Joost De Cock
parent bdf8a40792
commit 5dc1cd98fb
2 changed files with 4 additions and 2 deletions

View file

@ -149,7 +149,9 @@ export const MenuListInput = ({
: 'tw:flex-col tw:items-start'
}`}
>
<div className="tw:font-semibold">{config.choiceTitles[entry]}</div>
<div className="tw:font-semibold">
{config.doNotTranslate ? entry : config.choiceTitles[entry]}
</div>
{compact || !config.choiceDescriptions ? null : (
<div
className={`${config.dense ? 'tw:text-sm tw:leading-5 tw:py-1' : 'tw:text-base'} tw:font-normal`}

View file

@ -79,7 +79,7 @@ export const MenuListValue = ({ current, config, changed }) => {
else if (val) key = <BoolYesIcon />
else key = <BoolNoIcon />
const translated = config.doNotTranslate || key
const translated = config.doNotTranslate ? val : key
return <MenuHighlightValue changed={changed}>{translated}</MenuHighlightValue>
}