fix: i18n system overhaul and sidebar UI bugs

- Fix LanguageProvider: add RTL support (ar/fa), translation caching,
  prevent blank flash during load, browser language detection
- Fix detect-user-language: extend whitelist from 5 to all 15 languages
- Remove hardcoded initialLanguage="fr" from auth layout
- Complete fr.json translation (all sections translated from English)
- Add missing admin.ai keys to all 13 non-English locales
- Translate ai.autoLabels, ai.batchOrganization, memoryEcho sections
  for all locales
- Remove duplicate top-level autoLabels/batchOrganization from en.json
- Fix notebook creation: replace window.location.reload() with
  createNotebookOptimistic + router.refresh()
- Fix notebook name truncation in sidebar with min-w-0
- Remove redundant router.refresh() after note creation in page.tsx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-03-29 22:14:05 +02:00
parent 8bf56cd8cd
commit 8daf50ac3f
27 changed files with 1210 additions and 936 deletions

View File

@@ -63,7 +63,13 @@
"tagsGenerationProvider": "标签生成提供商",
"title": "AI 配置",
"updateFailed": "更新 AI 设置失败",
"updateSuccess": "AI 设置更新成功"
"updateSuccess": "AI 设置更新成功",
"bestValue": "最佳性价比",
"bestQuality": "最佳质量",
"providerOllamaOption": "🦙 Ollama (Local & Free)",
"providerOpenAIOption": "🤖 OpenAI (GPT-5, GPT-4)",
"providerCustomOption": "🔧 Custom OpenAI-Compatible",
"saved": "(已保存)"
},
"aiTest": {
"description": "测试您的 AI 提供商的标签生成和语义搜索嵌入",
@@ -153,34 +159,36 @@
"analyzing": "AI 分析中...",
"assistant": "AI 助手",
"autoLabels": {
"analyzing": "正在分析您的笔记以获取标签建议...",
"error": "获取标签建议失败",
"noLabelsSelected": "未选择标签",
"created": "成功创建 {count} 个标签",
"analyzing": "正在分析您的笔记...",
"title": "新标签建议",
"description": "我在\"{notebookName}\"{totalNotes} 条笔记)中检测到了重复主题。要为它们创建标签吗?",
"note": "条笔记",
"notes": "条笔记",
"typeContent": "输入内容以获取标签建议...",
"createNewLabel": "创建此新标签并添加",
"new": "(新)",
"create": "创建",
"createNewLabel": "Create this new label and add it",
"created": "{count} labels created successfully",
"creating": "正在创建标签...",
"description": "I've detected recurring themes in \"{notebookName}\" ({totalNotes} notes). Create labels for them?",
"error": "Failed to fetch label suggestions",
"new": "(新建)",
"noLabelsSelected": "No labels selected",
"note": "note",
"notes": "notes",
"title": "标签建议",
"typeContent": "Type content to get label suggestions..."
"notesCount": "{count} 条笔记",
"typeForSuggestions": "输入内容以获取标签建议..."
},
"batchOrganization": {
"analyzing": "Analyzing your notes...",
"apply": "Apply",
"applyFailed": "Failed to apply organization plan",
"applying": "Applying...",
"description": "AI将分析您的笔记并建议将它们组织到笔记本中。",
"error": "Failed to create organization plan",
"noNotebooks": "No notebooks available. Create notebooks first to organize your notes.",
"noNotesSelected": "No notes selected",
"noSuggestions": "AI could not find a good way to organize these notes.",
"selectAllIn": "Select all notes in {notebook}",
"selectNote": "Select note: {title}",
"success": "{count} notes moved successfully",
"title": "Organize with AI"
"title": "使用 AI 整理",
"description": "AI 将分析您的笔记并建议将它们整理到笔记本中。",
"analyzing": "正在分析您的笔记...",
"noNotebooks": "没有可用的笔记本。请先创建笔记本。",
"noSuggestions": "AI 无法找到整理这些笔记的好方法。",
"apply": "应用",
"applying": "正在应用...",
"success": "成功移动 {count} 条笔记",
"error": "创建整理计划失败",
"noNotesSelected": "未选择笔记",
"applyFailed": "应用整理计划失败",
"selectAllIn": "选择 {notebook} 中的所有笔记",
"selectNote": "选择笔记:{title}"
},
"clarify": "澄清",
"clickToAddTag": "点击添加此标签",