Skip to content

[WEB-4123]feat: language support for sub-work item empty states#7092

Merged
sriramveeraghanta merged 1 commit intopreviewfrom
feat-language_support_empty_state
May 23, 2025
Merged

[WEB-4123]feat: language support for sub-work item empty states#7092
sriramveeraghanta merged 1 commit intopreviewfrom
feat-language_support_empty_state

Conversation

@vamsikrishnamathala
Copy link
Member

@vamsikrishnamathala vamsikrishnamathala commented May 20, 2025

Description

This update adds language support for sub-work items filters' empty states.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • New Features

    • Added localized empty state messages for filtered sub-work items and work items in multiple languages, enhancing the user interface for international users.
  • Refactor

    • Updated the empty state component to use translation keys instead of hardcoded English text, providing a fully localized experience.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Walkthrough

This update introduces new localized strings for empty state messages related to filtered sub-work items and work items across multiple language JSON files. The UI component displaying these messages is refactored to use the new internationalized strings via the useTranslation hook, replacing previously hardcoded English text.

Changes

File(s) Change Summary
packages/i18n/src/locales/cs/translations.json
.../de/translations.json
.../en/translations.json
.../es/translations.json
.../fr/translations.json
.../id/translations.json
.../it/translations.json
.../ja/translations.json
.../ko/translations.json
.../pl/translations.json
.../pt-BR/translations.json
.../ro/translations.json
.../ru/translations.json
.../sk/translations.json
.../tr-TR/translations.json
.../ua/translations.json
.../vi-VN/translations.json
.../zh-CN/translations.json
.../zh-TW/translations.json
Added new empty_state objects under sub_work_item with sub_list_filters and list_filters keys, each containing title, description, and action strings for empty state messaging in various languages. No existing keys were altered or removed.
web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx Replaced hardcoded English empty state UI text with calls to the translation function t() using new translation keys. Integrated the useTranslation hook from @plane/i18n. Loader rendering indentation adjusted for consistency. No logic or control flow changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI Component
    participant i18n Module

    User->>UI Component: Applies filters to sub-work items list
    UI Component->>UI Component: Checks if filtered list is empty
    alt List is empty
        UI Component->>i18n Module: Fetch translation for empty state (title, description, action)
        i18n Module-->>UI Component: Returns localized strings
        UI Component-->>User: Displays localized empty state message and action
    else List is not empty
        UI Component-->>User: Displays filtered sub-work items
    end
Loading

Poem

🐇
Hopping through code with nimble delight,
Now empty states speak in languages bright!
From Czech to Korean, each message anew,
Filters are cleared with a click or two.
The world feels smaller, translation in tow—
Multilingual bunnies, ready to go!
🌍✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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.

@makeplane
Copy link

makeplane bot commented May 20, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

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: 2

🧹 Nitpick comments (1)
packages/i18n/src/locales/fr/translations.json (1)

1111-1123: Ensure translation style and key ordering consistency
To align with existing French translations (for example, project_issues.issues_empty_filter uses “Aucun …”), consider:

  1. Rephrasing titles with the “Aucun … ne …” pattern instead of “Vous n'avez pas de …”.
  2. Using the imperative form (“effacez”) in descriptions rather than the infinitive (“effacer”).
  3. For readability, alphabetize the two new keys under empty_state (list_filters before sub_list_filters).

