From 4b6cede3135dfe8caf70dff4717c2fbbd242beb0 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sun, 15 Dec 2024 16:54:21 +0900 Subject: [PATCH] remove frontend workaround --- src/apis/language.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/apis/language.ts b/src/apis/language.ts index 1f07f8f..1e6559a 100644 --- a/src/apis/language.ts +++ b/src/apis/language.ts @@ -3,7 +3,6 @@ */ import { request } from '.'; import { AxiosRequestConfig } from 'axios'; -import { getIntl } from '@/locales'; import { toLowerCamelCase } from '@/utils'; export interface APILanguage { @@ -31,13 +30,6 @@ async function getLanguages({ configs = {} } = {} as GetLanguagesData) { ...configs, }); res.data = res.data.map((item) => toLowerCamelCase(item)); - const intl = getIntl(); - if (intl.locale === 'en') { - res.data.forEach((item) => { - // workaround server's corrupted data - item.i18nName = item.enName; - }); - } return res; }