Skip to content

fix(users-permissions): fix role notification translations#26933

Merged
innerdvations merged 3 commits into
strapi:developfrom
Mohammadarshid:fix-role-notification-translations
Jul 21, 2026
Merged

fix(users-permissions): fix role notification translations#26933
innerdvations merged 3 commits into
strapi:developfrom
Mohammadarshid:fix-role-notification-translations

Conversation

@Mohammadarshid

@Mohammadarshid Mohammadarshid commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What does it do?

Fixes incorrect translation keys used in users-permissions role notifications.

Changes made:

  • Added missing Settings.roles.created translation key in en.json.
  • Updated EditPage.jsx to use Settings.roles.edited instead of Settings.roles.created.
  • This allows role creation and role editing notifications to use the correct translations.

Why is it needed?

In Strapi v5, the edit role notification was using the wrong translation key (Settings.roles.created), and the created role notification key was missing from the translation catalog.

Because of this, localised messages were not displayed, and the default English message was always shown.

How to test it?

Environment:

  • Strapi version: 5.50.0
  • Node.js: 24.x
  • Yarn

Steps:

  1. Run yarn build.
  2. Start the Strapi admin panel.
  3. Go to Settings → Users & Permissions → Roles.
  4. Create a new role and edit an existing role.
  5. Verify that the notification messages use the correct translations.

Related issue(s)/PR(s)

Fixes #26917


Fixes CPR-436

@strapi-cla

strapi-cla commented Jul 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@dosubot dosubot Bot added pr: fix This PR is fixing a bug source: plugin:users-permissions Source is plugin/users-permissions package labels Jul 7, 2026
@github-actions github-actions Bot added the community Changes and fixes created by community members label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to our community triage board as CPR-436.

@innerdvations innerdvations self-assigned this Jul 8, 2026

@innerdvations innerdvations left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this one should remain as 'created'

Comment thread packages/plugins/users-permissions/admin/src/pages/Roles/pages/CreatePage.jsx Outdated
@innerdvations innerdvations added this to the 5.50.2 milestone Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Size Change: +12.2 kB (+0.37%)

Total Size: 3.35 MB