Proposed diff:

   "empty_state": {
-    "sub_list_filters": {
+    "list_filters": {
       "title": "Vous n'avez pas d'éléments de travail qui correspondent aux filtres que vous avez appliqués.",
       "description": "Pour voir tous les éléments de travail, effacer tous les filtres appliqués.",
       "action": "Effacer les filtres"
     },
-    "list_filters": {
+    "sub_list_filters": {
       "title": "Vous n'avez pas de sous-éléments de travail qui correspondent aux filtres que vous avez appliqués.",
       "description": "Pour voir tous les sous-éléments de travail, effacer tous les filtres appliqués.",
       "action": "Effacer les filtres"
     }
   }

And update the copy for consistency:

-   "title": "Vous n'avez pas de sous-éléments de travail qui correspondent aux filtres que vous avez appliqués.",
-   "description": "Pour voir tous les sous-éléments de travail, effacer tous les filtres appliqués.",
+   "title": "Aucun sous-élément de travail ne correspond aux filtres appliqués",
+   "description": "Pour voir tous les sous-éléments de travail, effacez tous les filtres appliqués",
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 2f4aa84 and d63277e.

📒 Files selected for processing (20)
  • packages/i18n/src/locales/cs/translations.json (1 hunks)
  • packages/i18n/src/locales/de/translations.json (1 hunks)
  • 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 (1 hunks)
  • packages/i18n/src/locales/id/translations.json (1 hunks)
  • packages/i18n/src/locales/it/translations.json (1 hunks)
  • packages/i18n/src/locales/ja/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/pt-BR/translations.json (1 hunks)
  • packages/i18n/src/locales/ro/translations.json (1 hunks)
  • packages/i18n/src/locales/ru/translations.json (1 hunks)
  • packages/i18n/src/locales/sk/translations.json (1 hunks)
  • packages/i18n/src/locales/tr-TR/translations.json (1 hunks)
  • packages/i18n/src/locales/ua/translations.json (1 hunks)
  • packages/i18n/src/locales/vi-VN/translations.json (1 hunks)
  • packages/i18n/src/locales/zh-CN/translations.json (1 hunks)
  • packages/i18n/src/locales/zh-TW/translations.json (1 hunks)
  • web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx (3)
packages/i18n/src/hooks/use-translation.ts (1)
  • useTranslation (23-35)
web/core/components/empty-state/section-empty-state-root.tsx (1)
  • SectionEmptyState (14-31)
packages/i18n/src/store/index.ts (1)
  • t (233-254)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Analyze (python)
🔇 Additional comments (27)
packages/i18n/src/locales/cs/translations.json (2)

1111-1115: Validate sub_list_filters Czech translations.

The new sub_list_filters messages accurately convey the empty‐state guidance for filtered sub‐work items and align with the English source and other locales. Grammar and terminology (“podřízené pracovní položky”, “filtry”) are consistent.


1116-1120: Validate list_filters Czech translations.

The list_filters entries correctly mirror the pattern used for sub_list_filters. The phrasing is clear and consistent with Czech localization standards.

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

1115-1119: Validate sub_list_filters Korean translations.

The sub_list_filters Korean text clearly instructs users when no sub‐work items match filters. It matches the English semantics and follows Korean UI copy conventions.


1120-1123: Validate list_filters Korean translations.

The list_filters entries accurately mirror the sub‐list variant for top‐level work items. Terminology (“작업 항목”, “필터 지우기”) is consistent and user-friendly.

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

1111-1121: New German empty-state keys follow existing structure.

The sub_list_filters and list_filters entries under sub_work_item.empty_state are structured consistently with other locale files and mirror the English keys. Please verify that the UI component references these exact keys to enable proper localization.

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

946-956: New English empty-state translations are correctly defined.

The addition of sub_list_filters and list_filters under sub_work_item.empty_state matches the pattern used across locales. Confirm that the component uses these keys so that users see the localized messages when filters yield no results.

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

1111-1123: New filtered‐empty‐state translations look good.
The added empty_state section under sub_work_item correctly introduces sub_list_filters and list_filters with appropriate Polish titles, descriptions, and action labels. Structure and key naming align with other locales’ patterns.

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

1111-1123: Filtered‐empty‐state entries are consistent and accurate.
The inserted empty_state block under sub_work_item with sub_list_filters and list_filters mirrors the expected JSON schema. Japanese translations convey the correct UI messaging.

packages/i18n/src/locales/tr-TR/translations.json (1)

1113-1125: Add filtered empty state translations
This new empty_state block under sub_work_item correctly provides localized titles, descriptions, and action labels for both sub-list and list filters. Ensure that the same keys (sub_list_filters and list_filters) are added consistently across all other locale files to prevent missing translations.

web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx (6)

4-7: Import the translation hook
You've imported useTranslation from @plane/i18n (line 6), which is required for i18n support in this component.


45-45: Initialize the translation function
Calling const { t } = useTranslation(); (line 45) correctly retrieves the translation function for use in this component.


49-53: Destructure loader from issue detail store
Adding loader alongside subIssuesByIssueId and filters enables tracking of the initial loading state, which is used below to render a skeleton. This improves UX during data fetch.


83-91: Render a skeleton for the "init-loader" state
The new conditional block for loader === "init-loader" displays a Loader skeleton (lines 83–91), providing a better loading experience. Consider whether additional loader states (e.g., error or empty) also need distinct handling, but the current implementation addresses the initial load.


95-101: Use translation keys for empty state titles
Replacing hardcoded text with t("sub_work_item.empty_state.list_filters.title") and t("sub_work_item.empty_state.sub_list_filters.title") (lines 99–101) correctly localizes the empty state titles based on isSubWorkItems.


102-106: Use translation keys for empty state descriptions
The description strings now use t("sub_work_item.empty_state.list_filters.description") and t("sub_work_item.empty_state.sub_list_filters.description") (lines 104–106), ensuring full localization.

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

1112-1124: Add localized empty states for sub-work item filters
The new empty_state block under sub_work_item correctly introduces sub_list_filters and list_filters translations for filtered empty states. The nesting, key names, and Russian text align with existing locale patterns and accurately instruct users to clear filters. No structural or syntax issues detected.

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

1112-1124: Add Slovak translations for empty filter states
The empty_state section under sub_work_item has been extended with sub_list_filters and list_filters, using clear Slovak phrasing that matches the messaging in other locales. The structure and indentation are consistent, and no errors are apparent.

packages/i18n/src/locales/zh-TW/translations.json (1)

1113-1124: Approve: Added empty_state translations for filtered sub-work item views.

The new empty_state block under sub_work_item is correctly structured, matches the pattern used in other locales, and fulfills the PR objective of providing localized messages when no results match the applied filters. JSON syntax is valid and keys (sub_list_filters, list_filters, action) are consistent.

packages/i18n/src/locales/vi-VN/translations.json (1)

1112-1123: Approve: Added empty_state translations for filtered sub-work item views.

The empty_state section under sub_work_item is inserted correctly, matching the structure used across all locales. The keys (sub_list_filters, list_filters, action) are consistent with the other translations, and the JSON remains syntactically valid.

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

1110-1122:

Details

✅ Verification successful

New empty_state translations for sub-work-items are properly localized and syntactically correct.
The keys sub_list_filters and list_filters follow the established structure and the Indonesian strings accurately convey the message and action.

To ensure consistency across all locales, you can verify that these new keys exist in every translation file:


🏁 Script executed:

#!/bin/bash
# Verify translation keys across all locale files
for file in packages/i18n/src/locales/**/translations.json; do
  grep -q '"sub_list_filters"' "$file" || echo "❌ Missing sub_list_filters in $file"
  grep -q '"list_filters"' "$file"   || echo "❌ Missing list_filters in $file"
done

Length of output: 4076


Translation keys verified across all locales
The new empty_state.sub_list_filters and empty_state.list_filters entries are properly localized in id and exist in every other translations.json—no missing keys detected.

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

1111-1122: Add Romanian translations for sub-work-item empty states
The new empty_state block under sub_work_item correctly introduces sub_list_filters and list_filters with title, description, and action keys. JSON syntax is valid and the key names align with other locale files.

packages/i18n/src/locales/zh-CN/translations.json (1)

1111-1123: Add zh-CN translations for sub-work-item empty states
The newly inserted empty_state section under sub_work_item contains sub_list_filters and list_filters entries with title, description, and action keys. Structure and naming are consistent with the Romanian and other locales.

packages/i18n/src/locales/pt-BR/translations.json (2)

1112-1113:

Details

✅ Verification successful

Verify JSON syntax correctness after adding new keys.

You added a comma on the closing brace of the "remove" block to introduce the "empty_state" property. Please ensure this comma is present in the actual file and that the overall JSON remains valid (no stray trailing commas elsewhere).

You can validate the file with:


🏁 Script executed:

jq . packages/i18n/src/locales/pt-BR/translations.json > /dev/null

Length of output: 56


JSON syntax validated

The pt-BR/translations.json file parses without errors using jq, confirming that the comma insertion and overall JSON structure are correct. No further action is needed.


1113-1123:

Details

✅ Verification successful

Confirm translation key consistency and usage.

The newly added "empty_state" entries under "sub_work_item" define sub_list_filters and list_filters keys. Make sure the UI code uses these exact keys (t('sub_work_item.empty_state.sub_list_filters.title'), etc.) and that all other locale files received the same updates to avoid missing translations.

To verify across your locale directories:


🏁 Script executed:

rg "sub_work_item\.empty_state\.(sub_list_filters|list_filters)" -n packages/i18n/src

Length of output: 87


🏁 Script executed:

#!/bin/bash
# Verify that the new translation keys exist across all locale JSON files
rg '"sub_list_filters"' -n packages/i18n/src/locales
rg '"list_filters"'     -n packages/i18n/src/locales

Length of output: 3097


🏁 Script executed:

#!/bin/bash
# Verify that the UI code references the new translation keys
rg "sub_work_item\.empty_state\.sub_list_filters" -n .
rg "sub_work_item\.empty_state\.list_filters" -n .

Length of output: 889


All new translation keys are present and correctly referenced

Verified that

  • "sub_list_filters" and "list_filters" entries exist in every packages/i18n/src/locales/*/translations.json
  • UI code in web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx uses the exact keys (t('sub_work_item.empty_state.sub_list_filters.title'), etc.)

No further action required.

packages/i18n/src/locales/ua/translations.json (2)

1113-1117: Approve Ukrainian translations for filtered sub-work item empty state.
The new sub_list_filters keys (title, description, action) accurately reflect the English intent and follow the existing structure in other locales. The phrasing is clear and grammatically correct.


1119-1122: Approve Ukrainian translations for filtered work item empty state.
The list_filters section’s title, description, and action are consistent with the UI’s messaging and align with translations in other languages. Excellent consistency.

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

1109-1120: Validate new empty_state translation keys for sub-work-item filters
The Italian translations for sub_work_item.empty_state.sub_list_filters and sub_work_item.empty_state.list_filters are properly localized and the JSON syntax is correct. Please verify that these key names and structure exactly match the English locale (en/translations.json) and that equivalent entries have been added to all other language files.

@sriramveeraghanta sriramveeraghanta merged commit a3b9152 into preview May 23, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-language_support_empty_state branch May 23, 2025 10:06
al-jaber-nishad pushed a commit to Xinotrix-Home/task-and-meeting-management that referenced this pull request May 27, 2025
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.

4 participants