chore: add more translation keys#6715
Conversation
WalkthroughThis pull request updates locale translation files by adding a new Changes
Sequence Diagram(s)sequenceDiagram
participant IM as IssueModal
participant API as Service/API
participant TS as ToastService
IM->>API: Trigger operation
alt Successful Response
API-->>IM: Return data
else Error Occurred
API-->>IM: Throw error
IM->>IM: Execute catch block (error is of type `any`)
IM->>IM: Check for error.error property
IM->>TS: Set toast message using error.error or fallback message
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
web/styles/command-pallette.css (1)
41-46: Clarify Disabled Item Styling
The updated CSS correctly targets both[aria-disabled="true"]and[data-disabled="true"]states by settingcursor: not-allowed, reducedopacity, and a transparent background. This clearly signals that the item is disabled. Consider if addingpointer-events: none;might further reinforce the non-interactive state (if that’s aligned with the design requirements).packages/i18n/src/locales/zh-CN/translations.json (1)
868-869: New Translation Keys Added to the Common Section.
The addition of the"view": "查看"key alongside the existing"invite": "邀请"ensures consistency with similar updates in other locale files. The text translation appears appropriate and the JSON syntax (including comma placement) is valid.web/core/components/issues/issue-modal/base.tsx (1)
244-249: Improved error handling with better error messages.The changes provide more informative error messages by using the actual error message from the backend when available. This enhancement creates a better user experience by displaying specific error details rather than generic messages.
Two improvements were made:
- Added explicit type annotation for the error variable
- Added a fallback mechanism for error messages using the optional chaining operator
Consider creating a reusable error handling utility function to standardize this pattern across the codebase:
const handleApiError = (error: any, fallbackMessage: string) => { setToast({ type: TOAST_TYPE.ERROR, title: t("error"), message: error?.error ?? t(fallbackMessage), }); };packages/i18n/src/locales/ja/translations.json (1)
859-859: Update Translation for "talk_to_sales"
The translation has been updated to"トーク トゥ セールス". Please verify that using an English phrase within the Japanese locale is the intended style and consistent with other locales’ updates.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
packages/i18n/src/locales/en/translations.json(2 hunks)packages/i18n/src/locales/es/translations.json(1 hunks)packages/i18n/src/locales/fr/translations.json(2 hunks)packages/i18n/src/locales/it/translations.json(2 hunks)packages/i18n/src/locales/ja/translations.json(3 hunks)packages/i18n/src/locales/ru/translations.json(5 hunks)packages/i18n/src/locales/zh-CN/translations.json(1 hunks)web/core/components/issues/issue-modal/base.tsx(2 hunks)web/styles/command-pallette.css(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/i18n/src/locales/fr/translations.json
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (python)
🔇 Additional comments (11)
web/styles/command-pallette.css (1)
48-50: Enhance Hover Feedback for Disabled Items
The hover state for disabled items now uses a semi‐transparent background (rgba(var(--color-background-80), 0.7)), which provides a subtle visual cue. This is a good improvement for user experience. Just verify that this new hover style remains consistent with the overall theme and accessibility guidelines.packages/i18n/src/locales/es/translations.json (1)
870-871: Addition of New Translation Key "view"
The Spanish translations now include the new"view": "Ver"entry (added right after"invite": "Invitar"). The JSON syntax is correct and the placement is consistent with the other locale files. Ensure that UI components referencing this key properly display the translation.packages/i18n/src/locales/en/translations.json (2)
690-690: Grammar improvement to Sales capitalization.The capitalization of "Sales" in "Talk to Sales" follows proper grammar rules for titles, creating a more polished user interface.
699-700: Good addition of a new translation key.The addition of a "view" key enhances the localization capabilities of the application. According to the PR summary, this key has been consistently added across multiple language files (es, fr, it, ja, ru, zh-CN), ensuring a complete translation set.
web/core/components/issues/issue-modal/base.tsx (1)
302-308: Consistent error handling improvement.The same error handling improvements have been applied here as well, maintaining consistency throughout the component. This enhances error reporting by potentially providing more specific feedback.
packages/i18n/src/locales/it/translations.json (1)
865-866: New Translation Keys Added:
The addition of the"invite": "Invita"and"view": "Visualizza"keys in the "common" section aligns perfectly with the PR objective and mirrors similar updates across other locales. The translations appear accurate and consistent with the intent.packages/i18n/src/locales/ja/translations.json (1)
868-869: Addition of the "view" Key and Comma Adjustment
A new translation key"view": "ビュー"has been added (with the existing"invite": "招待"entry now followed by a comma for proper JSON formatting). Ensure that the new key aligns with the overall translation strategy and is consistent with similar changes in other locale files.packages/i18n/src/locales/ru/translations.json (4)
867-868: New translation key added and trailing comma fixed.
The addition of"view": "Просмотр"under the "common" section enriches the translation keys, and appending a trailing comma after"invite": "Пригласить"ensures proper JSON formatting and consistency.
1871-1873: Consistent formatting in the 'completed_no_issues' block.
The whitespace and formatting adjustments in the "completed_no_issues" section help maintain a uniform style. Please verify that these changes preserve the intended meaning of the message.
2290-2293: Formatting adjustments in the 'excel' exporter section.
The revised formatting for the Excel export translations (e.g.,"title": "Excel") improves consistency in JSON structure. Confirm that the capitalization and phrasing align with the project's localization standards.
2308-2309: Standardizing the 'created' translation in the default global view.
Updating"created": "Созданные"streamlines the terminology within the default global view block. Ensure that this wording is consistent with similar entries across other locale files.
Description
This PR adds some more common translation keys.
Type of Change
Summary by CodeRabbit