[WEB-3545] feat: language translations#6762
Conversation
* 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>
WalkthroughThis 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
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
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
🪧 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 (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 AddedThis 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
📒 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
TLanguagetype 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.
There was a problem hiding this comment.
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
📒 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>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/i18n/src/types/language.ts (1)
1-6: Consider using an enum for better maintainabilityAs 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
📒 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)
There was a problem hiding this comment.
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
📒 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.
* 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>
Description
This PR includes following translation implementation:
Type of Change
References
[WEB-3545]
Summary by CodeRabbit
New Features
Bug Fixes