Skip to content

Comments

[WEB-3545] feat: language translations#6762

Merged
sriramveeraghanta merged 7 commits intopreviewfrom
feat-core-translations
Mar 18, 2025
Merged

[WEB-3545] feat: language translations#6762
sriramveeraghanta merged 7 commits intopreviewfrom
feat-core-translations

Conversation

@anmolsinghbhatia
Copy link
Collaborator

@anmolsinghbhatia anmolsinghbhatia commented Mar 17, 2025

Description

This PR includes following translation implementation:

  • Slovenčina
  • Deutsch
  • Українська
  • Polski
  • 한국어
  • Traditional Chinese

Type of Change

  • Feature

References

[WEB-3545]

Summary by CodeRabbit

  • New Features

    • Expanded localization with support for eight additional languages: Traditional Chinese, Slovak, German, Ukrainian, Polish, and Korean.
    • Introduced comprehensive language packs for Traditional Chinese, German, Korean, Polish, and Slovak.
    • Updated Czech translations for improved clarity.
    • Refined UI text in project pages with updated labels for a more consistent user experience.
  • Bug Fixes

    • Corrected translation key usage for page titles in project cycles.

NavyStack and others added 3 commits March 17, 2025 12:49
* feat(translations): init Korean translation

Co-authored-by: NavyStack <navystack@askfront.com>
Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>

* feat(translations): add rough Korean translation

Co-authored-by: NavyStack <navystack@askfront.com>
Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>