📦 View Changed
Filename Size Change
examples/getstarted/build/ca.json-*********** 3.76 kB -5.68 kB (-60.15%) 🏆
examples/getstarted/build/constants-*********** 256 B -458 B (-64.15%) 🏆
examples/getstarted/build/CreateView-*********** 381 B +80 B (+26.58%) 🚨
examples/getstarted/build/da.json-*********** 3.6 kB +2.15 kB (+149.34%) 🆘
examples/getstarted/build/de.json-*********** 6 kB -9.97 kB (-62.42%) 🏆
examples/getstarted/build/EditPage-*********** 2.1 kB +164 B (+8.46%) 🔍
examples/getstarted/build/en.json-*********** 5.41 kB +3.45 kB (+175.64%) 🆘
examples/getstarted/build/hooks-*********** 82 B -10 B (-10.87%) 👏
examples/getstarted/build/ListPage-*********** 1.97 kB -1.49 kB (-43.14%) 🎉
examples/getstarted/build/ms.json-*********** 4.56 kB +636 B (+16.2%) ⚠️
examples/getstarted/build/nl.json-*********** 16.1 kB +10.3 kB (+175.89%) 🆘
examples/getstarted/build/pt.json-*********** 4.17 kB +2.65 kB (+175.05%) 🆘
examples/getstarted/build/strapi-*********** 1.84 MB +205 B (+0.01%)
examples/getstarted/build/sv.json-*********** 10.4 kB +9.37 kB (+925.49%) 🆘
examples/getstarted/build/useLicenseLimitNotification-*********** 704 B -6 B (-0.85%)
examples/getstarted/build/Widgets-*********** 1.82 kB +845 B (+86.67%) 🆘
ℹ️ View Unchanged
Filename Size Change
examples/getstarted/build/_baseEach-*********** 220 B -1 B (-0.45%)
examples/getstarted/build/_baseMap-*********** 189 B -2 B (-1.05%)
examples/getstarted/build/AdminSeatInfo-*********** 845 B 0 B
examples/getstarted/build/AIUsage-*********** 699 B -4 B (-0.57%)
examples/getstarted/build/apiTokens-*********** 617 B 0 B
examples/getstarted/build/App-*********** 22.7 kB 0 B
examples/getstarted/build/ApplicationInfoPage-*********** 4.31 kB +2 B (+0.05%)
examples/getstarted/build/ar.json-*********** 15.6 kB 0 B
examples/getstarted/build/AuthenticatedLayout-*********** 57.9 kB +4 B (+0.01%)
examples/getstarted/build/AuthResponse-*********** 416 B -1 B (-0.24%)
examples/getstarted/build/CardDragPreview-*********** 587 B -1 B (-0.17%)
examples/getstarted/build/ColorPickerInput-*********** 4.25 kB -1 B (-0.02%)
examples/getstarted/build/ComponentConfigurationPage-*********** 1.61 kB 0 B
examples/getstarted/build/ConfigureTheView-*********** 1.54 kB 0 B
examples/getstarted/build/core.esm-*********** 14.5 kB 0 B
examples/getstarted/build/CreateActionEE-*********** 513 B -2 B (-0.39%)
examples/getstarted/build/CreatePage-*********** 2 kB -1 B (-0.05%)
examples/getstarted/build/cs-*********** 76 B 0 B
examples/getstarted/build/cs.json-*********** 16.7 kB 0 B
examples/getstarted/build/dummy-preview-*********** 3.32 kB 0 B
examples/getstarted/build/EditConfigurationPage-*********** 1.09 kB -2 B (-0.18%)
examples/getstarted/build/EditView-*********** 2.01 kB -3 B (-0.15%)
examples/getstarted/build/EditViewPage-*********** 4.79 kB -2 B (-0.04%)
examples/getstarted/build/en-*********** 74 B 0 B
examples/getstarted/build/en-GB-*********** 15.1 kB 0 B
examples/getstarted/build/es-*********** 74 B 0 B
examples/getstarted/build/es.json-*********** 14.9 kB 0 B
examples/getstarted/build/eu.json-*********** 10.4 kB 0 B
examples/getstarted/build/EventsTable-*********** 390 B -1 B (-0.26%)
examples/getstarted/build/fi.json-*********** 15.3 kB 0 B
examples/getstarted/build/FieldTypeIcon-*********** 460 B -1 B (-0.22%)
examples/getstarted/build/Form-*********** 5.48 kB -2 B (-0.04%)
examples/getstarted/build/FormApiTokenContainer-*********** 1.03 kB -1 B (-0.1%)
examples/getstarted/build/fr.json-*********** 12.7 kB 0 B
examples/getstarted/build/getActionTypesDefaultMessages-*********** 498 B 0 B
examples/getstarted/build/getTrad-*********** 381 B +2 B (+0.53%)
examples/getstarted/build/groupBy-*********** 370 B -1 B (-0.27%)
examples/getstarted/build/gu.json-*********** 9.06 kB 0 B
examples/getstarted/build/he.json-*********** 6.11 kB 0 B
examples/getstarted/build/hi.json-*********** 11.1 kB 0 B
examples/getstarted/build/History-*********** 6.95 kB -3 B (-0.04%)
examples/getstarted/build/HomePage-*********** 247 kB +2 B (0%)
examples/getstarted/build/hu.json-*********** 11.2 kB 0 B
examples/getstarted/build/id-*********** 7.64 kB -1 B (-0.01%)
examples/getstarted/build/id.json-*********** 4.51 kB 0 B
examples/getstarted/build/index-*********** 215 kB 0 B
examples/getstarted/build/index.html 593 B +1 B (+0.17%)
examples/getstarted/build/InstalledPlugins-*********** 776 B -1 B (-0.13%)
examples/getstarted/build/isNil-*********** 121 B 0 B
examples/getstarted/build/it.json-*********** 15.4 kB 0 B
examples/getstarted/build/ja.json-*********** 17.2 kB 0 B
examples/getstarted/build/ko.json-*********** 17.1 kB 0 B
examples/getstarted/build/layout-*********** 3.5 kB +2 B (+0.06%)
examples/getstarted/build/Layout-*********** 2.19 kB +1 B (+0.05%)
examples/getstarted/build/LazyOutlet-*********** 307 B -1 B (-0.32%)
examples/getstarted/build/ListConfigurationPage-*********** 4.38 kB -2 B (-0.05%)
examples/getstarted/build/ListView-*********** 6.84 kB -3 B (-0.04%)
examples/getstarted/build/ListViewPage-*********** 7.61 kB -1 B (-0.01%)
examples/getstarted/build/Login-*********** 461 B +1 B (+0.22%)
examples/getstarted/build/MagicLinkEE-*********** 389 B +2 B (+0.52%)
examples/getstarted/build/ml.json-*********** 11.3 kB 0 B
examples/getstarted/build/ModalForm-*********** 243 B 0 B
examples/getstarted/build/no.json-*********** 5.47 kB 0 B
examples/getstarted/build/NoContentTypePage-*********** 454 B +1 B (+0.22%)
examples/getstarted/build/NoPermissionsPage-*********** 230 B -1 B (-0.43%)
examples/getstarted/build/Permissions-*********** 11.7 kB 0 B
examples/getstarted/build/pl.json-*********** 16.4 kB 0 B
examples/getstarted/build/PrivateRoute-*********** 248 B 0 B
examples/getstarted/build/ProfilePage-*********** 2.48 kB 0 B
examples/getstarted/build/pt-BR.json-*********** 10.5 kB 0 B
examples/getstarted/build/purchase-review-workflows-*********** 66.3 kB -1 B (0%)
examples/getstarted/build/PurchaseAuditLogs-*********** 70.5 kB 0 B
examples/getstarted/build/PurchaseContentHistory-*********** 80.9 kB 0 B
examples/getstarted/build/PurchaseContentReleases-*********** 55.9 kB 0 B
examples/getstarted/build/PurchaseSingleSignOn-*********** 25 kB +1 B (0%)
examples/getstarted/build/RelativeTime-*********** 405 B +1 B (+0.25%)
examples/getstarted/build/ReleasesPage-*********** 4.09 kB +2 B (+0.05%)
examples/getstarted/build/ReleasesSettingsPage-*********** 1.52 kB -4 B (-0.26%)
examples/getstarted/build/router-*********** 390 B +1 B (+0.26%)
examples/getstarted/build/ru-*********** 91 B 0 B
examples/getstarted/build/ru.json-*********** 17.2 kB 0 B
examples/getstarted/build/sa.json-*********** 11.2 kB 0 B
examples/getstarted/build/schemas-*********** 3.14 kB 0 B
examples/getstarted/build/SearchInput-*********** 646 B +1 B (+0.16%)
examples/getstarted/build/selectors-*********** 111 B +1 B (+0.91%)
examples/getstarted/build/SelectRoles-*********** 1.03 kB 0 B
examples/getstarted/build/SessionsPage-*********** 1.48 kB +1 B (+0.07%)
examples/getstarted/build/Settings-*********** 1.61 kB -1 B (-0.06%)
examples/getstarted/build/SettingsPage-*********** 3.02 kB 0 B
examples/getstarted/build/SingleSignOnPage-*********** 1.81 kB 0 B
examples/getstarted/build/sk-*********** 76 B 0 B
examples/getstarted/build/sk.json-*********** 16.9 kB 0 B
examples/getstarted/build/sortable.esm-*********** 2.86 kB 0 B
examples/getstarted/build/sortBy-*********** 694 B 0 B
examples/getstarted/build/SSOProviders-*********** 756 B -1 B (-0.13%)
examples/getstarted/build/strapi-************ 844 B 0 B
examples/getstarted/build/Table-*********** 1.44 kB -2 B (-0.14%)
examples/getstarted/build/tail-*********** 242 B -2 B (-0.82%)
examples/getstarted/build/th.json-*********** 6.16 kB 0 B
examples/getstarted/build/TokenBox-*********** 122 kB -2 B (0%)
examples/getstarted/build/tr-*********** 83 B 0 B
examples/getstarted/build/tr.json-*********** 13.7 kB 0 B
examples/getstarted/build/transferTokens-*********** 502 B +1 B (+0.2%)
examples/getstarted/build/uk-*********** 91 B 0 B
examples/getstarted/build/uk.json-*********** 15.5 kB 0 B
examples/getstarted/build/useAdminRoles-*********** 242 B -1 B (-0.41%)
examples/getstarted/build/UseCasePage-*********** 1.38 kB -3 B (-0.22%)
examples/getstarted/build/useDragLayer-*********** 180 B +1 B (+0.56%)
examples/getstarted/build/users-*********** 352 B 0 B
examples/getstarted/build/useWebhooks-*********** 644 B +1 B (+0.16%)
examples/getstarted/build/validation-*********** 532 B -1 B (-0.19%)
examples/getstarted/build/vi.json-*********** 13.7 kB 0 B
examples/getstarted/build/WidgetHelpers-*********** 463 B 0 B
examples/getstarted/build/widgetVisibility-*********** 260 B +1 B (+0.39%)
examples/getstarted/build/zh-Hans.json-*********** 15.4 kB 0 B
examples/getstarted/build/zh.json-*********** 4.69 kB 0 B

