fix: update model backend not show
This commit is contained in:
+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