---------

Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>
…tion (#6743)

* feat(translation): add Slovak translation

* feat(translation): add Slovak translation for workspace

* feat(translation): improved Slovak translation for views

* feat(translation): add Deutsch translation

* feat(translation): add Ukrainian translation

* feat(translation): add Polish translation

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2025

Walkthrough

This pull request enhances the localization functionality by expanding the supported languages. It adds five new language options across various parts of the codebase, including constants, type definitions, translation files for multiple locales, and logic for importing language files. Additionally, minor adjustments such as updating string delimiters in import statements and changing a translation key in a page component are included. No core functionality changes occur.

Changes

File(s) Change Summary
packages/i18n/src/constants/language.ts Updated SUPPORTED_LANGUAGES to include Traditional Chinese ("zh-TW"), Slovak ("sk"), German ("de"), Ukrainian ("ua"), Polish ("pl"), and Korean ("ko"). Changed Chinese label from "中文" to "简体中文" and added "繁體中文" for Traditional Chinese.
packages/i18n/src/hooks/use-translation.ts Updated string delimiters from single quotes to double quotes in import statements and an error message.
packages/i18n/src/locales/…/translations.json (cs, de, ko, pl, sk, zh-TW) Updated Czech translation for "workspace" and added new translation JSON files for German, Korean, Polish, Slovak, and Traditional Chinese languages.
packages/i18n/src/store/index.ts Expanded importLanguageFile method to support importing translation files for the newly added languages.
packages/i18n/src/types/language.ts Expanded the TLanguage union type to include the new language codes.
web/app/.../page.tsx Changed the page title translation key from "cycles.label" to "common.cycles".

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant C as LanguageSelector Component
    participant S as TranslationStore
    participant F as Translation JSON File

    U->>C: Select language (sk, de, ua, pl, ko, zh-TW)
    C->>S: Request translation file for selected language
    S->>F: Import corresponding translation JSON
    F-->>S: Return translation data
    S-->>C: Provide translations
    C-->>U: Update UI with new language strings
Loading

Possibly related PRs

Suggested labels

🌟enhancement

Suggested reviewers

  • sriramveeraghanta
  • prateekshourya29

Poem

Oh, I'm a bunny coding away,
Hopping through languages night and day.
New words bloom like carrots fresh and bright,
Translating dreams from morning to night.
With each leap and nibble, I cheer in delight!
🐰💻 Hop on, world—our code feels just right!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

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

@pushya22 pushya22 linked an issue Mar 17, 2025 that may be closed by this pull request
1 task
@anmolsinghbhatia anmolsinghbhatia marked this pull request as ready for review March 17, 2025 11:40
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/ko/translations.json (1)

1-2372: Overall, the Korean Translations File is Comprehensive and Well-Structured
This new JSON file adds extensive Korean translations for a wide range of interface elements—from navigation and authentication to notifications, dashboards, forms, and more. The hierarchical structure and key naming conventions follow the project’s localization standards consistently.

A couple of recommendations for maintainability:
• Verify periodically that any new keys introduced in the default language are also reflected here.
• As the translations grow over time, consider modularizing the file into several smaller files (by feature or section) to simplify future updates and reviews.

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

1-2324: Comprehensive Polish Translations File Added

This new JSON file provides a complete set of Polish translations for the application’s UI elements and messages. The file is well structured; the keys are logically grouped (e.g., "sidebar", "auth", "sign_in", "common", etc.) which is consistent with the format used in other locale files.

Key Points for Verification:

  • Key Consistency & Completeness: Ensure that every translation key used across the app (as defined in the SUPPORTED_LANGUAGES constant and loaded by the TranslationStore) is covered in this file so that no UI element is left without a Polish translation.
  • ICU/Plural Syntax: Some segments (e.g., those using ICU pluralization syntax) should be double-checked for consistency with other locales. Although no explicit discrepancies were noted, verifying these against your spec or other locale files would help maintain uniformity.
  • Validation & Linting: Consider integrating a JSON schema or linter for localization files to catch potential typos or missing keys early. This could be automated as part of your CI process.
  • Accuracy & Tone: Review the translated phrases to confirm that they accurately reflect the intended meaning and tone from the source language for a seamless user experience.

Overall, the translations appear comprehensive and are a solid enhancement for Polish-speaking users.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d4991b9 and 68a49e9.

📒 Files selected for processing (10)
  • packages/i18n/src/constants/language.ts (1 hunks)
  • packages/i18n/src/hooks/use-translation.ts (2 hunks)
  • packages/i18n/src/locales/cs/translations.json (1 hunks)
  • packages/i18n/src/locales/de/translations.json (1 hunks)
  • packages/i18n/src/locales/ko/translations.json (1 hunks)
  • packages/i18n/src/locales/pl/translations.json (1 hunks)
  • packages/i18n/src/locales/sk/translations.json (1 hunks)
  • packages/i18n/src/store/index.ts (1 hunks)
  • packages/i18n/src/types/language.ts (1 hunks)
  • web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(list)/page.tsx (1 hunks)
🔇 Additional comments (14)
packages/i18n/src/constants/language.ts (1)

14-18: Great job adding the new language options!

The addition of Slovak, German, Ukrainian, Polish, and Korean languages aligns perfectly with the PR objectives. The implementation is consistent with the existing pattern.

web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(list)/page.tsx (1)

41-41: Translation key update looks good.

Changed from using "cycles.label" to "common.cycles" for better consistency across the application.

packages/i18n/src/hooks/use-translation.ts (1)

1-5: Quote style standardization looks good.

Consistent use of double quotes instead of single quotes improves code style consistency.

Also applies to: 26-26

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

9-9: Proper Czech translation for "workspace".

Good improvement to translate "workspace" to "Pracovní prostor" in the Czech locale file, enhancing the localization experience.

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

156-165: Great implementation of additional language support!

The addition of new case statements for Slovak, German, Ukrainian, Polish, and Korean languages follows the established pattern perfectly and aligns with the PR objectives.

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

1-2324: Well-structured German translation file!

The new German translation file is comprehensive and follows the expected JSON structure. It includes translations for all required UI elements including sidebar components, authentication flows, error messages, and application terminology.

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

1-1: Type definition correctly updated to support new languages!

The TLanguage type has been properly extended to include the new language codes for Slovak, German, Ukrainian, Polish, and Korean, ensuring type safety throughout the application when working with these languages.

packages/i18n/src/locales/sk/translations.json (4)

1-20: Sidebar Translations are Clear and Consistent
The Slovak translations for the sidebar items (e.g., "Projekty", "Stránky", "Nová pracovná položka", etc.) are concise and match the expected labels in the UI. No issues were found in this segment.


21-90: Authentication and Error Messages Section is Well-Structured
The nested structure under the "auth" key properly organizes labels, placeholders, and error messages (for instance, the "email" and "password" sections). The translations (e.g., "E-mail je povinný", "Heslo je slabé") read naturally in Slovak and align with the intended meanings.


170-180: Common UI Labels and Buttons Translation Accuracy
The translations for common actions such as "Odoslať", "Zrušiť", "Načítavanie", "Chyba", and "Úspech" are accurate and consistent with the other locale files. This uniformity is key for a smooth localization experience.


1-2368: Comprehensive Translation File Review
This new Slovak translation file is comprehensive and mirrors the structure of existing locale files. All key sections—ranging from sidebar navigation and authentication flows to notifications, error messages, and project-related labels—are included. The file is well-organized and should integrate smoothly with the localization system. Please ensure that any future updates remain in sync with the keys and structure defined in other locale files for consistency across the application.

packages/i18n/src/locales/ko/translations.json (3)

1-20: Sidebar Translations are Clear and Consistent
The sidebar section provides concise translations for navigation elements (e.g., "프로젝트", "페이지", "홈", etc.) that are consistent with the UI’s design patterns. Make sure these keys match those in other locale files.


22-170: Comprehensive Auth Section Translations
The "auth" section is well organized, covering labels, placeholders, error messages, and toast notifications related to authentication (login, sign-up, password management, etc.). Verify that all keys here match the ones expected by the UI components for consistency across languages.


172-182: Basic UI Texts Consistently Translated
Common UI strings such as "제출", "취소", "로딩 중", "오류", "성공", "경고", "정보", "닫기", "예", "아니오", and "확인" are succinctly translated. These core terms look correct; ensure they remain in sync with their counterparts in other locales.

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/sk/translations.json (2)

1-20: Sidebar Translations – Clear and Concise
The keys under the "sidebar" section (lines 2–19) provide straightforward and concise Slovak translations for navigation items such as "Projekty," "Stránky," and "Upgrade." The wording is clear and consistent with typical UI labels.


1-2369: Overall JSON Structure and Completeness of Slovak Translations
This entirely new translations file is impressively comprehensive, covering a wide range of UI components—from sidebar items, authentication, notifications, and error messages to detailed domain-specific texts (e.g., project settings, cycle details, and dashboard messages). The nested organization is logical, and the use of placeholders (e.g., {seconds}, {count}, {entity}) adheres to common best practices across localization files. As a follow-up, please consider a review by a native Slovak speaker to fine-tune any nuances and ensure perfect linguistic accuracy.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 68a49e9 and b080d9a.

📒 Files selected for processing (1)
  • packages/i18n/src/locales/sk/translations.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Analyze (python)
🔇 Additional comments (2)
packages/i18n/src/locales/sk/translations.json (2)

21-90: Auth Block Translations – Accurate Terminology and Structure
Within the "auth" section (lines 21–90), the structure covers multiple nested objects (e.g., "common", "email", "password"). The labels, placeholders, and error messages (such as "E-mail je povinný" and "E-mail je neplatný") appear well phrased for a Slovak-speaking audience. Ensure that these messages align with the terminology used in other locale files for consistency.


86-90: Dynamic Placeholder Validation
The key "resend_in": "Znova odoslať za {seconds} sekúnd" (around lines 87–89) correctly uses a dynamic placeholder. Please verify at runtime that the substitution of {seconds} is performed consistently with other language files and that the format (singular/plural) applies correctly in all contexts.

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
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: 1

🧹 Nitpick comments (1)
packages/i18n/src/types/language.ts (1)

1-6: Consider using an enum for better maintainability

As the number of supported languages grows, maintaining a union type might become cumbersome. Consider using an enum instead, which would provide better type safety and make it easier to add new languages in the future.

-export type TLanguage = "en" | "fr" | "es" | "ja" | "zh-CN" | "zh-TW" | "ru" | "it" | "cs" | "sk" | "de" | "ua" | "pl" | "ko";
+export enum Language {
+  English = "en",
+  French = "fr",
+  Spanish = "es",
+  Japanese = "ja",
+  ChineseSimplified = "zh-CN",
+  ChineseTraditional = "zh-TW",
+  Russian = "ru",
+  Italian = "it",
+  Czech = "cs",
+  Slovak = "sk",
+  German = "de",
+  Ukrainian = "uk", // Note: changed from "ua" to "uk"
+  Polish = "pl",
+  Korean = "ko"
+}
+
+export type TLanguage = keyof typeof Language;

 export interface ILanguageOption {
   label: string;
-  value: TLanguage;
+  value: Language;
 }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b080d9a and ef71294.

📒 Files selected for processing (4)
  • packages/i18n/src/constants/language.ts (1 hunks)
  • packages/i18n/src/locales/zh-TW/translations.json (1 hunks)
  • packages/i18n/src/store/index.ts (1 hunks)
  • packages/i18n/src/types/language.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/i18n/src/locales/zh-TW/translations.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/i18n/src/store/index.ts
  • packages/i18n/src/constants/language.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)

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/zh-TW/translations.json (2)

