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>
pull/35164/head^2
AYUSHKUMAR_21JE0209 11 months ago committed by GitHub
parent e65db19175
commit f63fc92196
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .changeset/seven-otters-worry.md
  2. 4
      apps/meteor/client/views/admin/customUserStatus/CustomUserStatusTable/CustomUserStatusRow.tsx

@ -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

@ -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 (
<GenericTableRow
@ -28,7 +30,7 @@ const CustomUserStatusRow = ({ status, onClick }: CustomUserStatusRowProps): Rea
<MarkdownText content={name} parseEmoji={true} variant='inline' />
</GenericTableCell>
<GenericTableCell fontScale='p2' color='default' style={style}>
{statusType}
{t(statusType)}
</GenericTableCell>
</GenericTableRow>
);

Loading…
Cancel
Save