Skip to content

chore: add more translation keys#6715

Merged
sriramveeraghanta merged 1 commit intopreviewfrom
chore/additional-translation-keys
Mar 7, 2025
Merged

chore: add more translation keys#6715
sriramveeraghanta merged 1 commit intopreviewfrom
chore/additional-translation-keys

Conversation

@aaryan610
Copy link
Member

@aaryan610 aaryan610 commented Mar 6, 2025

Description

This PR adds some more common translation keys.

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)

Summary by CodeRabbit

  • New Features
    • Updated UI text across languages with new "View" translations and refined sales contact wording for improved clarity.
    • Enhanced error messaging in issue modals to provide clearer user feedback.
  • Style
    • Refined hover styling for disabled command items to offer more distinct visual cues during interactions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2025

Walkthrough

This pull request updates locale translation files by adding a new "view" entry with locale-specific values and modifying the "talk_to_sales" entry (capitalization or grammatical corrections in some locales). In addition, JSON formatting improvements (such as comma adjustments) were applied. The pull request also enhances error handling in the IssueModal component—now explicitly typing errors as any and using a fallback mechanism for toast messages—and adjusts CSS styles for disabled command items to use a semi‐transparent background on hover.

Changes

Files Change Summary
packages/i18n/src/locales/{en,es,fr,it,ja,ru,zh-CN}/translations.json Added new key "view" with locale-specific values; updated "talk_to_sales" entries (capitalization/grammar adjustments) and applied JSON formatting corrections (e.g., trailing commas).
web/core/components/issues/issue-modal/base.tsx Enhanced error handling in try-catch blocks by explicitly typing errors as any and setting toast messages dynamically using error.error if available.
web/styles/command-pallette.css Reorganized selectors and updated the hover state for disabled command items to use a semi-transparent background color.

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
Loading

Possibly related PRs

Suggested labels

🌐frontend, 🧹chore

Suggested reviewers

  • prateekshourya29
  • sriramveeraghanta

Poem

I’m a hopping coder, a bunny so bright,
Skipping through JSONs in the moonlit night.
With every new key and a tweak here and there,
I celebrate changes with a whimsical flare.
Bugs hop away when my fixes are in sight! 🐰🌟

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (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 setting cursor: not-allowed, reduced opacity, and a transparent background. This clearly signals that the item is disabled. Consider if adding pointer-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:

  1. Added explicit type annotation for the error variable
  2. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 21d7a18 and 3468ea2.

📒 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.

@sriramveeraghanta sriramveeraghanta merged commit 7005ae2 into preview Mar 7, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the chore/additional-translation-keys branch March 7, 2025 06:01
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants