-
Notifications
You must be signed in to change notification settings - Fork 614
feat: add pt-BR internationalization #960
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
Conversation
WalkthroughAdds Brazilian Portuguese (pt-BR) localization: new pt-BR i18n files, registers 'pt-BR' (and alias 'pt') in locale mappings and supported lists, exposes language option in UI, extends system language detection, updates shared translations, includes pt/pt-BR in Electron build configs and brand config templates, and updates rebrand script locales. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant OS as Operating System
participant Main as Main Process
participant Renderer as Renderer (i18n)
participant Shared as Shared Module
OS->>Main: query system locale
Main->>Main: getSystemLanguage() includes 'pt-BR'
Main-->>Renderer: selected language code (pt-BR)
Renderer->>Shared: verify supportedLocales includes 'pt-BR'
Renderer->>Renderer: load locales['pt-BR'] (alias 'pt' allowed)
Renderer-->>UI: render UI strings from pt-BR bundle
Note over Renderer,Shared: Electron build and brand configs now include pt/pt-BR for packaging and templates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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: 0
🧹 Nitpick comments (1)
src/renderer/src/components/settings/DisplaySettings.vue (1)
199-200: Remove trailing whitespace before the comma.Line 200 contains extra whitespace before the comma in
'pt-BR' ,. This should be'pt-BR',for consistency with the other language options and to adhere to Prettier formatting standards.Apply this diff:
- { value: 'fa-IR', label: 'فارسی (ایران)' }, - { value: 'pt-BR' , label: 'Português (Brasil)' } + { value: 'fa-IR', label: 'فارسی (ایران)' }, + { value: 'pt-BR', label: 'Português (Brasil)' }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (28)
brand-config.example-banana.json(3 hunks)brand-config.template.json(5 hunks)electron-builder-macx64.yml(1 hunks)electron-builder.yml(1 hunks)scripts/rebrand.js(2 hunks)src/main/presenter/configPresenter/index.ts(1 hunks)src/renderer/src/components/settings/DisplaySettings.vue(1 hunks)src/renderer/src/i18n/index.ts(2 hunks)src/renderer/src/i18n/pt-BR/about.json(1 hunks)src/renderer/src/i18n/pt-BR/artifacts.json(1 hunks)src/renderer/src/i18n/pt-BR/chat.json(1 hunks)src/renderer/src/i18n/pt-BR/common.json(1 hunks)src/renderer/src/i18n/pt-BR/components.json(1 hunks)src/renderer/src/i18n/pt-BR/contextMenu.json(1 hunks)src/renderer/src/i18n/pt-BR/dialog.json(1 hunks)src/renderer/src/i18n/pt-BR/index.ts(1 hunks)src/renderer/src/i18n/pt-BR/mcp.json(1 hunks)src/renderer/src/i18n/pt-BR/model.json(1 hunks)src/renderer/src/i18n/pt-BR/newThread.json(1 hunks)src/renderer/src/i18n/pt-BR/promptSetting.json(1 hunks)src/renderer/src/i18n/pt-BR/routes.json(1 hunks)src/renderer/src/i18n/pt-BR/settings.json(1 hunks)src/renderer/src/i18n/pt-BR/sync.json(1 hunks)src/renderer/src/i18n/pt-BR/thread.json(1 hunks)src/renderer/src/i18n/pt-BR/toolCall.json(1 hunks)src/renderer/src/i18n/pt-BR/update.json(1 hunks)src/renderer/src/i18n/pt-BR/welcome.json(1 hunks)src/shared/i18n.ts(3 hunks)
🧰 Additional context used
📓 Path-based instructions (26)
src/renderer/src/**/*
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system
Files:
src/renderer/src/i18n/pt-BR/newThread.jsonsrc/renderer/src/i18n/pt-BR/chat.jsonsrc/renderer/src/i18n/pt-BR/mcp.jsonsrc/renderer/src/i18n/pt-BR/thread.jsonsrc/renderer/src/i18n/pt-BR/artifacts.jsonsrc/renderer/src/i18n/pt-BR/sync.jsonsrc/renderer/src/i18n/pt-BR/promptSetting.jsonsrc/renderer/src/i18n/pt-BR/contextMenu.jsonsrc/renderer/src/i18n/pt-BR/settings.jsonsrc/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/i18n/pt-BR/update.jsonsrc/renderer/src/i18n/pt-BR/routes.jsonsrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/pt-BR/common.jsonsrc/renderer/src/i18n/index.tssrc/renderer/src/i18n/pt-BR/welcome.jsonsrc/renderer/src/i18n/pt-BR/model.jsonsrc/renderer/src/i18n/pt-BR/dialog.jsonsrc/renderer/src/i18n/pt-BR/toolCall.jsonsrc/renderer/src/i18n/pt-BR/components.jsonsrc/renderer/src/i18n/pt-BR/about.json
src/renderer/src/**
📄 CodeRabbit inference engine (AGENTS.md)
Put application code for the Vue app under src/renderer/src (components, stores, views, i18n, lib)
Files:
src/renderer/src/i18n/pt-BR/newThread.jsonsrc/renderer/src/i18n/pt-BR/chat.jsonsrc/renderer/src/i18n/pt-BR/mcp.jsonsrc/renderer/src/i18n/pt-BR/thread.jsonsrc/renderer/src/i18n/pt-BR/artifacts.jsonsrc/renderer/src/i18n/pt-BR/sync.jsonsrc/renderer/src/i18n/pt-BR/promptSetting.jsonsrc/renderer/src/i18n/pt-BR/contextMenu.jsonsrc/renderer/src/i18n/pt-BR/settings.jsonsrc/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/i18n/pt-BR/update.jsonsrc/renderer/src/i18n/pt-BR/routes.jsonsrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/pt-BR/common.jsonsrc/renderer/src/i18n/index.tssrc/renderer/src/i18n/pt-BR/welcome.jsonsrc/renderer/src/i18n/pt-BR/model.jsonsrc/renderer/src/i18n/pt-BR/dialog.jsonsrc/renderer/src/i18n/pt-BR/toolCall.jsonsrc/renderer/src/i18n/pt-BR/components.jsonsrc/renderer/src/i18n/pt-BR/about.json
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)
**/*.{js,jsx,ts,tsx}: 使用 OxLint 进行代码检查
Log和注释使用英文书写
**/*.{js,jsx,ts,tsx}: Use OxLint for JS/TS code; pre-commit hooks run lint-staged and typecheck
Use camelCase for variables and functions
Use PascalCase for types and classes
Use SCREAMING_SNAKE_CASE for constants
Files:
scripts/rebrand.jssrc/renderer/src/i18n/pt-BR/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/index.tssrc/main/presenter/configPresenter/index.ts
**/*.{ts,tsx,js,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use English for all logs and comments
Files:
scripts/rebrand.jssrc/renderer/src/i18n/pt-BR/index.tssrc/shared/i18n.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.tssrc/main/presenter/configPresenter/index.ts
scripts/**
📄 CodeRabbit inference engine (AGENTS.md)
Place build/signing/installer/runtime and commit-related scripts in scripts/
Files:
scripts/rebrand.js
**/*.{js,jsx,ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
Apply Prettier formatting: single quotes, no semicolons, max width 100
Files:
scripts/rebrand.jssrc/renderer/src/i18n/pt-BR/index.tssrc/shared/i18n.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.tssrc/main/presenter/configPresenter/index.ts
src/{main,renderer}/**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)
src/{main,renderer}/**/*.ts: Use context isolation for improved security
Implement proper inter-process communication (IPC) patterns
Optimize application startup time with lazy loading
Implement proper error handling and logging for debugging
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/i18n/index.tssrc/main/presenter/configPresenter/index.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/error-logging.mdc)
**/*.{ts,tsx}: 始终使用 try-catch 处理可能的错误
提供有意义的错误信息
记录详细的错误日志
优雅降级处理
日志应包含时间戳、日志级别、错误代码、错误描述、堆栈跟踪(如适用)、相关上下文信息
日志级别应包括 ERROR、WARN、INFO、DEBUG
不要吞掉错误
提供用户友好的错误信息
实现错误重试机制
避免记录敏感信息
使用结构化日志
设置适当的日志级别
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/shared/i18n.tssrc/renderer/src/i18n/index.tssrc/main/presenter/configPresenter/index.ts
src/renderer/**/*.{vue,ts,js,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
渲染进程代码放在
src/renderer
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/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
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.ts
src/renderer/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
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 statements.
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.ts
src/renderer/**/*.{vue,ts}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Implement lazy loading for routes and components.
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/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.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.Use Pinia for frontend state management (do not introduce alternative state libraries)
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/shared/i18n.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.tssrc/main/presenter/configPresenter/index.ts
src/renderer/src/**/*.{vue,ts}
📄 CodeRabbit inference engine (AGENTS.md)
All user-facing strings in the renderer must use vue-i18n keys defined in src/renderer/src/i18n
Files:
src/renderer/src/i18n/pt-BR/index.tssrc/renderer/src/components/settings/DisplaySettings.vuesrc/renderer/src/i18n/index.ts
src/shared/**/*.{ts,tsx,d.ts}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
共享类型定义放在
shared目录
Files:
src/shared/i18n.ts
src/shared/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Place shared types, utilities, constants, and IPC contract definitions under src/shared/
Files:
src/shared/i18n.ts
src/shared/**
📄 CodeRabbit inference engine (AGENTS.md)
Store shared TypeScript types/utilities in src/shared/
Files:
src/shared/i18n.ts
src/renderer/src/**/*.vue
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
Use scoped styles to prevent CSS conflicts between components
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/{src,shell,floating}/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/src/components/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Organize UI components by feature within src/renderer/src/
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
Name Vue components in PascalCase (e.g., ChatInput.vue)
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/main/**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)
Use Electron's built-in APIs for file system and native dialogs
Files:
src/main/presenter/configPresenter/index.ts
src/main/**/*.{ts,js,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
主进程代码放在
src/main
Files:
src/main/presenter/configPresenter/index.ts
src/main/**
📄 CodeRabbit inference engine (AGENTS.md)
Place all Electron main-process code under src/main/
Files:
src/main/presenter/configPresenter/index.ts
src/main/presenter/**
📄 CodeRabbit inference engine (AGENTS.md)
src/main/presenter/**: Organize main-process presenters under src/main/presenter/ (Window/Tab/Thread/Mcp/Config/LLMProvider)
Follow the Presenter pattern for main-process modules
Files:
src/main/presenter/configPresenter/index.ts
🔇 Additional comments (22)
electron-builder.yml (1)
52-53: LGTM! Portuguese language support added correctly.The addition of
pt-BRandptto theelectronLanguageslist is consistent with the existing language entries and properly integrates Brazilian Portuguese support into the Electron build configuration.scripts/rebrand.js (2)
207-207: LGTM! pt-BR added to i18n file updates.The inclusion of
pt-BRin the locales array ensures the rebrand script will properly update Brazilian Portuguese internationalization files.
302-302: LGTM! pt-BR added to DeepChat reference updates.The inclusion of
pt-BRin the locales array ensures the rebrand script will properly update DeepChat references in Brazilian Portuguese files.electron-builder-macx64.yml (1)
53-54: LGTM! Portuguese language support added for macOS X64 builds.The addition of
pt-BRandptto theelectronLanguageslist is consistent with the changes inelectron-builder.ymland properly extends language support to macOS X64 builds.brand-config.example-banana.json (1)
26-27: LGTM! Brazilian Portuguese translations added to brand config.The pt-BR translations for
appTitle,appDescription, andwebsiteTextare properly formatted and follow the existing structure used by other locales in the brand configuration template.Also applies to: 38-39, 50-51
src/renderer/src/i18n/pt-BR/thread.json (1)
1-35: LGTM! Comprehensive thread translations for pt-BR.The translation file is well-structured and provides complete coverage of thread-related UI strings including actions, toolbar operations, messages, and export functionality. The JSON format is valid and translations appear appropriate for Brazilian Portuguese users.
src/renderer/src/i18n/pt-BR/about.json (1)
1-19: LGTM! Complete about page translations for pt-BR.The translation file provides comprehensive coverage of the about page content including application description, device information fields, and update channel options. The JSON structure is valid and the nested
deviceInfoobject is properly formatted.src/renderer/src/i18n/pt-BR/mcp.json (1)
1-271: LGTM! Comprehensive MCP translations for pt-BR.This translation file provides extensive coverage of all MCP (Model Context Protocol) functionality including:
- Tool management and execution
- Server configuration and management
- Prompts and resources
- Error messages
- Market integration
The JSON structure is valid and the translations appear thorough and well-organized, ensuring Brazilian Portuguese users have full access to MCP features.
src/renderer/src/i18n/pt-BR/newThread.json (1)
1-4: LGTM! Simple and appropriate new thread translations.The translation file provides the essential greeting strings for the new thread interface. The translations are appropriate and the JSON structure is valid.
brand-config.template.json (1)
26-27: LGTM! PT-BR translations are properly structured.The Brazilian Portuguese translations are consistently added across all i18n blocks (appTitle, appDescription, websiteText, welcomeTitle, welcomeSetupDescription). The structure and placement follow the existing pattern set by other locales.
Also applies to: 38-39, 50-51, 62-63, 74-75
src/main/presenter/configPresenter/index.ts (1)
796-797: LGTM! PT-BR added to system language detection.The pt-BR locale is properly added to the supportedLanguages array, enabling automatic system language detection for Brazilian Portuguese users. The placement and implementation are consistent with existing locales.
src/renderer/src/i18n/pt-BR/routes.json (1)
1-16: LGTM! Route translations are properly structured.The PT-BR route translations are correctly formatted and include all necessary navigation and settings routes. The translations are clear and follow the expected i18n key structure.
src/renderer/src/i18n/pt-BR/contextMenu.json (1)
1-17: LGTM! Context menu translations are complete.The PT-BR context menu translations include all necessary keys for translation features, AI interaction, and basic clipboard operations. The nested structure for "translate" and "askAI" sections is correctly implemented.
src/renderer/src/i18n/pt-BR/toolCall.json (1)
1-12: LGTM! Tool call translations are comprehensive.The PT-BR translations cover all tool call states (calling, response, end, error) and UI elements (title, function name, parameters, response data). The translations are clear and appropriate for the context.
src/renderer/src/i18n/index.ts (1)
10-10: LGTM! PT-BR locale is properly registered.The PT-BR locale module is correctly imported and registered in the locales mapping. Both the full locale code ('pt-BR') and the short alias ('pt') are mapped to the ptBR module, which is consistent with how other locales are handled (e.g., 'zh' mapping to zhCN, 'en' to enUS).
Also applies to: 22-22, 25-26
src/renderer/src/i18n/pt-BR/components.json (1)
1-41: LGTM! Component translations are well-structured.The PT-BR component translations are comprehensive and correctly structured, including:
- All emoji picker categories (search, smileys, people, animals, food, travel, activities, objects, symbols, flags)
- Message block actions (continue, continued)
- Permission request system with proper nesting (type, description) and placeholder variables ('{toolName}', '{serverName}')
- Prompt parameters dialog (title, description, required field message)
The placeholder variable syntax (curly braces) is compatible with vue-i18n's interpolation system.
src/renderer/src/i18n/pt-BR/dialog.json (1)
1-44: LGTM! Well-structured PT-BR dialog translations.The dialog translations are properly structured with all necessary keys (cancel, confirm, close, ok, delete, rename, cleanMessages, fork, error, mutualExclusive). The nested structure for mutualExclusive with separate reasoning/functionCall variants is appropriate and matches the expected pattern.
src/renderer/src/i18n/pt-BR/common.json (1)
1-79: LGTM! Comprehensive PT-BR common translations.The common translations file is well-structured and comprehensive, covering:
- General UI actions (enable/disable, copy, paste, etc.)
- Status messages (loading, saved)
- Extensive error messages with HTTP status codes
- Configuration options (proxy, language, search)
- Data management prompts
All translations appear professional and consistent with the established patterns in other locale files.
src/renderer/src/i18n/pt-BR/index.ts (1)
1-54: LGTM! Proper PT-BR translation module aggregation.The index file correctly:
- Imports all PT-BR translation modules (common, update, routes, chat, model, thread, dialog, settings, mcp, welcome, artifacts, sync, toolCall, components, newThread, about, contextMenu, promptSetting)
- Defines an
othersobject with individual top-level keys- Exports a merged default object spreading all imports
- Uses English for comments as per coding guidelines
The structure follows the established pattern from other locale files and properly aggregates all PT-BR translations.
src/shared/i18n.ts (3)
7-7: LGTM! PT-BR added to supported locales.The addition of 'pt-BR' to the
supportedLocalesarray is correct and enables PT-BR locale support throughout the application.
131-145: LGTM! Complete PT-BR context menu translations.The PT-BR 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 same pattern as other locales.
341-366: LGTM! Complete PT-BR error message translations.The PT-BR error message translations are comprehensive and include all required keys:
- MCP-related errors (mcpConnectionErrorTitle, addMcpServerErrorTitle, getMcpToolListErrorTitle, etc.)
- Generic errors (genericErrorTitle, genericErrorMessage)
- Knowledge base configuration errors (needRagflowConfig, needDifyConfig, etc.)
All translations follow the same pattern and structure as existing locales, ensuring consistency across the application.
|
@codex review this |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting |
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: 0
🧹 Nitpick comments (1)
src/renderer/src/components/settings/DisplaySettings.vue (1)
229-229: Replace Chinese text in console.log with English.The console.log statement uses Chinese text, which violates the coding guideline requiring English for all logs and comments.
As per coding guidelines.
Apply this diff:
- console.log('准备切换投屏保护状态:', value) + console.log('Preparing to toggle content protection:', value)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/renderer/src/components/settings/DisplaySettings.vue(1 hunks)
🧰 Additional context used
📓 Path-based instructions (15)
src/renderer/src/**/*
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/**/*.{vue,ts,js,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
渲染进程代码放在
src/renderer
Files:
src/renderer/src/components/settings/DisplaySettings.vue
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
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/src/**/*.vue
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
Use scoped styles to prevent CSS conflicts between components
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
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 statements.
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/**/*.{vue,ts}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Implement lazy loading for routes and components.
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/**/*.{ts,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.Use Pinia for frontend state management (do not introduce alternative state libraries)
Files:
src/renderer/src/components/settings/DisplaySettings.vue
**/*.{ts,tsx,js,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use English for all logs and comments
Files:
src/renderer/src/components/settings/DisplaySettings.vue
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/{src,shell,floating}/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/src/components/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Organize UI components by feature within src/renderer/src/
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/src/**
📄 CodeRabbit inference engine (AGENTS.md)
Put application code for the Vue app under src/renderer/src (components, stores, views, i18n, lib)
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/src/**/*.{vue,ts}
📄 CodeRabbit inference engine (AGENTS.md)
All user-facing strings in the renderer must use vue-i18n keys defined in src/renderer/src/i18n
Files:
src/renderer/src/components/settings/DisplaySettings.vue
**/*.{js,jsx,ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
Apply Prettier formatting: single quotes, no semicolons, max width 100
Files:
src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
Name Vue components in PascalCase (e.g., ChatInput.vue)
Files:
src/renderer/src/components/settings/DisplaySettings.vue
🔇 Additional comments (1)
src/renderer/src/components/settings/DisplaySettings.vue (1)
199-200: LGTM! Brazilian Portuguese language option added correctly.The pt-BR language option follows the established pattern and uses the correct locale identifier that matches the i18n configuration across the codebase.
This PR adds Portuguese (Brazil) (pt-BR) internationalization support to the Deepchat. It includes:
Summary by CodeRabbit
New Features
Chores