1-50: Consistency of Translation Keys and Placeholders
The keys and placeholders (for example, {seconds} and variable interpolation patterns like {count, plural, ...}) are used consistently in the initial sections. Please verify that these patterns match those in other locale files to ensure uniform behavior across translations.


51-2372: Comprehensiveness and Maintainability
This file offers a full set of translated strings for various UI components, which will greatly enhance the localization for Traditional Chinese (zh-TW) users. Given the file’s large size, it may be beneficial in the future to split the translations into smaller, more modular files (for example, one per major section) to simplify maintenance and updates. Additionally, please double-check the translation quality with native speakers to confirm cultural and contextual accuracy.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ef71294 and 267ab27.

📒 Files selected for processing (1)
  • packages/i18n/src/locales/zh-TW/translations.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/i18n/src/locales/zh-TW/translations.json (1)

1-2372: Overall JSON Structure and Formatting
The new translations JSON file is very comprehensive and well-organized into nested sections (e.g., "sidebar", "auth", "home", etc.). Everything appears to be valid JSON, but it is a good practice to run a JSON linter as an extra check for any accidental syntax mishaps.

@sriramveeraghanta sriramveeraghanta merged commit e339b7a into preview Mar 18, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-core-translations branch March 18, 2025 08:05
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
* feat(translations): add Korean translation (#6755)

* feat(translations): init Korean translation

Co-authored-by: NavyStack <navystack@askfront.com>
Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>

* feat(translations): add rough Korean translation

Co-authored-by: NavyStack <navystack@askfront.com>
Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>

---------

Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>

* feat(translations): add Slovak, Deutsch, Ukrainian and Polish translation (#6743)

* feat(translation): add Slovak translation

* feat(translation): add Slovak translation for workspace

* feat(translation): improved Slovak translation for views

* feat(translation): add Deutsch translation

* feat(translation): add Ukrainian translation

* feat(translation): add Polish translation

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>

* fix: project cycle translations

* fix: build error

* feat: Add zh-TW Traditional Chinese locale (#6764)

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>

* chore: zh-TW core translation updated

---------

Co-authored-by: NavyStack <navystack@askfront.com>
Co-authored-by: FVOCI <150913557+fvoci@users.noreply.github.com>
Co-authored-by: Ján Regeš <jan.reges@gmail.com>
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org>
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.

[bug]: Missing translation (?)

6 participants