-
Notifications
You must be signed in to change notification settings - Fork 614
feat: i18n add da dk #1139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: i18n add da dk #1139
Conversation
WalkthroughAdds Danish (da-DK and alias da) localization across the app: build configs, system-language detection, UI language option, supportedLocales, context menu translations, and 21 new da-DK i18n resource modules aggregated under a da-DK index. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/shared/i18n.ts (1)
175-393: Based on my verification, I've discovered critical discrepancies:Actual State of errorMessageTranslations (lines 175-393):
- Present locales: zh-CN, zh-TW, en-US, pt-BR (4 locales)
- Missing locales: ja, ko, fr, de, es, da-DK (6 locales)
Key Finding:
The code snippet in the review comment is inaccurate. It shows entries forja,ko,fr,de,es, andzh-HKthat do not actually exist in theerrorMessageTranslationsobject. The actual file only contains 4 language entries.Rewritten Review Comment:
Add error message translations for all supported locales.
The
errorMessageTranslationsobject (lines 175-393) only includes translations for 4 locales (zh-CN, zh-TW, en-US, pt-BR), butsupportedLocalesdefines 10 languages. Missing translations for ja, ko, fr, de, es, and da-DK will cause users of these locales to see English error messages as fallback, inconsistent with the UI translations available insrc/renderer/src/i18n/.Add error message translations for all 10 supported locales: ja, ko, fr, de, es, and da-DK. Maintain consistent key-value structure across all language entries.
🧹 Nitpick comments (2)
src/renderer/settings/components/DisplaySettings.vue (1)
342-343: Consider alphabetical ordering of language options.The Danish language option has been added correctly, but for better maintainability, consider sorting the
languageOptionsarray alphabetically. This would place 'Dansk' before 'English', 'Français', and 'Português'.Example ordering:
{ value: 'system', label: t('common.languageSystem') || '跟随系统' }, + { value: 'da-DK', label: 'Dansk' }, + { value: 'en-US', label: 'English (US)' }, + { value: 'fa-IR', label: 'فارسی (ایران)' }, + { value: 'fr-FR', label: 'Français' }, + { value: 'ja-JP', label: '日本語' }, + { value: 'ko-KR', label: '한국어' }, + { value: 'pt-BR', label: 'Português (Brasil)' }, + { value: 'ru-RU', label: 'Русский' }, { value: 'zh-CN', label: '简体中文' }, - { value: 'en-US', label: 'English (US)' }, { value: 'zh-TW', label: '繁體中文(台灣)' }, { value: 'zh-HK', label: '繁體中文(香港)' }, - { value: 'ko-KR', label: '한국어' }, - { value: 'ru-RU', label: 'Русский' }, - { value: 'ja-JP', label: '日本語' }, - { value: 'fr-FR', label: 'Français' }, - { value: 'fa-IR', label: 'فارسی (ایران)' }, - { value: 'pt-BR', label: 'Português (Brasil)' }, - { value: 'da-DK', label: 'Dansk' }src/renderer/src/i18n/da-DK/contextMenu.json (1)
9-9: Consider lowercase for consistency."Klip" uses uppercase while surrounding verbs use lowercase ("kopiér", "indsæt"). For consistency within this file, consider using "klip" unless Danish convention requires capitalization for this specific term.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (26)
electron-builder-macx64.yml(1 hunks)electron-builder.yml(1 hunks)src/main/presenter/configPresenter/index.ts(1 hunks)src/renderer/settings/components/DisplaySettings.vue(1 hunks)src/renderer/src/i18n/da-DK/about.json(1 hunks)src/renderer/src/i18n/da-DK/artifacts.json(1 hunks)src/renderer/src/i18n/da-DK/chat.json(1 hunks)src/renderer/src/i18n/da-DK/common.json(1 hunks)src/renderer/src/i18n/da-DK/components.json(1 hunks)src/renderer/src/i18n/da-DK/contextMenu.json(1 hunks)src/renderer/src/i18n/da-DK/dialog.json(1 hunks)src/renderer/src/i18n/da-DK/index.ts(1 hunks)src/renderer/src/i18n/da-DK/mcp.json(1 hunks)src/renderer/src/i18n/da-DK/model.json(1 hunks)src/renderer/src/i18n/da-DK/newThread.json(1 hunks)src/renderer/src/i18n/da-DK/promptSetting.json(1 hunks)src/renderer/src/i18n/da-DK/routes.json(1 hunks)src/renderer/src/i18n/da-DK/settings.json(1 hunks)src/renderer/src/i18n/da-DK/sync.json(1 hunks)src/renderer/src/i18n/da-DK/thread.json(1 hunks)src/renderer/src/i18n/da-DK/toolCall.json(1 hunks)src/renderer/src/i18n/da-DK/traceDialog.json(1 hunks)src/renderer/src/i18n/da-DK/update.json(1 hunks)src/renderer/src/i18n/da-DK/welcome.json(1 hunks)src/renderer/src/i18n/index.ts(2 hunks)src/shared/i18n.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (28)
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use English for logs and comments (Chinese text exists in legacy code, but new code should use English)
Files:
src/main/presenter/configPresenter/index.tssrc/renderer/settings/components/DisplaySettings.vuesrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Enable and maintain strict TypeScript type checking for all files
**/*.{ts,tsx}: Always use try-catch to handle possible errors in TypeScript code
Provide meaningful error messages when catching errors
Log detailed error logs including error details, context, and stack traces
Distinguish and handle different error types (UserError, NetworkError, SystemError, BusinessError) with appropriate handlers in TypeScript
Use structured logging with logger.error(), logger.warn(), logger.info(), logger.debug() methods from logging utilities
Do not suppress errors (avoid empty catch blocks or silently ignoring errors)
Provide user-friendly error messages for user-facing errors in TypeScript components
Implement error retry mechanisms for transient failures in TypeScript
Avoid logging sensitive information (passwords, tokens, PII) in logs
Files:
src/main/presenter/configPresenter/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/main/presenter/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Organize core business logic into dedicated Presenter classes, with one presenter per functional domain
Files:
src/main/presenter/configPresenter/index.ts
src/main/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use EventBus from
src/main/eventbus.tsfor main-to-renderer communication, broadcasting events viamainWindow.webContents.send()
src/main/**/*.ts: Use EventBus pattern for inter-process communication within the main process to decouple modules
Use Electron's built-in APIs for file system and native dialogs instead of Node.js or custom implementations
src/main/**/*.ts: Electron main process code belongs insrc/main/with presenters inpresenter/(Window/Tab/Thread/Mcp/Config/LLMProvider) andeventbus.tsfor app events
Use the Presenter pattern in the main process for UI coordination
Files:
src/main/presenter/configPresenter/index.ts
src/main/presenter/configPresenter/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Store and retrieve custom prompts via
configPresenter.getCustomPrompts()for config-based data source management
Files:
src/main/presenter/configPresenter/index.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Do not include AI co-authoring information (e.g., 'Co-Authored-By: Claude') in git commits
Files:
src/main/presenter/configPresenter/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
**/*.{js,ts,jsx,tsx,mjs,cjs}
📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)
Write logs and comments in English
Files:
src/main/presenter/configPresenter/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
{src/main/presenter/**/*.ts,src/renderer/**/*.ts}
📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)
Implement proper inter-process communication (IPC) patterns using Electron's ipcRenderer and ipcMain APIs
Files:
src/main/presenter/configPresenter/index.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/**/*
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
New features should be developed in the
srcdirectory
Files:
src/main/presenter/configPresenter/index.tssrc/renderer/src/i18n/da-DK/update.jsonsrc/renderer/src/i18n/da-DK/dialog.jsonsrc/renderer/src/i18n/da-DK/sync.jsonsrc/renderer/src/i18n/da-DK/common.jsonsrc/renderer/src/i18n/da-DK/artifacts.jsonsrc/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/mcp.jsonsrc/renderer/src/i18n/da-DK/thread.jsonsrc/renderer/src/i18n/da-DK/chat.jsonsrc/renderer/src/i18n/da-DK/traceDialog.jsonsrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/settings.jsonsrc/renderer/src/i18n/da-DK/toolCall.jsonsrc/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/da-DK/newThread.jsonsrc/renderer/src/i18n/da-DK/promptSetting.jsonsrc/renderer/src/i18n/da-DK/model.jsonsrc/renderer/src/i18n/da-DK/contextMenu.jsonsrc/renderer/src/i18n/da-DK/about.jsonsrc/renderer/src/i18n/da-DK/welcome.jsonsrc/renderer/src/i18n/index.ts
src/main/**/*.{js,ts}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Main process code for Electron should be placed in
src/main
Files:
src/main/presenter/configPresenter/index.ts
src/**/*.{ts,tsx,vue,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier with single quotes, no semicolons, and 100 character width
Files:
src/main/presenter/configPresenter/index.tssrc/renderer/settings/components/DisplaySettings.vuesrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use OxLint for linting JavaScript and TypeScript files
Files:
src/main/presenter/configPresenter/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,tsx}: Use camelCase for variable and function names in TypeScript files
Use PascalCase for type and class names in TypeScript
Use SCREAMING_SNAKE_CASE for constant names
Files:
src/main/presenter/configPresenter/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Use EventBus for inter-process communication events
Files:
src/main/presenter/configPresenter/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/src/i18n/**/*.json
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/i18n/**/*.json: Translation key naming convention: use dot-separated hierarchical structure with lowercase letters and descriptive names (e.g., 'common.button.submit')
Maintain consistent key-value structure across all language translation files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR)
Files:
src/renderer/src/i18n/da-DK/update.jsonsrc/renderer/src/i18n/da-DK/dialog.jsonsrc/renderer/src/i18n/da-DK/sync.jsonsrc/renderer/src/i18n/da-DK/common.jsonsrc/renderer/src/i18n/da-DK/artifacts.jsonsrc/renderer/src/i18n/da-DK/mcp.jsonsrc/renderer/src/i18n/da-DK/thread.jsonsrc/renderer/src/i18n/da-DK/chat.jsonsrc/renderer/src/i18n/da-DK/traceDialog.jsonsrc/renderer/src/i18n/da-DK/settings.jsonsrc/renderer/src/i18n/da-DK/toolCall.jsonsrc/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/da-DK/newThread.jsonsrc/renderer/src/i18n/da-DK/promptSetting.jsonsrc/renderer/src/i18n/da-DK/model.jsonsrc/renderer/src/i18n/da-DK/contextMenu.jsonsrc/renderer/src/i18n/da-DK/about.jsonsrc/renderer/src/i18n/da-DK/welcome.json
src/renderer/**
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Use lowercase with dashes for directories (e.g., components/auth-wizard)
Files:
src/renderer/src/i18n/da-DK/update.jsonsrc/renderer/src/i18n/da-DK/dialog.jsonsrc/renderer/src/i18n/da-DK/sync.jsonsrc/renderer/src/i18n/da-DK/common.jsonsrc/renderer/src/i18n/da-DK/artifacts.jsonsrc/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/mcp.jsonsrc/renderer/src/i18n/da-DK/thread.jsonsrc/renderer/src/i18n/da-DK/chat.jsonsrc/renderer/src/i18n/da-DK/traceDialog.jsonsrc/renderer/src/i18n/da-DK/settings.jsonsrc/renderer/src/i18n/da-DK/toolCall.jsonsrc/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/da-DK/newThread.jsonsrc/renderer/src/i18n/da-DK/promptSetting.jsonsrc/renderer/src/i18n/da-DK/model.jsonsrc/renderer/src/i18n/da-DK/contextMenu.jsonsrc/renderer/src/i18n/da-DK/about.jsonsrc/renderer/src/i18n/da-DK/welcome.jsonsrc/renderer/src/i18n/index.ts
**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.vue: Use Vue 3 Composition API for all components instead of Options API
Use Tailwind CSS with scoped styles for component styling
Files:
src/renderer/settings/components/DisplaySettings.vue
src/renderer/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/**/*.vue: All user-facing strings must use i18n keys via vue-i18n for internationalization
Ensure proper error handling and loading states in all UI components
Implement responsive design using Tailwind CSS utilities for all UI components
src/renderer/**/*.vue: Use composition API and declarative programming patterns; avoid options API
Structure files: exported component, composables, helpers, static content, types
Use PascalCase for component names (e.g., AuthWizard.vue)
Use Vue 3 with TypeScript, leveraging defineComponent and PropType
Use template syntax for declarative rendering
Use Shadcn Vue, Radix Vue, and Tailwind for components and styling
Implement responsive design with Tailwind CSS; use a mobile-first approach
Use Suspense for asynchronous components
Use <script setup> syntax for concise component definitions
Prefer 'lucide:' icon family as the primary choice for Iconify icons
Import Icon component from '@iconify/vue' and use with lucide icons following pattern '{collection}:{icon-name}'
Files:
src/renderer/settings/components/DisplaySettings.vue
src/renderer/**/*.{vue,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Renderer process code should be placed in
src/renderer(Vue 3 application)
Files:
src/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,tsx,vue}: Write concise, technical TypeScript code with accurate examples
Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
Avoid enums; use const objects instead
Use arrow functions for methods and computed properties
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statementsVue 3 app code in
src/renderer/srcshould be organized intocomponents/,stores/,views/,i18n/,lib/directories with shell UI insrc/renderer/shell/
Files:
src/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/**/*.{ts,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching
Leverage ref, reactive, and computed for reactive state management
Use provide/inject for dependency injection when appropriate
Use Iconify/Vue for icon implementation
Files:
src/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/shared/**/*.{js,ts}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Shared type definitions and utilities between main and renderer processes should be placed in
src/shared
Files:
src/shared/i18n.ts
src/shared/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Shared types and utilities should be placed in
src/shared/
Files:
src/shared/i18n.ts
src/renderer/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use the
usePresenter.tscomposable for renderer-to-main IPC communication to call presenter methods directly
Files:
src/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/**/*.{vue,ts,tsx}: All user-facing strings must use i18n keys with vue-i18n framework in the renderer
Import and use useI18n() composable with the t() function to access translations in Vue components and TypeScript files
Use the dynamic locale.value property to switch languages at runtime
Avoid hardcoding user-facing text and ensure all user-visible text uses the i18n translation system
Files:
src/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability in Vue.js applications
Implement proper state management with Pinia in Vue.js applications
Utilize Vue Router for navigation and route management in Vue.js applications
Leverage Vue's built-in reactivity system for efficient data handling
Files:
src/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Use TypeScript for all code; prefer types over interfaces
Files:
src/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
src/renderer/src/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
src/renderer/src/**/*.{ts,tsx,vue}: Use TypeScript with Vue 3 Composition API for the renderer application
All user-facing strings must use vue-i18n keys insrc/renderer/src/i18n
Files:
src/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/index.ts
🧠 Learnings (13)
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/i18n/**/*.json : Maintain consistent key-value structure across all language translation files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR)
Applied to files:
src/renderer/src/i18n/da-DK/update.jsonsrc/renderer/src/i18n/da-DK/dialog.jsonsrc/renderer/src/i18n/da-DK/sync.jsonsrc/renderer/src/i18n/da-DK/common.jsonsrc/renderer/src/i18n/da-DK/artifacts.jsonsrc/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/mcp.jsonsrc/renderer/src/i18n/da-DK/thread.jsonsrc/renderer/src/i18n/da-DK/chat.jsonsrc/renderer/src/i18n/da-DK/traceDialog.jsonsrc/shared/i18n.tssrc/renderer/src/i18n/da-DK/settings.jsonsrc/renderer/src/i18n/da-DK/toolCall.jsonsrc/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/da-DK/newThread.jsonsrc/renderer/src/i18n/da-DK/promptSetting.jsonsrc/renderer/src/i18n/da-DK/model.jsonsrc/renderer/src/i18n/da-DK/contextMenu.jsonsrc/renderer/src/i18n/da-DK/about.jsonsrc/renderer/src/i18n/da-DK/welcome.jsonsrc/renderer/src/i18n/index.ts
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/i18n/**/*.json : Translation key naming convention: use dot-separated hierarchical structure with lowercase letters and descriptive names (e.g., 'common.button.submit')
Applied to files:
src/renderer/src/i18n/da-DK/dialog.jsonsrc/renderer/src/i18n/da-DK/common.jsonsrc/renderer/src/i18n/da-DK/artifacts.jsonsrc/renderer/src/i18n/da-DK/mcp.jsonsrc/renderer/src/i18n/da-DK/thread.jsonsrc/renderer/src/i18n/da-DK/chat.jsonsrc/renderer/src/i18n/da-DK/traceDialog.jsonsrc/renderer/src/i18n/da-DK/settings.jsonsrc/renderer/src/i18n/da-DK/toolCall.jsonsrc/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/da-DK/newThread.jsonsrc/renderer/src/i18n/da-DK/promptSetting.jsonsrc/renderer/src/i18n/da-DK/model.jsonsrc/renderer/src/i18n/da-DK/welcome.json
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/**/*.{vue,ts,tsx} : Avoid hardcoding user-facing text and ensure all user-visible text uses the i18n translation system
Applied to files:
src/renderer/src/i18n/da-DK/common.jsonsrc/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/index.ts
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/**/*.{vue,ts,tsx} : Use the dynamic locale.value property to switch languages at runtime
Applied to files:
src/renderer/settings/components/DisplaySettings.vuesrc/renderer/src/i18n/index.ts
📚 Learning: 2025-11-25T05:26:11.312Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T05:26:11.312Z
Learning: Applies to src/main/presenter/mcpPresenter/**/*.ts : Register new MCP tools in `mcpPresenter/index.ts` after implementing them in `inMemoryServers/`
Applied to files:
src/renderer/src/i18n/da-DK/mcp.json
📚 Learning: 2025-11-25T05:26:11.312Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T05:26:11.312Z
Learning: Applies to **/*.{ts,tsx,js,jsx,vue} : Use English for logs and comments (Chinese text exists in legacy code, but new code should use English)
Applied to files:
src/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.ts
📚 Learning: 2025-11-25T05:26:15.929Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/development-setup.mdc:0-0
Timestamp: 2025-11-25T05:26:15.929Z
Learning: Applies to **/*.{js,ts,jsx,tsx,mjs,cjs} : Write logs and comments in English
Applied to files:
src/shared/i18n.tssrc/renderer/src/i18n/da-DK/index.ts
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/**/*.{vue,ts,tsx} : All user-facing strings must use i18n keys with vue-i18n framework in the renderer
Applied to files:
src/renderer/src/i18n/da-DK/components.jsonsrc/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/index.ts
📚 Learning: 2025-11-25T05:26:24.867Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/electron-best-practices.mdc:0-0
Timestamp: 2025-11-25T05:26:24.867Z
Learning: Applies to src/shared/**/*.d.ts : Define type definitions in shared/*.d.ts files for objects exposed by the main process to the renderer process
Applied to files:
src/renderer/src/i18n/da-DK/index.ts
📚 Learning: 2025-11-25T05:28:20.513Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:28:20.513Z
Learning: Applies to src/renderer/src/**/*.{ts,tsx,vue} : All user-facing strings must use vue-i18n keys in `src/renderer/src/i18n`
Applied to files:
src/renderer/src/i18n/da-DK/index.tssrc/renderer/src/i18n/da-DK/routes.jsonsrc/renderer/src/i18n/index.ts
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/**/*.{vue,ts,tsx} : Import and use useI18n() composable with the t() function to access translations in Vue components and TypeScript files
Applied to files:
src/renderer/src/i18n/da-DK/index.ts
📚 Learning: 2025-11-25T05:26:11.312Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T05:26:11.312Z
Learning: Applies to src/renderer/**/*.vue : All user-facing strings must use i18n keys via vue-i18n for internationalization
Applied to files:
src/renderer/src/i18n/da-DK/routes.json
📚 Learning: 2025-11-25T05:26:11.312Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T05:26:11.312Z
Learning: Applies to src/main/presenter/configPresenter/**/*.ts : Store and retrieve custom prompts via `configPresenter.getCustomPrompts()` for config-based data source management
Applied to files:
src/renderer/src/i18n/da-DK/promptSetting.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-check (x64)
🔇 Additional comments (25)
src/renderer/src/i18n/da-DK/welcome.json (1)
1-37: Structure consistency verification needed.The file follows the lowercase key naming convention correctly and contains valid JSON. However, per coding guidelines, this Danish translation must maintain the same key-value structure as existing language files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR). Please verify that this nested object structure matches the structure used in those language files.
src/renderer/src/i18n/da-DK/chat.json (1)
1-90: Structure consistency verification needed.The chat translations follow the lowercase key naming convention and the JSON is valid. Ensure this nested object structure matches the format used in existing language translation files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR).
src/renderer/src/i18n/da-DK/thread.json (1)
1-46: Structure consistency verification needed.Thread translations adhere to the lowercase key naming convention and contain valid JSON. Verify that this nested object structure is consistent with existing language files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR).
src/renderer/src/i18n/da-DK/update.json (1)
1-16: Structure consistency verification needed.Update translations use proper lowercase keys and valid JSON. Please verify this structure matches the format in existing language files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR).
src/renderer/src/i18n/da-DK/mcp.json (1)
1-316: Structure consistency verification needed.The comprehensive MCP translations follow the lowercase key naming convention and use appropriate nested structure for the complex feature set. Valid JSON with proper placeholder usage. Please verify this structure is consistent with existing language files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR).
src/renderer/src/i18n/da-DK/sync.json (1)
1-17: Structure consistency verification needed.Sync translations follow the lowercase naming convention with valid JSON structure. Verify this structure matches existing language files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR).
src/renderer/src/i18n/da-DK/dialog.json (1)
1-44: Structure consistency verification needed.Dialog translations adhere to the lowercase key naming convention and contain valid JSON with appropriate nesting for conditional messages. Verify this structure is consistent with existing language files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR).
electron-builder-macx64.yml (1)
61-62: Build configuration correctly updated for Danish language support.The additions of "da-DK" and "da" to the electronLanguages list properly follow the existing naming convention used by other language variants (e.g., pt-BR and pt). This complements the new i18n translation files.
src/main/presenter/configPresenter/index.ts (1)
688-689: LGTM! System language detection extended for Danish.The addition of 'da-DK' to the supported languages list correctly enables automatic Danish locale detection based on system settings, consistent with the broader Danish localization effort.
src/renderer/src/i18n/da-DK/newThread.json (1)
1-4: LGTM! Danish translations for new thread flow.The translation keys and values are consistent with the established pattern for newThread resources across other locales.
electron-builder.yml (1)
60-61: LGTM! Electron build configuration extended for Danish.The addition of both 'da-DK' and 'da' language variants follows the established pattern and ensures proper locale matching during the build process.
src/renderer/src/i18n/da-DK/toolCall.json (1)
1-12: LGTM! Danish translations for tool call UI.The translation keys and Danish text are well-structured and follow the established i18n conventions.
src/renderer/src/i18n/index.ts (3)
11-11: LGTM! Danish locale import added.The import follows the established pattern for other locale modules.
24-24: LGTM! Danish locale registered.The 'da-DK' locale is correctly registered in the locales object.
28-29: LGTM! Danish locale aliases configured.Adding both 'pt' and 'da' as aliases enables locale matching for users with generic language settings (without region codes).
src/renderer/src/i18n/da-DK/traceDialog.json (1)
1-17: LGTM! Danish translations for trace dialog.The translation keys and Danish text are well-structured and consistent with i18n conventions.
src/renderer/src/i18n/da-DK/model.json (1)
1-30: LGTM!Danish model translations are well-structured with proper hierarchical organization (search, error, type, add, actions, tags) and consistent key naming.
Based on learnings, this maintains consistent key-value structure as required for i18n files.
src/renderer/src/i18n/da-DK/promptSetting.json (1)
1-95: LGTM!Comprehensive Danish translations for prompt settings with proper hierarchical structure and correct interpolation placeholder preservation ({name}, {count}, {added}, {updated}, etc.).
Based on learnings, this maintains the required key-value structure consistency across translation files.
src/renderer/src/i18n/da-DK/about.json (1)
1-19: LGTM!Danish about section translations are properly structured with appropriate nesting under deviceInfo and clear flat keys for other values.
src/renderer/src/i18n/da-DK/components.json (1)
1-41: LGTM!Danish component translations properly structured with nested sections (emojiPicker, messageBlockAction, messageBlockPermissionRequest, promptParamsDialog) and correct interpolation placeholder preservation.
Based on learnings, this avoids hardcoding user-facing text and properly uses the i18n translation system.
src/renderer/src/i18n/da-DK/settings.json (1)
1-952: LGTM!Comprehensive Danish settings translations with proper deep hierarchical structure covering all major settings sections (common, data, model, provider, knowledgeBase, mcp, acp, etc.) and correct interpolation placeholder preservation throughout.
Based on learnings, this maintains consistent key-value structure with proper dot-separated hierarchical naming across all settings sections.
src/shared/i18n.ts (2)
7-18: LGTM!The addition of 'da-DK' to supportedLocales with multi-line formatting improves readability and properly registers Danish locale support.
157-171: LGTM!Danish context menu translations are properly structured with all required keys (copy, paste, cut, selectAll, undo, redo, saveImage, copyImage, open, checkForUpdates, quit, translate, askAI) following the established pattern.
src/renderer/src/i18n/da-DK/index.ts (1)
1-56: Locale aggregation pattern for da-DK looks consistentThe module cleanly aggregates all da-DK JSON bundles and exposes additional top-level keys via
others, matching the usual i18n index pattern. Comment language is English and all user-facing strings stay inside the exported i18n object, so this aligns with the i18n and coding guidelines. LGTM.src/renderer/src/i18n/da-DK/common.json (1)
1-82: Key structure verified across all locales; translation suggestions remain valid stylistic improvementsThe key parity check confirms that
da-DK/common.jsonmaintains perfect structural alignment withen-US/common.jsonand all other supported locales (78 scalar keys across all six locales). The following Danish translation wording suggestions are stylistic refinements for better UI convention compliance:
- Line 2
"add": "tilføjet"– past participle; suggest imperative"Tilføj"- Line 4
"clear": "ryd op"– colloquial; suggest action-oriented"Ryd"- Line 5
"close": "lukke"– infinitive; suggest imperative"Luk"- Line 7
"confirm": "bekræfte"– infinitive; suggest imperative"Bekræft"- Line 21
"edit": "redigere"– infinitive; suggest imperative"Rediger"- Line 47
"expand": "udvide"– infinitive; suggest imperative"Udvid"- Line 49
"format": "formatere"– context-dependent; consider noun form"Format"if used as menu label- Line 57
"newTopic": "nyt emne"– suggest capitalization"Nyt emne"for consistency- Line 80
"disabled": "Handicappet"– inappropriate term for UI state; use"Deaktiveret"instead⛔ Skipped due to learnings
Learnt from: CR Repo: ThinkInAIXYZ/deepchat PR: 0 File: .cursor/rules/i18n.mdc:0-0 Timestamp: 2025-11-25T05:26:43.510Z Learning: Applies to src/renderer/src/i18n/**/*.json : Maintain consistent key-value structure across all language translation files (zh-CN, en-US, ko-KR, ru-RU, zh-HK, fr-FR, fa-IR)Learnt from: CR Repo: ThinkInAIXYZ/deepchat PR: 0 File: .cursor/rules/i18n.mdc:0-0 Timestamp: 2025-11-25T05:26:43.510Z Learning: Applies to src/renderer/src/i18n/**/*.json : Translation key naming convention: use dot-separated hierarchical structure with lowercase letters and descriptive names (e.g., 'common.button.submit')
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.