Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🌐 chore: translate non-English comments to English in desktop i18nWorkflow (#13604)

LobeHub Bot68762fc4ae1c
diff --git a/apps/desktop/scripts/i18nWorkflow/genDefaultLocale.ts b/apps/desktop/scripts/i18nWorkflow/genDefaultLocale.ts
index 2fecdf1613b..871e65d41d1 100644
--- a/apps/desktop/scripts/i18nWorkflow/genDefaultLocale.ts
+++ b/apps/desktop/scripts/i18nWorkflow/genDefaultLocale.ts
@@ -9,7 +9,7 @@ import { tagWhite, writeJSON } from './utils';
export const genDefaultLocale = () => {
consola.info(`默认语言为 ${i18nConfig.entryLocale}...`);
- // 确保入口语言目录存在
+ // Ensure entry locale directory exists
const entryLocaleDir = localeDir(i18nConfig.entryLocale);
if (!existsSync(entryLocaleDir)) {
mkdirSync(entryLocaleDir, { recursive: true });
@@ -23,7 +23,7 @@ export const genDefaultLocale = () => {
for (const [ns, value] of data) {
const filepath = entryLocaleJsonFilepath(`${ns}.json`);
- // 确保目录存在
+ // Ensure directory exists
const dir = dirname(filepath);
if (!existsSync(dir)) {
mkdirSync(dir, { recursive: true });
diff --git a/apps/desktop/scripts/i18nWorkflow/index.ts b/apps/desktop/scripts/i18nWorkflow/index.ts
index 5215bb00c7a..59fc75743dd 100644
--- a/apps/desktop/scripts/i18nWorkflow/index.ts
+++ b/apps/desktop/scripts/i18nWorkflow/index.ts
@@ -5,7 +5,7 @@ import { genDefaultLocale } from './genDefaultLocale';
import { genDiff } from './genDiff';
import { split } from './utils';
-// 确保所有语言目录存在
+// Ensure all locale directories exist
const ensureLocalesDirs = () => {
[i18nConfig.entryLocale, ...i18nConfig.outputLocales].forEach((locale) => {
const dir = localeDir(locale);
@@ -15,20 +15,20 @@ const ensureLocalesDirs = () => {
});
};
-// 运行工作流
+// Run workflow
const run = async () => {
- // 确保目录存在
+ // Ensure directories exist
ensureLocalesDirs();
- // 差异分析
+ // Diff analysis
split('差异分析');
genDiff();
- // 生成默认语言文件
+ // Generate default locale files
split('生成默认语言文件');
genDefaultLocale();
- // 生成国际化文件
+ // Generate i18n files
split('生成国际化文件');
};