Skip to content

Commit f63fc92

Browse files
AyushKumar123456789yash-rajpalgabriellshcasalsghkodiakhq[bot]
authored
fix: "Status" column values in "Custom Status" page table not translated (#34857)
Co-authored-by: yash-rajpal <rajpal.yash03@gmail.com> 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 <scuciatto@gmail.com> Co-authored-by: Douglas Fabris <devfabris@gmail.com>
1 parent e65db19 commit f63fc92

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/seven-otters-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Fixes an issue where custom status' values in the custom status page table were not being properly translated

apps/meteor/client/views/admin/customUserStatus/CustomUserStatusTable/CustomUserStatusRow.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { IUserStatus } from '@rocket.chat/core-typings';
22
import type { CSSProperties, ReactElement } from 'react';
3+
import { useTranslation } from 'react-i18next';
34

45
import { GenericTableRow, GenericTableCell } from '../../../../components/GenericTable';
56
import MarkdownText from '../../../../components/MarkdownText';
@@ -13,6 +14,7 @@ type CustomUserStatusRowProps = {
1314

1415
const CustomUserStatusRow = ({ status, onClick }: CustomUserStatusRowProps): ReactElement => {
1516
const { _id, name, statusType } = status;
17+
const { t } = useTranslation();
1618

1719
return (
1820
<GenericTableRow
@@ -28,7 +30,7 @@ const CustomUserStatusRow = ({ status, onClick }: CustomUserStatusRowProps): Rea
2830
<MarkdownText content={name} parseEmoji={true} variant='inline' />
2931
</GenericTableCell>
3032
<GenericTableCell fontScale='p2' color='default' style={style}>
31-
{statusType}
33+
{t(statusType)}
3234
</GenericTableCell>
3335
</GenericTableRow>
3436
);

0 commit comments

Comments
 (0)