From f63fc921969903528d16708de6ce0ecd6e2b08fa Mon Sep 17 00:00:00 2001 From: AYUSHKUMAR_21JE0209 <103947228+AyushKumar123456789@users.noreply.github.com> Date: Sun, 9 Feb 2025 02:46:56 +0530 Subject: [PATCH] fix: "Status" column values in "Custom Status" page table not translated (#34857) Co-authored-by: yash-rajpal Co-authored-by: Yash Rajpal <58601732+yash-rajpal@users.noreply.github.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Gabriel Casals <83978645+casalsgh@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Felipe Scuciatto Co-authored-by: Douglas Fabris --- .changeset/seven-otters-worry.md | 5 +++++ .../CustomUserStatusTable/CustomUserStatusRow.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/seven-otters-worry.md diff --git a/.changeset/seven-otters-worry.md b/.changeset/seven-otters-worry.md new file mode 100644 index 00000000000..5aa24372d22 --- /dev/null +++ b/.changeset/seven-otters-worry.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes an issue where custom status' values in the custom status page table were not being properly translated diff --git a/apps/meteor/client/views/admin/customUserStatus/CustomUserStatusTable/CustomUserStatusRow.tsx b/apps/meteor/client/views/admin/customUserStatus/CustomUserStatusTable/CustomUserStatusRow.tsx index 2b5c68deef5..667c7d815c4 100644 --- a/apps/meteor/client/views/admin/customUserStatus/CustomUserStatusTable/CustomUserStatusRow.tsx +++ b/apps/meteor/client/views/admin/customUserStatus/CustomUserStatusTable/CustomUserStatusRow.tsx @@ -1,5 +1,6 @@ import type { IUserStatus } from '@rocket.chat/core-typings'; import type { CSSProperties, ReactElement } from 'react'; +import { useTranslation } from 'react-i18next'; import { GenericTableRow, GenericTableCell } from '../../../../components/GenericTable'; import MarkdownText from '../../../../components/MarkdownText'; @@ -13,6 +14,7 @@ type CustomUserStatusRowProps = { const CustomUserStatusRow = ({ status, onClick }: CustomUserStatusRowProps): ReactElement => { const { _id, name, statusType } = status; + const { t } = useTranslation(); return ( - {statusType} + {t(statusType)} );