Skip to content

armgit / plane

Public Imported from GitHub
0

🔥🔥🔥 Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

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

Vamsi Krishnaa3b9152a9bb7
diff --git a/packages/i18n/src/locales/cs/translations.json b/packages/i18n/src/locales/cs/translations.json
index f41ae90216..28109cd9d2 100644
--- a/packages/i18n/src/locales/cs/translations.json
+++ b/packages/i18n/src/locales/cs/translations.json
@@ -1108,6 +1108,18 @@
"remove": {
"success": "Podřízená pracovní položka úspěšně odebrána",
"error": "Chyba při odebírání podřízené položky"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Nemáte podřízené pracovní položky, které odpovídají použitým filtrům.",
+ "description": "Chcete-li zobrazit všechny podřízené pracovní položky, odstraňte všechny použité filtry.",
+ "action": "Odstranit filtry"
+ },
+ "list_filters": {
+ "title": "Nemáte pracovní položky, které odpovídají použitým filtrům.",
+ "description": "Chcete-li zobrazit všechny pracovní položky, odstraňte všechny použité filtry.",
+ "action": "Odstranit filtry"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/de/translations.json b/packages/i18n/src/locales/de/translations.json
index 857a08a8a7..1cc3707287 100644
--- a/packages/i18n/src/locales/de/translations.json
+++ b/packages/i18n/src/locales/de/translations.json
@@ -1108,6 +1108,18 @@
"remove": {
"success": "Untergeordnetes Arbeitselement erfolgreich entfernt",
"error": "Fehler beim Entfernen des untergeordneten Elements"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Sie haben keine untergeordneten Arbeitselemente, die den von Ihnen angewendeten Filtern entsprechen.",
+ "description": "Um alle untergeordneten Arbeitselemente anzuzeigen, entfernen Sie alle angewendeten Filter.",
+ "action": "Filter entfernen"
+ },
+ "list_filters": {
+ "title": "Sie haben keine Arbeitselemente, die den von Ihnen angewendeten Filtern entsprechen.",
+ "description": "Um alle Arbeitselemente anzuzeigen, entfernen Sie alle angewendeten Filter.",
+ "action": "Filter entfernen"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/en/translations.json b/packages/i18n/src/locales/en/translations.json
index e6202deb6e..c959108e0a 100644
--- a/packages/i18n/src/locales/en/translations.json
+++ b/packages/i18n/src/locales/en/translations.json
@@ -944,6 +944,18 @@
"remove": {
"success": "Sub-work item removed successfully",
"error": "Error removing sub-work item"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "You don't have sub-work items that match the filters you've applied.",
+ "description": "To see all sub-work items, clear all applied filters.",
+ "action": "Clear filters"
+ },
+ "list_filters": {
+ "title": "You don't have work items that match the filters you've applied.",
+ "description": "To see all work items, clear all applied filters.",
+ "action": "Clear filters"
+ }
}
},
"view": {
@@ -2284,4 +2296,4 @@
"previously_edited_by": "Previously edited by",
"edited_by": "Edited by"
}
-}
\ No newline at end of file
+}
diff --git a/packages/i18n/src/locales/es/translations.json b/packages/i18n/src/locales/es/translations.json
index c8f258385c..94f1819a48 100644
--- a/packages/i18n/src/locales/es/translations.json
+++ b/packages/i18n/src/locales/es/translations.json
@@ -1111,6 +1111,18 @@
"remove": {
"success": "Sub-elemento eliminado correctamente",
"error": "Error al eliminar el sub-elemento"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "No tienes sub-elementos de trabajo que coincidan con los filtros que has aplicado.",
+ "description": "Para ver todos los sub-elementos de trabajo, elimina todos los filtros aplicados.",
+ "action": "Eliminar filtros"
+ },
+ "list_filters": {
+ "title": "No tienes elementos de trabajo que coincidan con los filtros que has aplicado.",
+ "description": "Para ver todos los elementos de trabajo, elimina todos los filtros aplicados.",
+ "action": "Eliminar filtros"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/fr/translations.json b/packages/i18n/src/locales/fr/translations.json
index a92d64daa9..4f356f1491 100644
--- a/packages/i18n/src/locales/fr/translations.json
+++ b/packages/i18n/src/locales/fr/translations.json
@@ -1109,6 +1109,18 @@
"remove": {
"success": "Sous-élément de travail supprimé avec succès",
"error": "Erreur lors de la suppression du sous-élément de travail"
+ },
+ "empty_state": {
+ "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"
+ },
+ "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"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/id/translations.json b/packages/i18n/src/locales/id/translations.json
index f1fb2a827b..20b683c65f 100644
--- a/packages/i18n/src/locales/id/translations.json
+++ b/packages/i18n/src/locales/id/translations.json
@@ -1108,6 +1108,18 @@
"remove": {
"success": "Sub-item kerja berhasil dihapus",
"error": "Kesalahan saat menghapus sub-item kerja"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Anda tidak memiliki sub-item kerja yang cocok dengan filter yang Anda terapkan.",
+ "description": "Untuk melihat semua sub-item kerja, hapus semua filter yang diterapkan.",
+ "action": "Hapus filter"
+ },
+ "list_filters": {
+ "title": "Anda tidak memiliki item kerja yang cocok dengan filter yang Anda terapkan.",
+ "description": "Untuk melihat semua item kerja, hapus semua filter yang diterapkan.",
+ "action": "Hapus filter"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/it/translations.json b/packages/i18n/src/locales/it/translations.json
index 1311c625ed..5534d885c1 100644
--- a/packages/i18n/src/locales/it/translations.json
+++ b/packages/i18n/src/locales/it/translations.json
@@ -1107,6 +1107,18 @@
"remove": {
"success": "Sotto-elemento di lavoro rimosso con successo",
"error": "Errore nella rimozione del sotto-elemento di lavoro"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Non hai sotto-elementi di lavoro che corrispondono ai filtri che hai applicato.",
+ "description": "Per vedere tutti i sotto-elementi di lavoro, cancella tutti i filtri applicati.",
+ "action": "Cancella filtri"
+ },
+ "list_filters": {
+ "title": "Non hai elementi di lavoro che corrispondono ai filtri che hai applicato.",
+ "description": "Per vedere tutti gli elementi di lavoro, cancella tutti i filtri applicati.",
+ "action": "Cancella filtri"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/ja/translations.json b/packages/i18n/src/locales/ja/translations.json
index 70bcd1c8fc..a6f36a65b5 100644
--- a/packages/i18n/src/locales/ja/translations.json
+++ b/packages/i18n/src/locales/ja/translations.json
@@ -1109,6 +1109,18 @@
"remove": {
"success": "サブ作業項目を削除しました",
"error": "サブ作業項目の削除中にエラーが発生しました"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "適用されたフィルターに一致するサブ作業項目がありません。",
+ "description": "すべてのサブ作業項目を表示するには、すべての適用されたフィルターをクリアしてください。",
+ "action": "フィルターをクリア"
+ },
+ "list_filters": {
+ "title": "適用されたフィルターに一致する作業項目がありません。",
+ "description": "すべての作業項目を表示するには、すべての適用されたフィルターをクリアしてください。",
+ "action": "フィルターをクリア"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/ko/translations.json b/packages/i18n/src/locales/ko/translations.json
index eee2ffbf05..2858d729cb 100644
--- a/packages/i18n/src/locales/ko/translations.json
+++ b/packages/i18n/src/locales/ko/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "하위 작업 항목이 성공적으로 제거되었습니다",
"error": "하위 작업 항목 제거 중 오류 발생"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "적용된 필터에 일치하는 하위 작업 항목이 없습니다.",
+ "description": "모든 하위 작업 항목을 보려면 모든 적용된 필터를 지우세요.",
+ "action": "필터 지우기"
+ },
+ "list_filters": {
+ "title": "적용된 필터에 일치하는 작업 항목이 없습니다.",
+ "description": "모든 작업 항목을 보려면 모든 적용된 필터를 지우세요.",
+ "action": "필터 지우기"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/pl/translations.json b/packages/i18n/src/locales/pl/translations.json
index 7ff792a26f..d11005833f 100644
--- a/packages/i18n/src/locales/pl/translations.json
+++ b/packages/i18n/src/locales/pl/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "Podrzędny element pracy usunięto pomyślnie",
"error": "Błąd podczas usuwania elementu podrzędnego"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Nie masz elementów podrzędnych, które pasują do filtrów, które zastosowałeś.",
+ "description": "Aby zobaczyć wszystkie elementy podrzędne, wyczyść wszystkie zastosowane filtry.",
+ "action": "Wyczyść filtry"
+ },
+ "list_filters": {
+ "title": "Nie masz elementów pracy, które pasują do filtrów, które zastosowałeś.",
+ "description": "Aby zobaczyć wszystkie elementy pracy, wyczyść wszystkie zastosowane filtry.",
+ "action": "Wyczyść filtry"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/pt-BR/translations.json b/packages/i18n/src/locales/pt-BR/translations.json
index a5eb08a861..de630da974 100644
--- a/packages/i18n/src/locales/pt-BR/translations.json
+++ b/packages/i18n/src/locales/pt-BR/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "Sub-item de trabalho removido com sucesso",
"error": "Erro ao remover sub-item de trabalho"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Você não tem sub-itens de trabalho que correspondem aos filtros que você aplicou.",
+ "description": "Para ver todos os sub-itens de trabalho, limpe todos os filtros aplicados.",
+ "action": "Limpar filtros"
+ },
+ "list_filters": {
+ "title": "Você não tem itens de trabalho que correspondem aos filtros que você aplicou.",
+ "description": "Para ver todos os itens de trabalho, limpe todos os filtros aplicados.",
+ "action": "Limpar filtros"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/ro/translations.json b/packages/i18n/src/locales/ro/translations.json
index a88ef06093..f60a4881b5 100644
--- a/packages/i18n/src/locales/ro/translations.json
+++ b/packages/i18n/src/locales/ro/translations.json
@@ -1108,6 +1108,18 @@
"remove": {
"success": "Sub-activitatea a fost eliminată cu succes",
"error": "Eroare la eliminarea sub-activității"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Nu ai sub-elemente de lucru care corespund filtrelor pe care le-ai aplicat.",
+ "description": "Pentru a vedea toate sub-elementele de lucru, șterge toate filtrele aplicate.",
+ "action": "Șterge filtrele"
+ },
+ "list_filters": {
+ "title": "Nu ai elemente de lucru care corespund filtrelor pe care le-ai aplicat.",
+ "description": "Pentru a vedea toate elementele de lucru, șterge toate filtrele aplicate.",
+ "action": "Șterge filtrele"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/ru/translations.json b/packages/i18n/src/locales/ru/translations.json
index 4159cccd3d..564716529d 100644
--- a/packages/i18n/src/locales/ru/translations.json
+++ b/packages/i18n/src/locales/ru/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "Подэлемент успешно удален",
"error": "Ошибка удаления подэлемента"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "У вас нет подэлементов, которые соответствуют примененным фильтрам.",
+ "description": "Чтобы увидеть все подэлементы, очистите все примененные фильтры.",
+ "action": "Очистить фильтры"
+ },
+ "list_filters": {
+ "title": "У вас нет рабочих элементов, которые соответствуют примененным фильтрам.",
+ "description": "Чтобы увидеть все рабочие элементы, очистите все примененные фильтры.",
+ "action": "Очистить фильтры"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/sk/translations.json b/packages/i18n/src/locales/sk/translations.json
index f7093e59cb..60f2c21ca8 100644
--- a/packages/i18n/src/locales/sk/translations.json
+++ b/packages/i18n/src/locales/sk/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "Podriadená pracovná položka bola úspešne odstránená",
"error": "Chyba pri odstraňovaní podriadenej položky"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Nemáte podriadené pracovné položky, ktoré zodpovedajú použitým filtrom.",
+ "description": "Pre zobrazenie všetkých podriadených pracovných položiek vymažte všetky použité filtre.",
+ "action": "Vymazať filtre"
+ },
+ "list_filters": {
+ "title": "Nemáte pracovné položky, ktoré zodpovedajú použitým filtrom.",
+ "description": "Pre zobrazenie všetkých pracovných položiek vymažte všetky použité filtre.",
+ "action": "Vymazať filtre"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/tr-TR/translations.json b/packages/i18n/src/locales/tr-TR/translations.json
index de2cb9d7f2..cec11a9921 100644
--- a/packages/i18n/src/locales/tr-TR/translations.json
+++ b/packages/i18n/src/locales/tr-TR/translations.json
@@ -1111,6 +1111,18 @@
"remove": {
"success": "Alt iş öğesi başarıyla kaldırıldı",
"error": "Alt iş öğesi kaldırılırken hata oluştu"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Alt iş öğelerinizin filtreleriyle eşleşmiyor.",
+ "description": "Tüm alt iş öğelerini görmek için tüm uygulanan filtreleri temizleyin.",
+ "action": "Filtreleri temizle"
+ },
+ "list_filters": {
+ "title": "İş öğelerinizin filtreleriyle eşleşmiyor.",
+ "description": "Tüm iş öğelerini görmek için tüm uygulanan filtreleri temizleyin.",
+ "action": "Filtreleri temizle"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/ua/translations.json b/packages/i18n/src/locales/ua/translations.json
index 9be16b11d9..2a82df68f5 100644
--- a/packages/i18n/src/locales/ua/translations.json
+++ b/packages/i18n/src/locales/ua/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "Похідну робочу одиницю успішно вилучено",
"error": "Помилка під час вилучення похідної одиниці"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Ви не маєте похідних робочих одиниць, які відповідають застосованим фільтрам.",
+ "description": "Щоб побачити всі похідні робочі одиниці, очистіть всі застосовані фільтри.",
+ "action": "Очистити фільтри"
+ },
+ "list_filters": {
+ "title": "Ви не маєте робочих одиниць, які відповідають застосованим фільтрам.",
+ "description": "Щоб побачити всі робочі одиниці, очистіть всі застосовані фільтри.",
+ "action": "Очистити фільтри"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/vi-VN/translations.json b/packages/i18n/src/locales/vi-VN/translations.json
index 756eea3d97..418d96ac43 100644
--- a/packages/i18n/src/locales/vi-VN/translations.json
+++ b/packages/i18n/src/locales/vi-VN/translations.json
@@ -1109,6 +1109,18 @@
"remove": {
"success": "Đã xóa mục công việc con thành công",
"error": "Đã xảy ra lỗi khi xóa mục công việc con"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "Bạn không có mục công việc con nào phù hợp với các bộ lọc mà bạn đã áp dụng.",
+ "description": "Để xem tất cả các mục công việc con, hãy xóa tất cả các bộ lọc đã áp dụng.",
+ "action": "Xóa bộ lọc"
+ },
+ "list_filters": {
+ "title": "Bạn không có mục công việc nào phù hợp với các bộ lọc mà bạn đã áp dụng.",
+ "description": "Để xem tất cả các mục công việc, hãy xóa tất cả các bộ lọc đã áp dụng.",
+ "action": "Xóa bộ lọc"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/zh-CN/translations.json b/packages/i18n/src/locales/zh-CN/translations.json
index 8dbdb55233..8f8ca2d26f 100644
--- a/packages/i18n/src/locales/zh-CN/translations.json
+++ b/packages/i18n/src/locales/zh-CN/translations.json
@@ -1109,6 +1109,18 @@
"remove": {
"success": "子工作项移除成功",
"error": "移除子工作项时出错"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "您没有符合您应用的过滤器的子工作项。",
+ "description": "要查看所有子工作项,请清除所有应用的过滤器。",
+ "action": "清除过滤器"
+ },
+ "list_filters": {
+ "title": "您没有符合您应用的过滤器的工作项。",
+ "description": "要查看所有工作项,请清除所有应用的过滤器。",
+ "action": "清除过滤器"
+ }
}
},
"view": {
diff --git a/packages/i18n/src/locales/zh-TW/translations.json b/packages/i18n/src/locales/zh-TW/translations.json
index 53888c516a..472ba631c1 100644
--- a/packages/i18n/src/locales/zh-TW/translations.json
+++ b/packages/i18n/src/locales/zh-TW/translations.json
@@ -1110,6 +1110,18 @@
"remove": {
"success": "子工作事項移除成功",
"error": "移除子工作事項時發生錯誤"
+ },
+ "empty_state": {
+ "sub_list_filters": {
+ "title": "您沒有符合您應用過的過濾器的子工作事項。",
+ "description": "要查看所有子工作事項,請清除所有應用過的過濾器。",
+ "action": "清除過濾器"
+ },
+ "list_filters": {
+ "title": "您沒有符合您應用過的過濾器的工作事項。",
+ "description": "要查看所有工作事項,請清除所有應用過的過濾器。",
+ "action": "清除過濾器"
+ }
}
},
"view": {
diff --git a/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx b/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx
index 6b101829e7..c99f990864 100644
--- a/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx
+++ b/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx
@@ -3,6 +3,7 @@ import { observer } from "mobx-react";
// plane imports
import { ListFilter } from "lucide-react";
import { EIssueServiceType, EIssuesStoreType } from "@plane/constants";
+import { useTranslation } from "@plane/i18n";
import { GroupByColumnTypes, TIssue, TIssueServiceType, TSubIssueOperations } from "@plane/types";
// hooks
import { Button, Loader } from "@plane/ui";
@@ -41,10 +42,12 @@ export const SubIssuesListRoot: React.FC<Props> = observer((props) => {
storeType = EIssuesStoreType.PROJECT,
spacingLeft = 0,
} = props;
+ const { t } = useTranslation();
// store hooks
const {
subIssues: {
- subIssuesByIssueId, loader,
+ subIssuesByIssueId,
+ loader,
filters: { getSubIssueFilters, getGroupedSubWorkItems, getFilteredSubWorkItems, resetFilters },
},
} = useIssueDetail(issueServiceType);
@@ -77,15 +80,15 @@ export const SubIssuesListRoot: React.FC<Props> = observer((props) => {
const isSubWorkItems = issueServiceType === EIssueServiceType.ISSUES;
- if (loader === "init-loader") {
- return (
- <Loader className="space-y-2">
- {Array.from({ length: 5 }).map((_, index) => (
- <Loader.Item key={index} height="35px" width="100%" />
- ))}
- </Loader>
- );
- }
+ if (loader === "init-loader") {
+ return (
+ <Loader className="space-y-2">
+ {Array.from({ length: 5 }).map((_, index) => (
+ <Loader.Item key={index} height="35px" width="100%" />
+ ))}
+ </Loader>
+ );
+ }
return (
<div className="relative">
@@ -93,19 +96,19 @@ export const SubIssuesListRoot: React.FC<Props> = observer((props) => {
<SectionEmptyState
title={
!isSubWorkItems
- ? "You don't have work items that match the filters you've applied."
- : "You don't have sub-work items that match the filters you've applied."
+ ? t("sub_work_item.empty_state.list_filters.title")
+ : t("sub_work_item.empty_state.sub_list_filters.title")
}
description={
!isSubWorkItems
- ? "To see all work items, clear all applied filters."
- : "To see all sub-work items, clear all applied filters."
+ ? t("sub_work_item.empty_state.list_filters.description")
+ : t("sub_work_item.empty_state.sub_list_filters.description")
}
icon={<ListFilter />}
customClassName={storeType !== EIssuesStoreType.EPIC ? "border-none" : ""}
actionElement={
<Button variant="neutral-primary" size="sm" onClick={() => resetFilters(rootIssueId)}>
- Clear filters
+ {t("sub_work_item.empty_state.list_filters.action")}
</Button>
}
/>