Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(localize): Correct merging of local and remote language lists

haitaoo4b1f985be788
diff --git a/ui/src/components/SchemaForm/index.tsx b/ui/src/components/SchemaForm/index.tsx
index 6c245d24..0dc5e209 100644
--- a/ui/src/components/SchemaForm/index.tsx
+++ b/ui/src/components/SchemaForm/index.tsx
@@ -348,7 +348,7 @@ const SchemaForm: ForwardRefRenderFunction<IRef, IProps> = (
useImperativeHandle(ref, () => ({
validator,
}));
- console.log('uiSchema: ', uiSchema);
+
return (
<Form noValidate onSubmit={handleSubmit}>
{keys.map((key) => {
diff --git a/ui/src/utils/localize.ts b/ui/src/utils/localize.ts
index ada45a2f..775896e8 100644
--- a/ui/src/utils/localize.ts
+++ b/ui/src/utils/localize.ts
@@ -24,7 +24,7 @@ export const loadLanguageOptions = async (forAdmin = false) => {
if (process.env.NODE_ENV === 'development') {
const { default: optConf } = await import('@i18n/i18n.yaml');
optConf?.language_options.forEach((opt) => {
- if (!languageOptions.find((_) => opt.label === _.label)) {
+ if (!languageOptions.find((_) => opt.value === _.value)) {
languageOptions.push(opt);
}
});