fix: i18n tsc

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-13 13:01:02 +01:00
parent 21c4f44d4e
commit 2bcd88cfd1
60 changed files with 1359 additions and 884 deletions

View File

@@ -33,7 +33,7 @@ const splitOperators: {
];
export default function Shuffle() {
const { t } = useTranslation();
const { t } = useTranslation('list');
const [input, setInput] = useState<string>('');
const [result, setResult] = useState<string>('');
const compute = (optionsValues: typeof initialValues, input: any) => {
@@ -53,24 +53,24 @@ export default function Shuffle() {
return (
<ToolContent
title={t('list:shuffle.title')}
title={t('shuffle.title')}
initialValues={initialValues}
compute={compute}
input={input}
setInput={setInput}
inputComponent={
<ToolTextInput
title={t('list:shuffle.inputTitle')}
title={t('shuffle.inputTitle')}
value={input}
onChange={setInput}
/>
}
resultComponent={
<ToolTextResult title={t('list:shuffle.resultTitle')} value={result} />
<ToolTextResult title={t('shuffle.resultTitle')} value={result} />
}
getGroups={({ values, updateField }) => [
{
title: t('list:shuffle.inputListSeparator'),
title: t('shuffle.inputListSeparator'),
component: (
<Box>
{splitOperators.map(({ title, description, type }) => (
@@ -83,7 +83,7 @@ export default function Shuffle() {
/>
))}
<TextFieldWithDesc
description={t('list:shuffle.delimiterDescription')}
description={t('shuffle.delimiterDescription')}
value={values.splitSeparator}
onOwnChange={(val) => updateField('splitSeparator', val)}
/>
@@ -91,11 +91,11 @@ export default function Shuffle() {
)
},
{
title: t('list:shuffle.shuffledListLength'),
title: t('shuffle.shuffledListLength'),
component: (
<Box>
<TextFieldWithDesc
description={t('list:shuffle.outputLengthDescription')}
description={t('shuffle.outputLengthDescription')}
value={values.length}
onOwnChange={(val) => updateField('length', val)}
/>
@@ -103,13 +103,13 @@ export default function Shuffle() {
)
},
{
title: t('list:shuffle.shuffledListSeparator'),
title: t('shuffle.shuffledListSeparator'),
component: (
<Box>
<TextFieldWithDesc
value={values.joinSeparator}
onOwnChange={(value) => updateField('joinSeparator', value)}
description={t('list:shuffle.joinSeparatorDescription')}
description={t('shuffle.joinSeparatorDescription')}
/>
</Box>
)