Skip to content
Snippets Groups Projects
Unverified Commit 8c0a6c5f authored by Murtaza Patrawala's avatar Murtaza Patrawala Committed by GitHub
Browse files

[FIX] Translations for App Select Settings not working (#23908)

parent c0b41208
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,22 @@ function AppSetting({ appSetting, onChange, value, ...props }) { ...@@ -46,6 +46,22 @@ function AppSetting({ appSetting, onChange, value, ...props }) {
[i18nDescription, tApp], [i18nDescription, tApp],
); );
let translatedValues;
if (values?.length) {
translatedValues = values.map((selectFieldEntry) => {
const { key, i18nLabel } = selectFieldEntry;
if (!i18nLabel) {
return selectFieldEntry;
}
return {
key,
i18nLabel: tApp(i18nLabel),
};
});
}
return ( return (
<MemoizedSetting <MemoizedSetting
type={type} type={type}
...@@ -54,7 +70,7 @@ function AppSetting({ appSetting, onChange, value, ...props }) { ...@@ -54,7 +70,7 @@ function AppSetting({ appSetting, onChange, value, ...props }) {
value={value} value={value}
onChangeValue={onChange} onChangeValue={onChange}
_id={id} _id={id}
values={values} values={translatedValues}
{...props} {...props}
/> />
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment