From 88e846582a557bdf01ab1c3424f39468810b16b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Gran=C3=A1t?= Date: Fri, 15 Nov 2024 13:41:03 +0100 Subject: [PATCH] fix: dashboard translations (#2697) [Closing](https://github.com/tolgee/management-other/issues/63) --- .../projects/dashboard/ProjectTotals.tsx | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/webapp/src/views/projects/dashboard/ProjectTotals.tsx b/webapp/src/views/projects/dashboard/ProjectTotals.tsx index 5c8c57fca0..f1874f4022 100644 --- a/webapp/src/views/projects/dashboard/ProjectTotals.tsx +++ b/webapp/src/views/projects/dashboard/ProjectTotals.tsx @@ -101,6 +101,9 @@ const StyledTileDescription = styled('div')` @container (max-width: 800px) { font-size: 14px; } + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; `; const StyledTileEdit = styled(Box)` @@ -210,8 +213,8 @@ export const ProjectTotals: React.FC<{ {Number(stats.taskCount).toLocaleString(locale)} - {t('project_dashboard_task_count', { - count: stats.taskCount, + {t('project_dashboard_task_count_plural', { + value: stats.taskCount, })} @@ -228,8 +231,8 @@ export const ProjectTotals: React.FC<{ {Number(stats.keyCount).toLocaleString(locale)} - {t('project_dashboard_key_count', 'Keys', { - count: stats.keyCount, + {t('project_dashboard_key_count_plural', 'Keys', { + value: stats.keyCount, })} @@ -238,8 +241,8 @@ export const ProjectTotals: React.FC<{ {Number(stats.baseWordsCount).toLocaleString(locale)} - {t('project_dashboard_base_words_count', 'Base words', { - count: stats.baseWordsCount, + {t('project_dashboard_base_words_count_plural', { + value: stats.baseWordsCount, })} @@ -256,7 +259,7 @@ export const ProjectTotals: React.FC<{ - {t('project_dashboard_translated_percent', 'Translated')} + {t('project_dashboard_translated_percent')} @@ -280,7 +283,11 @@ export const ProjectTotals: React.FC<{ {Number(stringsCount).toLocaleString(locale)} - {t('project_dashboard_strings_count')} + + {t('project_dashboard_strings_count_plural', { + value: Number(stringsCount), + })} + @@ -296,7 +303,9 @@ export const ProjectTotals: React.FC<{ {Number(stats.membersCount).toLocaleString(locale)} - {t('project_dashboard_member_count', 'Members')} + {t('project_dashboard_member_count_plural', { + value: Number(stats.membersCount), + })} {membersEditable && ( @@ -320,7 +329,9 @@ export const ProjectTotals: React.FC<{ {Number(stats.tagCount).toLocaleString(locale)} - {t('project_dashboard_tag_count', 'Tags')} + {t('project_dashboard_tag_count_plural', { + value: Number(stats.tagCount), + })}