I18n Translations (#2267)

* rebase

* i18n-1

* add error info i18n

* fix

* fix

* refactor: 删除error.json

* delete useI18n
This commit is contained in:
papapatrick
2024-08-05 18:42:21 +08:00
committed by GitHub
parent 025d405fe2
commit 10dcdb5491
107 changed files with 1128 additions and 416 deletions

View File

@@ -1,25 +1,27 @@
import { ErrType } from '../errorCode';
import { i18nT } from '../../../../web/i18n/utils';
/* dataset: 506000 */
export enum OpenApiErrEnum {
unExist = 'openapiUnExist',
unAuth = 'openapiUnAuth',
exceedLimit = 'openapiExceedLimit'
}
const errList = [
{
statusText: OpenApiErrEnum.unExist,
message: 'Api Key 不存在'
message: i18nT('common:code_error.openapi_error.api_key_not_exist')
},
{
statusText: OpenApiErrEnum.unAuth,
message: '无权操作该 Api Key'
message: i18nT('common:code_error.openapi_error.un_auth')
},
{
statusText: OpenApiErrEnum.exceedLimit,
message: '最多 10 组 API 密钥'
message: i18nT('common:code_error.openapi_error.exceed_limit')
}
];
export default errList.reduce((acc, cur, index) => {
return {
...acc,