Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: "Status" column values in "Custom Status" page table not translated #34857

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/seven-otters-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue where the language preference was not being applied to the custom user status page, specifically for the status options in the table. The fix ensures the status options are translated correctly.
yash-rajpal marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -13,6 +14,7 @@ type CustomUserStatusRowProps = {

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

return (
<GenericTableRow
Expand All @@ -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>
);
Expand Down
Loading