fix: update model backend not show
This commit is contained in:
+17
-22
@@ -1,23 +1,18 @@
|
||||
import apikeys from './en-US/apikeys';
|
||||
import common from './en-US/common';
|
||||
import dashboard from './en-US/dashboard';
|
||||
import menu from './en-US/menu';
|
||||
import models from './en-US/models';
|
||||
import playground from './en-US/playground';
|
||||
import resources from './en-US/resources';
|
||||
import shortcuts from './en-US/shortcuts';
|
||||
import usage from './en-US/usage';
|
||||
import users from './en-US/users';
|
||||
/**
|
||||
* @description The directory name used in require.context must match the language configuration names defined in lang-config-map.ts.
|
||||
* @example Directories like 'en-US' or 'zh-CN' should correspond exactly to the configuration names in lang-config-map.ts.
|
||||
*/
|
||||
|
||||
export default {
|
||||
...common,
|
||||
...menu,
|
||||
...models,
|
||||
...playground,
|
||||
...resources,
|
||||
...apikeys,
|
||||
...users,
|
||||
...dashboard,
|
||||
...usage,
|
||||
...shortcuts
|
||||
};
|
||||
const requireContext = require.context(`./en-US`, false, /\.ts$/);
|
||||
|
||||
let languageConfig: Record<string, string> = {};
|
||||
|
||||
requireContext.keys().forEach((fileName: any) => {
|
||||
const moduleConfig = requireContext(fileName).default;
|
||||
languageConfig = {
|
||||
...languageConfig,
|
||||
...moduleConfig
|
||||
};
|
||||
});
|
||||
|
||||
export default languageConfig;
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import IconFont from '@/components/icon-font';
|
||||
|
||||
/**
|
||||
* Language configuration map
|
||||
* Warning: The key of the map must be the same as the directory name in the locales directory
|
||||
* Do not modify the key of the map
|
||||
*
|
||||
*/
|
||||
const langConfigMap = {
|
||||
'ar-EG': {
|
||||
lang: 'ar-EG',
|
||||
|
||||
+14
-27
@@ -1,31 +1,18 @@
|
||||
import apikeys from './zh-CN/apikeys';
|
||||
import common from './zh-CN/common';
|
||||
import dashboard from './zh-CN/dashboard';
|
||||
import menu from './zh-CN/menu';
|
||||
import models from './zh-CN/models';
|
||||
import playground from './zh-CN/playground';
|
||||
import resources from './zh-CN/resources';
|
||||
import shortcuts from './zh-CN/shortcuts';
|
||||
import usage from './zh-CN/usage';
|
||||
import users from './zh-CN/users';
|
||||
/**
|
||||
* @description The directory name used in require.context must match the language configuration names defined in lang-config-map.ts.
|
||||
* @example Directories like 'en-US' or 'zh-CN' should correspond exactly to the configuration names in lang-config-map.ts.
|
||||
*/
|
||||
|
||||
// import { LangConfigType } from './lang-config-map';
|
||||
const requireContext = require.context(`./zh-CN`, false, /\.ts$/);
|
||||
|
||||
// const DIR: LangConfigType = 'zh-CN';
|
||||
let languageConfig: Record<string, string> = {};
|
||||
|
||||
// const langConfig = require.context(`./`, true, /\.ts$/);
|
||||
requireContext.keys().forEach((fileName: any) => {
|
||||
const moduleConfig = requireContext(fileName).default;
|
||||
languageConfig = {
|
||||
...languageConfig,
|
||||
...moduleConfig
|
||||
};
|
||||
});
|
||||
|
||||
// console.log('langConfig====', langConfig);
|
||||
|
||||
export default {
|
||||
...common,
|
||||
...menu,
|
||||
...models,
|
||||
...playground,
|
||||
...resources,
|
||||
...apikeys,
|
||||
...users,
|
||||
...dashboard,
|
||||
...usage,
|
||||
...shortcuts
|
||||
};
|
||||
export default languageConfig;
|
||||
|
||||
Reference in New Issue
Block a user