panhong d63bf0bda5
添加 react 编写的新版 WEBUI (#3417)
* feat:提交前端代码

* feat:提交logo样式切换

* feat:替换avatar、部分位置icon、chatchat相关说明、git链接、Wiki链接、关于、设置、反馈与建议等功能,关闭lobehub自检更新功能

* fix:移除多余代码

---------

Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
2024-03-19 14:30:26 +08:00

19 lines
841 B
TypeScript

import { readdirSync } from 'node:fs';
import { resolve } from 'node:path';
import i18nConfig from '../../.i18nrc';
export const root = resolve(__dirname, '../..');
export const localesDir = resolve(root, i18nConfig.output);
export const localeDir = (locale: string) => resolve(localesDir, locale);
export const localeDirJsonList = (locale: string) =>
readdirSync(localeDir(locale)).filter((name) => name.includes('.json'));
export const srcLocalesDir = resolve(root, './src/locales');
export const entryLocaleJsonFilepath = (file: string) =>
resolve(localesDir, i18nConfig.entryLocale, file);
export const outputLocaleJsonFilepath = (locale: string, file: string) =>
resolve(localesDir, locale, file);
export const srcDefaultLocales = resolve(root, srcLocalesDir, 'default');
export { default as i18nConfig } from '../../.i18nrc';