[WEB-4123]feat: language support for sub-work item empty states#7092
[WEB-4123]feat: language support for sub-work item empty states#7092sriramveeraghanta merged 1 commit intopreviewfrom
Conversation
WalkthroughThis 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 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
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit 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. Note ⚡️ Faster reviews with cachingCodeRabbit 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 ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items
Comment Automatically Generated by Plane |
There was a problem hiding this comment.
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_filteruses “Aucun …”), consider:
- Rephrasing titles with the “Aucun … ne …” pattern instead of “Vous n'avez pas de …”.
- Using the imperative form (“effacez”) in descriptions rather than the infinitive (“effacer”).
- For readability, alphabetize the two new keys under
empty_state(list_filtersbeforesub_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
📒 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: Validatesub_list_filtersCzech translations.The new
sub_list_filtersmessages 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: Validatelist_filtersCzech translations.The
list_filtersentries correctly mirror the pattern used forsub_list_filters. The phrasing is clear and consistent with Czech localization standards.packages/i18n/src/locales/ko/translations.json (2)
1115-1119: Validatesub_list_filtersKorean translations.The
sub_list_filtersKorean text clearly instructs users when no sub‐work items match filters. It matches the English semantics and follows Korean UI copy conventions.
1120-1123: Validatelist_filtersKorean translations.The
list_filtersentries 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_filtersandlist_filtersentries undersub_work_item.empty_stateare 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_filtersandlist_filtersundersub_work_item.empty_statematches 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 addedempty_statesection undersub_work_itemcorrectly introducessub_list_filtersandlist_filterswith 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 insertedempty_stateblock undersub_work_itemwithsub_list_filtersandlist_filtersmirrors 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 newempty_stateblock undersub_work_itemcorrectly provides localized titles, descriptions, and action labels for both sub-list and list filters. Ensure that the same keys (sub_list_filtersandlist_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 importeduseTranslationfrom@plane/i18n(line 6), which is required for i18n support in this component.
45-45: Initialize the translation function
Callingconst { t } = useTranslation();(line 45) correctly retrieves the translation function for use in this component.
49-53: Destructure loader from issue detail store
AddingloaderalongsidesubIssuesByIssueIdandfiltersenables 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 forloader === "init-loader"displays aLoaderskeleton (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 witht("sub_work_item.empty_state.list_filters.title")andt("sub_work_item.empty_state.sub_list_filters.title")(lines 99–101) correctly localizes the empty state titles based onisSubWorkItems.
102-106: Use translation keys for empty state descriptions
The description strings now uset("sub_work_item.empty_state.list_filters.description")andt("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 newempty_stateblock undersub_work_itemcorrectly introducessub_list_filtersandlist_filterstranslations 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
Theempty_statesection undersub_work_itemhas been extended withsub_list_filtersandlist_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: Addedempty_statetranslations for filtered sub-work item views.The new
empty_stateblock undersub_work_itemis 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: Addedempty_statetranslations for filtered sub-work item views.The
empty_statesection undersub_work_itemis 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 keyssub_list_filtersandlist_filtersfollow 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" doneLength of output: 4076
Translation keys verified across all locales
The newempty_state.sub_list_filtersandempty_state.list_filtersentries are properly localized inidand exist in every othertranslations.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 newempty_stateblock undersub_work_itemcorrectly introducessub_list_filtersandlist_filterswithtitle,description, andactionkeys. 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 insertedempty_statesection undersub_work_itemcontainssub_list_filtersandlist_filtersentries withtitle,description, andactionkeys. 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/nullLength of output: 56
JSON syntax validated
The
pt-BR/translations.jsonfile parses without errors usingjq, 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"definesub_list_filtersandlist_filterskeys. 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/srcLength 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/localesLength 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 everypackages/i18n/src/locales/*/translations.json- UI code in
web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsxuses 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 newsub_list_filterskeys (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.
Thelist_filterssection’stitle,description, andactionare 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 forsub_work_item.empty_state.sub_list_filtersandsub_work_item.empty_state.list_filtersare 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.
Description
This update adds language support for sub-work items filters' empty states.
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
New Features
Refactor