2023-07-15 19:22:16 +08:00
|
|
|
const { defineConfig } = require('@lobehub/i18n-cli');
|
2023-07-15 18:22:47 +08:00
|
|
|
|
2023-07-15 19:22:16 +08:00
|
|
|
module.exports = defineConfig({
|
2023-12-22 14:59:19 +08:00
|
|
|
entry: 'locales/zh-CN',
|
|
|
|
|
entryLocale: 'zh-CN',
|
2023-07-18 09:14:13 +08:00
|
|
|
output: 'locales',
|
2023-12-16 14:56:06 +08:00
|
|
|
outputLocales: [
|
2024-01-15 18:27:24 +02:00
|
|
|
'ar',
|
2024-03-28 19:55:45 +02:00
|
|
|
'bg-BG',
|
2023-12-22 14:59:19 +08:00
|
|
|
'zh-TW',
|
|
|
|
|
'en-US',
|
|
|
|
|
'ru-RU',
|
|
|
|
|
'ja-JP',
|
|
|
|
|
'ko-KR',
|
|
|
|
|
'fr-FR',
|
|
|
|
|
'tr-TR',
|
|
|
|
|
'es-ES',
|
|
|
|
|
'pt-BR',
|
|
|
|
|
'de-DE',
|
2023-12-22 16:28:22 +08:00
|
|
|
'it-IT',
|
|
|
|
|
'nl-NL',
|
|
|
|
|
'pl-PL',
|
2024-01-03 01:00:57 -08:00
|
|
|
'vi-VN',
|
2024-10-30 23:34:17 +08:00
|
|
|
'fa-IR',
|
2023-12-16 14:56:06 +08:00
|
|
|
],
|
2023-07-15 18:22:47 +08:00
|
|
|
temperature: 0,
|
2025-06-10 13:38:53 +08:00
|
|
|
saveImmediately: true,
|
2025-10-07 13:15:56 +02:00
|
|
|
modelName: 'chatgpt-4o-latest',
|
2023-12-13 17:42:26 +08:00
|
|
|
experimental: {
|
|
|
|
|
jsonMode: true,
|
|
|
|
|
},
|
|
|
|
|
markdown: {
|
2024-11-26 14:48:06 +08:00
|
|
|
reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
|
2024-04-11 00:28:48 +08:00
|
|
|
entry: ['./README.zh-CN.md', './contributing/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
|
2023-12-14 17:17:43 +08:00
|
|
|
entryLocale: 'zh-CN',
|
|
|
|
|
outputLocales: ['en-US'],
|
2024-11-26 14:48:06 +08:00
|
|
|
includeMatter: true,
|
|
|
|
|
exclude: [
|
|
|
|
|
'./src/**/*',
|
|
|
|
|
'./contributing/_Sidebar.md',
|
|
|
|
|
'./contributing/_Footer.md',
|
|
|
|
|
'./contributing/Home.md',
|
|
|
|
|
],
|
2024-04-11 00:28:48 +08:00
|
|
|
outputExtensions: (locale, { filePath }) => {
|
|
|
|
|
if (filePath.includes('.mdx')) {
|
|
|
|
|
if (locale === 'en-US') return '.mdx';
|
|
|
|
|
return `.${locale}.mdx`;
|
|
|
|
|
} else {
|
|
|
|
|
if (locale === 'en-US') return '.md';
|
|
|
|
|
return `.${locale}.md`;
|
|
|
|
|
}
|
2023-12-13 17:42:26 +08:00
|
|
|
},
|
|
|
|
|
},
|
2023-07-15 19:22:16 +08:00
|
|
|
});
|