diff --git a/.i18nrc.js b/.i18nrc.js index 319c6e8..3ea67bf 100644 --- a/.i18nrc.js +++ b/.i18nrc.js @@ -10,7 +10,17 @@ module.exports = defineConfig({ entryLocale: 'en_US', output: 'locales', outputLocales: outputLocales, - splitToken: 2500, temperature: 0, - modelName: 'gpt-3.5-turbo', + modelName: 'gpt-3.5-turbo-1106', + experimental: { + jsonMode: true, + }, + markdown: { + entry: ['./README.md'], + outputLocales: ['zh_CN'], + outputExtensions: (locale) => { + if (locale === 'en_US') return '.md'; + return `.${locale.replace('_', '-')}.md`; + }, + }, }); diff --git a/src/components/index.ts b/src/components/index.ts index 6895b46..b80ca3f 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -3,5 +3,4 @@ export { default as Loading } from './Loading'; export { default as Logo, type LogoProps } from './Logo'; export { default as CustomLogo, type CustomLogoProps } from './Logo/CustomLogo'; export { default as PromptEditor } from './PromptEditor'; -export { default as Setting, type SettingProps } from './Setting'; export { default as VersionTag } from './VersionTag'; diff --git a/src/features/Header/Actions.tsx b/src/features/Header/Actions.tsx index 81397b3..ca7c6dc 100644 --- a/src/features/Header/Actions.tsx +++ b/src/features/Header/Actions.tsx @@ -7,7 +7,8 @@ import { memo, useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { shallow } from 'zustand/shallow'; -import { Giscus, Setting } from '@/components'; +import { Giscus } from '@/components'; +import Setting from '@/features/Setting'; import { selectors, useAppStore } from '@/store'; const CivitaiLogo: LucideIcon | any = ({ size }: any) => ( diff --git a/src/components/Setting/SettingForm.tsx b/src/features/Setting/SettingForm.tsx similarity index 100% rename from src/components/Setting/SettingForm.tsx rename to src/features/Setting/SettingForm.tsx diff --git a/src/components/Setting/data.ts b/src/features/Setting/data.ts similarity index 100% rename from src/components/Setting/data.ts rename to src/features/Setting/data.ts diff --git a/src/components/Setting/index.tsx b/src/features/Setting/index.tsx similarity index 95% rename from src/components/Setting/index.tsx rename to src/features/Setting/index.tsx index d74da47..5e15ae3 100644 --- a/src/components/Setting/index.tsx +++ b/src/features/Setting/index.tsx @@ -5,9 +5,9 @@ import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { Flexbox } from 'react-layout-kit'; -import { homepage } from '@/../package.json'; import VersionTag from '@/components/VersionTag'; +import { homepage } from '../../../package.json'; import SettingForm from './SettingForm'; export interface SettingProps { diff --git a/src/components/Setting/style.ts b/src/features/Setting/style.ts similarity index 100% rename from src/components/Setting/style.ts rename to src/features/Setting/style.ts diff --git a/src/store/initialState.ts b/src/store/initialState.ts index a8aa2c1..db6deee 100644 --- a/src/store/initialState.ts +++ b/src/store/initialState.ts @@ -1,6 +1,6 @@ import type { SelectProps } from 'antd'; -import type { NeutralColor, PrimaryColor } from '@/components/Setting/data'; +import type { NeutralColor, PrimaryColor } from '@/features/Setting/data'; import { DEFAULT_LOCALE_OPTIONS, DEFAULT_VERSION } from '@/store/api'; import type { I18n } from '@/types';