Skip to content

fix: use i18n key for RoleForm description hint text #40177

Merged
dionisio-bot[bot] merged 4 commits intoRocketChat:developfrom
Naetiksoni08:fix/role-form-description-hint-i18n
Apr 16, 2026
Merged

fix: use i18n key for RoleForm description hint text #40177
dionisio-bot[bot] merged 4 commits intoRocketChat:developfrom
Naetiksoni08:fix/role-form-description-hint-i18n

Conversation

@Naetiksoni08
Copy link
Copy Markdown
Contributor

@Naetiksoni08 Naetiksoni08 commented Apr 16, 2026

Proposed changes (including videos or screenshots)

The hint text below the Description field in the Role form (Admin > Permissions > New Role) was hardcoded as a plain
English string instead of using the i18n translation system.

Problems:

  1. The hint text was never translated — users with non-English language preferences always saw English text regardless of
    their selected language
  2. The hardcoded string had a typo — dont instead of don't

Before:

<FieldHint>Leave the description field blank if you dont want to show the role</FieldHint>

After:

 <FieldHint>{t('Leave_the_description_field_blank_if_you_dont_want_to_show_the_role')}</FieldHint>        

The translation key Leave_the_description_field_blank_if_you_dont_want_to_show_the_role already exists in the i18n package for all supported languages including pt-BR, de, es, ko, zh, ja and more — it was just never being used.

Before Fix: (I changed the language to portuguese to Confirm the bug)

Screenshot 2026-04-16 at 12 47 05 PM

The line "Leave the description field blank if you dont want to show the role" was Hardcoded and had a typo.

After Fix:

Screenshot 2026-04-16 at 1 07 05 PM

Steps to test or reproduce

  1. Go to Admin Panel → Permissions → New Role
  2. Change your user language to any non-English language via My Account → Preferences → Language
  3. Before fix: The hint below the Description field stays in English: "Leave the description field blank if you dont want to
    show the role"
  4. After fix: The hint correctly translates to the user's selected language

Further comments

The translation key was already present and fully translated across all supported languages in the i18n package. This was a
one-line fix to wire it up correctly in the component.

Summary by CodeRabbit

  • Bug Fixes
    • Role management form now displays hint text in the user's language.

Task: COMM-149

@Naetiksoni08 Naetiksoni08 requested a review from a team as a code owner April 16, 2026 07:58
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Apr 16, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

⚠️ No Changeset found

Latest commit: 5fdc12e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Walkthrough

Updated a field hint in the Role Form to use a localization function instead of hardcoded English text. This change applies translation support to the Description field's hint message.

Changes

Cohort / File(s) Summary
Localization Update
apps/meteor/client/views/admin/permissions/RoleForm.tsx
Replaced hardcoded hint text with translation function call (t(...)) for the Description field's FieldHint component.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

type: bug

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main change: converting a hardcoded English hint text to use an i18n translation key in the RoleForm component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@dougfabris
Copy link
Copy Markdown
Member

/jira COMM

@dougfabris dougfabris added this to the 8.4.0 milestone Apr 16, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Apr 16, 2026
@dionisio-bot dionisio-bot Bot removed the stat: QA assured Means it has been tested and approved by a company insider label Apr 16, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Apr 16, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 16, 2026
@dionisio-bot dionisio-bot Bot enabled auto-merge April 16, 2026 13:52
@dougfabris dougfabris modified the milestone: 8.4.0 Apr 16, 2026
@dionisio-bot dionisio-bot Bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Apr 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.04%. Comparing base (f621848) to head (5fdc12e).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40177      +/-   ##
===========================================
- Coverage    70.13%   70.04%   -0.09%     
===========================================
  Files         3284     3284              
  Lines       117428   117428              
  Branches     20757    20784      +27     
===========================================
- Hits         82361    82258     -103     
- Misses       31781    31861      +80     
- Partials      3286     3309      +23     
Flag Coverage Δ
e2e 59.62% <ø> (-0.14%) ⬇️
e2e-api 46.48% <ø> (-0.89%) ⬇️
unit 70.87% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Naetiksoni08 Naetiksoni08 requested a review from dougfabris April 16, 2026 15:28
@dougfabris
Copy link
Copy Markdown
Member

dougfabris commented Apr 16, 2026

@Naetiksoni08 stop merging it mate, let the merge queue handle it!

@dougfabris dougfabris modified the milestone: 8.4.0 Apr 16, 2026
@dionisio-bot dionisio-bot Bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Apr 16, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue Apr 16, 2026
Merged via the queue into RocketChat:develop with commit d9f4c86 Apr 16, 2026
79 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants