Skip to content

[WEB-3689] feat: romanian and indonesian language support#6825

Merged
sriramveeraghanta merged 3 commits intopreviewfrom
feat-romanian-and-indonesian-language-support
Mar 26, 2025
Merged

[WEB-3689] feat: romanian and indonesian language support#6825
sriramveeraghanta merged 3 commits intopreviewfrom
feat-romanian-and-indonesian-language-support

Conversation

@anmolsinghbhatia
Copy link
Collaborator

@anmolsinghbhatia anmolsinghbhatia commented Mar 26, 2025

Description

This PR adds language support for:

  • Romanian
  • Indonesian

Type of Change

  • Feature

References

[WEB-3689]

Summary by CodeRabbit

  • New Features
    • Added support for Indonesian and Romanian languages.
    • Introduced full translations for key user interface elements including navigation, authentication, notifications, and error messages to enhance localization and usability.

mnbro and others added 2 commits March 26, 2025 18:55
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 26, 2025

Walkthrough

This pull request extends the internationalization capabilities by adding Indonesian ("id") and Romanian ("ro") language support. It updates the language constants, incorporates new translation JSON files for both languages, adjusts the language import logic, and revises the TLanguage type accordingly.

Changes

File(s) Change Summary
packages/i18n/src/constants/language.ts Added new language entries: "Indonesian" (id) and "Română" (ro) in the supported languages constant.
packages/i18n/src/locales/id/translations.json,
packages/i18n/src/locales/ro/translations.json
Introduced new translation files with key-value pairs for Indonesian and Romanian UI elements.
packages/i18n/src/store/index.ts Updated the importLanguageFile method to include cases for "id" and "ro" enabling dynamic import of their translation files.
packages/i18n/src/types/language.ts Updated the TLanguage type to include "id" and "ro", reformatted into a multi-line declaration for clarity.

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant TS as TranslationStore
    participant Loader as Translation Loader

    App->>TS: Request translation for selected language
    TS->>TS: Check language code
    alt Language is "id"
      TS->>Loader: Import "../locales/id/translations.json"
    else Language is "ro"
      TS->>Loader: Import "../locales/ro/translations.json"
    else
      TS-->>App: Throw error (unsupported language)
    end
Loading

Possibly related PRs

Suggested labels

🌟enhancement

Suggested reviewers

  • sriramveeraghanta

Poem

Hopping through lines of code with cheer,
Indonesian and Romanian now appear.
With fresh translations as my delight,
I nibble on keys from morning till night.
Coding rhythms make my bunny heart light! 🐇

✨ 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 plan to trigger planning for file edits and PR creation.
  • @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.

@anmolsinghbhatia anmolsinghbhatia changed the title feat: romanian and indonesian language support [WEB-3686] feat: romanian and indonesian language support Mar 26, 2025
@makeplane
Copy link

makeplane bot commented Mar 26, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

@anmolsinghbhatia anmolsinghbhatia marked this pull request as ready for review March 26, 2025 13:44
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 (2)
packages/i18n/src/locales/id/translations.json (2)

1-20: Sidebar Translations Review
The "sidebar" block is neatly organized and covers a variety of navigation elements. One point to consider: while keys such as "projects", "pages", and "new_work_item" are properly localized (e.g., "Projek", "Halaman", "Item kerja baru"), terms like "workspace", "views", and "upgrade" remain in English. Please verify whether these should be translated (for example, "workspace" could be translated to "Ruang kerja") according to your localization guidelines.


1-2372: Overall File Structure and Localization Consistency
This new Indonesian translations file is comprehensive and follows a well-organized, nested JSON format covering a wide range of categories (e.g., "auth", "sidebar", "common", "project_settings", etc.). All dynamic placeholders (such as {seconds}, {count}, and {length}) are correctly maintained. A couple of suggestions:
• Ensure consistency across the file regarding whether certain English terms (such as "workspace" or "views") should be localized, given that similar keys in other sections are sometimes translated.
• It would be beneficial to have a native Indonesian speaker review the idiomatic expressions and terminology to ensure cultural appropriateness.
Overall, the file meets the requirements for extending language support and appears to integrate correctly with your i18n infrastructure.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 41447e5 and b22dbc2.

📒 Files selected for processing (5)
  • packages/i18n/src/constants/language.ts (1 hunks)
  • packages/i18n/src/locales/id/translations.json (1 hunks)
  • packages/i18n/src/locales/ro/translations.json (1 hunks)
  • packages/i18n/src/store/index.ts (1 hunks)
  • packages/i18n/src/types/language.ts (1 hunks)
🔇 Additional comments (5)
packages/i18n/src/constants/language.ts (1)

20-21: Excellent addition of new language options!

The Indonesian and Romanian languages have been properly added to the SUPPORTED_LANGUAGES array with their respective display names and language codes. This aligns perfectly with the PR objective of adding support for these languages.

packages/i18n/src/types/language.ts (1)

1-17: Good refactoring and language addition!

The TLanguage type has been effectively refactored from a single-line to multi-line format, improving readability. The Indonesian ("id") and Romanian ("ro") language codes have been correctly added to the union type, which ensures type safety when using these new language codes throughout the application.

packages/i18n/src/store/index.ts (1)

168-171: Great implementation of translation imports for the new languages!

The new language cases for Indonesian and Romanian have been correctly added to the importLanguageFile method, following the established pattern used for other languages. This ensures that the application can properly load translations for these languages when selected by the user.

packages/i18n/src/locales/ro/translations.json (1)

1-2372: Comprehensive Romanian translations added successfully!

The Romanian translation file is well-structured and includes translations for all the necessary UI elements, including sidebar navigation, authentication flows, project management terms, error messages, and more. The translations appear to be complete and follow the same JSON structure as other language files.

packages/i18n/src/locales/id/translations.json (1)

22-91: Authentication Translations Review
The nested "auth" section is well structured with clear subcategories for elements such as email, password, and error messages. The placeholders and error strings (e.g., "Email wajib diisi", "Email tidak valid", and "Password lemah") read naturally in Indonesian. It would be worthwhile to ensure that all placeholder values—for instance, in "resend_in": "Kirim ulang dalam {seconds} detik"—are consistent with how dynamic terms are injected elsewhere in the application.

@sriramveeraghanta sriramveeraghanta merged commit c125bc5 into preview Mar 26, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-romanian-and-indonesian-language-support branch March 26, 2025 14:40
@anmolsinghbhatia anmolsinghbhatia changed the title [WEB-3686] feat: romanian and indonesian language support [WEB-3689] feat: romanian and indonesian language support Mar 27, 2025
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
* Add ro Romanian Language locale (#6809)

* feat: add Indonesian language support (#6794)

Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>

* chore: core translation added and code refactor

---------

Co-authored-by: mnbro <107358316+mnbro@users.noreply.github.com>
Co-authored-by: Rasyid Ridho <rasyid@sekeco.id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants