Skip to content

Commit

Permalink
Merge pull request #31 from jokester/yagni-i18n-minor-changes
Browse files Browse the repository at this point in the history
remove frontend i18n workaround
  • Loading branch information
jokester authored Dec 15, 2024
2 parents c5ff7d8 + 4b6cede commit 3f6b7f9
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/apis/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { request } from '.';
import { AxiosRequestConfig } from 'axios';
import { getIntl } from '@/locales';
import { toLowerCamelCase } from '@/utils';

export interface APILanguage {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3f6b7f9

Please sign in to comment.