compressed-size-action

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: eb3beade-a93a-4f7e-9c66-82d7cce05192

📥 Commits

Reviewing files that changed from the base of the PR and between dbee4b7 and 72d4aaa.

📒 Files selected for processing (2)
  • packages/plugins/users-permissions/admin/src/pages/Roles/pages/EditPage.jsx
  • packages/plugins/users-permissions/admin/src/translations/en.json

Walkthrough

The role edit success notification in EditPage.jsx now references the "edited" translation id instead of "created". A new translation entry, "Settings.roles.created", is added to en.json for the role creation notification.

Changes

Role notification translation fix

Layer / File(s) Summary
Correct translation ids for role notifications
packages/plugins/users-permissions/admin/src/pages/Roles/pages/EditPage.jsx, packages/plugins/users-permissions/admin/src/translations/en.json
EditPage's success notification now uses the "edited" translation key, and en.json adds the previously missing "Settings.roles.created" entry.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: fixing users-permissions role notification translations.
Description check ✅ Passed The description matches the implemented change and explains the translation-key fix.
Linked Issues check ✅ Passed The changes match #26917 by updating the edit notification key and adding the missing created translation.
Out of Scope Changes check ✅ Passed The PR is narrowly scoped to the role notification translation fix and adds no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@innerdvations innerdvations modified the milestones: 5.50.2, 5.50.3 Jul 14, 2026
@innerdvations

Copy link
Copy Markdown
Contributor

Thanks for the update — the translation fix looks good and CI is green.

One last step before we can merge: could you please sign the Contributor License Agreement? Once that’s done, we should be clear to merge.

AI-assisted comment.

@innerdvations
innerdvations merged commit 4cf7eae into strapi:develop Jul 21, 2026
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Changes and fixes created by community members pr: fix This PR is fixing a bug source: plugin:users-permissions Source is plugin/users-permissions package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

users-permissions: role notifications reference a translation id missing from the catalog, leaving "Settings.roles.edited" translations unused

3 participants