Skip to content
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

[Fix] Missing translation #8724

Merged
merged 1 commit into from
Jan 11, 2025
Merged

[Fix] Missing translation #8724

merged 1 commit into from
Jan 11, 2025

Conversation

adkif
Copy link
Contributor

@adkif adkif commented Jan 10, 2025

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


Summary by CodeRabbit

  • Localization

    • Added "Install Plugin" menu option in multiple language translations (Arabic, Bulgarian, German, English, Spanish, French, Hebrew, Italian, Dutch, Polish, Portuguese, Russian, and Chinese)
  • Documentation

    • Minor formatting improvements to documentation comments in desktop menu implementation

@adkif adkif requested review from evereq and rahul-rocket January 10, 2025 13:57
Copy link
Contributor

coderabbitai bot commented Jan 10, 2025

Walkthrough

This pull request involves updates to the desktop menu and localization files across multiple languages. The primary change is the addition of an "Install Plugin" menu option in the desktop-menu.ts file and corresponding translations in various language JSON files. The modifications include adding a new menu item label and providing translations for "INSTALL_PLUGIN" in Arabic, Bulgarian, German, English, Spanish, French, Hebrew, Italian, Dutch, Polish, Portuguese, Russian, and Chinese localization files.

Changes

File Change Summary
packages/desktop-lib/src/lib/desktop-menu.ts Updated documentation comments and formatting; modified menu item label
packages/ui-core/i18n/assets/i18n/*.json Added "INSTALL_PLUGIN" translation for multiple languages under the "MENU" section

Suggested reviewers

  • evereq
  • rahul-rocket

Possibly related PRs

Poem

🐰 A rabbit's menu tale unfolds,
With plugins waiting to be sold,
Translations spanning every land,
A global menu, oh so grand!
Install with just a simple click! 🔧

Finishing Touches

  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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

🔭 Outside diff range comments (1)
packages/ui-core/i18n/assets/i18n/fr.json (1)

Missing Button Translations in French Language File

The following button translations are missing from the French language file and should be added:

  • ENABLED: "Activé"
  • DISABLED: "Désactivé"
  • AUTO_SYNCING: "Synchronisation automatique..."
  • SYNCING: "Synchronisation..."
  • RESET_INTEGRATION: "Réinitialiser l'intégration"
  • ADD_INTEGRATION: "Ajouter une intégration"
  • SELECTED_TASKS: "Tâches sélectionnées"
  • SENDING_CODE: "Envoi du code..."
🔗 Analysis chain

Line range hint 1-4077: Verify completeness of translations.

The file appears to have comprehensive translations, but there are some keys that could benefit from additional context or improved translations.

Let's verify if any translation keys are missing or need improvement:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for missing translations by comparing with English file
diff <(jq -r 'paths | join(".")' packages/ui-core/i18n/assets/i18n/en.json) <(jq -r 'paths | join(".")' packages/ui-core/i18n/assets/i18n/fr.json)

Length of output: 258


Script:

#!/bin/bash
# Check if translation files exist and are readable
echo "Checking translation files..."
ls -l packages/ui-core/i18n/assets/i18n/en.json packages/ui-core/i18n/assets/i18n/fr.json

# Get a sample of translations to compare
echo -e "\nSampling translations..."
jq -r '.BUTTONS | keys' packages/ui-core/i18n/assets/i18n/en.json
echo -e "\nFrench translations:"
jq -r '.BUTTONS | keys' packages/ui-core/i18n/assets/i18n/fr.json

Length of output: 5880


Script:

#!/bin/bash
# Check specific translation values
echo "Checking English values for missing keys..."
for key in "ENABLED" "DISABLED" "AUTO_SYNCING" "SYNCING" "RESET_INTEGRATION" "ADD_INTEGRATION" "SELECTED_TASKS" "SENDING_CODE"; do
  echo -e "\n$key:"
  jq -r --arg key "$key" '.BUTTONS[$key]' packages/ui-core/i18n/assets/i18n/en.json
done

# Check if these translations exist elsewhere in the French file
echo -e "\nSearching for translations in French file..."
for key in "enabled" "disabled" "syncing" "integration" "selected" "sending"; do
  echo -e "\nSearching for '$key':"
  jq -r --arg key "$key" 'paths as $p | select(getpath($p) | tostring | ascii_downcase | contains($key)) | $p | join(".")' packages/ui-core/i18n/assets/i18n/fr.json | head -n 5
done

Length of output: 4688

🧹 Nitpick comments (2)
packages/ui-core/i18n/assets/i18n/fr.json (2)

4076-4077: Verify the new translation key addition.

The new translation key "INSTALL_PLUGIN" has been added under the MENU section with the French translation "Installer plugin". The translation looks accurate but could be improved for better clarity.

Consider using a more specific translation:

-      "INSTALL_PLUGIN": "Installer plugin"
+      "INSTALL_PLUGIN": "Installer le plugin"

Adding the article "le" makes it more natural in French.


Line range hint 1-4077: Review of translation consistency and formatting.

The translations are generally well-formatted and consistent, but there are a few minor issues to address:

  1. Some translations end with periods while similar phrases don't
  2. Some placeholders use different quotation marks ('{{ var }}' vs "{{ var }}")
  3. Some translations use different capitalization for similar terms

Consider standardizing:

  • Period usage at the end of phrases
  • Quotation mark style for placeholders
  • Capitalization of common terms

This will improve maintainability and consistency of the translations.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 943ba58 and dae531b.

📒 Files selected for processing (14)
  • packages/desktop-lib/src/lib/desktop-menu.ts (5 hunks)
  • packages/ui-core/i18n/assets/i18n/ar.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/bg.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/de.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/en.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/es.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/fr.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/he.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/it.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/nl.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/pl.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/pt.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/ru.json (1 hunks)
  • packages/ui-core/i18n/assets/i18n/zh.json (1 hunks)
✅ Files skipped from review due to trivial changes (7)
  • packages/ui-core/i18n/assets/i18n/he.json
  • packages/ui-core/i18n/assets/i18n/es.json
  • packages/ui-core/i18n/assets/i18n/ru.json
  • packages/ui-core/i18n/assets/i18n/pt.json
  • packages/ui-core/i18n/assets/i18n/bg.json
  • packages/ui-core/i18n/assets/i18n/ar.json
  • packages/ui-core/i18n/assets/i18n/zh.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build
  • GitHub Check: test
🔇 Additional comments (9)
packages/desktop-lib/src/lib/desktop-menu.ts (3)

17-26: Documentation formatting improved!

Documentation comments now follow consistent JSDoc formatting with proper asterisks alignment.


241-244: Documentation formatting improved!

Documentation comments for the pluginMenu getter now follow consistent JSDoc formatting.


255-257: New menu item added correctly

The "Install Plugin" menu item has been properly added under the TIMER_TRACKER.MENU namespace, maintaining consistency with the existing menu structure.

packages/ui-core/i18n/assets/i18n/en.json (1)

4207-4208: Translation keys added correctly

New translation keys for "MONTHLY_RECAP" and "INSTALL_PLUGIN" have been properly added to the TIMER_TRACKER.MENU section, maintaining consistency with the existing translation structure.

packages/ui-core/i18n/assets/i18n/nl.json (1)

4076-4077: LGTM! Translation looks good.

The new Dutch translation "Plugin installeren" for "INSTALL_PLUGIN" is correctly added and properly formatted. The translation is grammatically correct and consistent with other menu items.

packages/ui-core/i18n/assets/i18n/pl.json (2)

4076-4077: New translation addition looks good

The newly added translation for "INSTALL_PLUGIN" is correctly implemented:

"INSTALL_PLUGIN": "Zainstaluj wtyczkę"

The translation is grammatically correct in Polish and maintains consistency with the application's terminology.


Line range hint 1-4077: Overall structure and formatting is well maintained

The translation file follows proper JSON structure and maintains consistent formatting throughout. The hierarchical organization of translations is logical and well-maintained.

packages/ui-core/i18n/assets/i18n/it.json (1)

4076-4077: LGTM! The new Italian translations are accurate and consistent.

The translations for "MONTHLY_RECAP" ("Riepilogo Mensile") and "INSTALL_PLUGIN" ("Installa plugin") are:

  • Grammatically correct in Italian
  • Consistent with the existing translation style
  • Accurately convey the meaning of the English source text
packages/ui-core/i18n/assets/i18n/de.json (1)

4072-4073: LGTM! The German translation for "Install Plugin" is accurate and consistent.

The translation "Plugin installieren" is:

  • Grammatically correct
  • Natural sounding in German
  • Consistent with other menu items and plugin-related terms
  • Follows the established capitalization pattern

Copy link

nx-cloud bot commented Jan 10, 2025

View your CI Pipeline Execution ↗ for commit dae531b.

Command Status Duration Result
nx build desktop --base-href ./ ✅ Succeeded 1m 45s View ↗
nx build desktop-api --output-path=dist/apps/de... ✅ Succeeded 26s View ↗
nx run api:desktop-api ✅ Succeeded 1m 12s View ↗
nx run gauzy:desktop-ui --base-href ./ ✅ Succeeded 3m 43s View ↗
nx build gauzy -c=production --prod --verbose ✅ Succeeded 3m 28s View ↗
nx build api -c=production --prod ✅ Succeeded 1m 9s View ↗
nx build desktop-ui-lib --configuration=develop... ✅ Succeeded 30s View ↗
nx build desktop-ui-lib --configuration=production ✅ Succeeded 27s View ↗
Additional runs (53) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-01-10 14:41:09 UTC

@rahul-rocket rahul-rocket merged commit d89c144 into develop Jan 11, 2025
17 checks passed
@rahul-rocket rahul-rocket deleted the fix/missing-translation branch January 11, 2025 06:33
@coderabbitai coderabbitai bot mentioned this pull request Feb 27, 2025
2 tasks
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.

2 participants