project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

[Feature] Translate the Cloud layout sidebar and the role permission group headers

Open mdobprv-lab opened this issue 1 month ago • 3 comments

Describe the feature

Two places in the UI stay in English in every language:

  • The Cloud layout sidebar (web/src/cloud.js, nav groups from around line 389): about 45 group and item labels are plain strings rendered with {group.label} / {item.label}; only three go through t().
  • The permission group headers in the Create/Edit Role dialogs (PERMISSION_CATEGORY_META in web/src/settings_modal.js), rendered with {meta.title}. The map is at module level, so t() isn't available there.

I'd like to localize both, in two separate PRs: reuse existing keys where the meaning matches, add new keys in en and pl only, and leave the other languages to you as agreed in #1171.

Use Case

With the UI in Polish (or any language other than English), the Cloud sidebar and the role editor's group headers stay in English while the rest of the page is translated.

Alternatives considered

Two details I'd rather check with you before writing code:

  • The group headers are uppercase in the source (INFRASTRUCTURE, REPORTS). Through t() the English UI would show "Reports" instead. I'd add text-transform: uppercase to .cloud-nav-group-label, or call .toUpperCase() where it is rendered. Which do you prefer?
  • Permission headers: a titleKey next to each title in the map and t(meta.titleKey) || meta.title at the render site, or another approach?

Also: is the Cloud layout (Preview) fine to localize now, or is it about to change?

How important is this for you?

Would improve the Polish UI: the Cloud layout is noticeably less translated than Corporate.

Checklist

  • [x] I have searched existing issues and discussions to make sure this hasn't been requested before
  • [x] I understand this is a wishlist and not a work order — volunteers decide what gets built, and when
  • [x] I'm aware that "this should be easy, it's only a few lines" has never once turned out to be true 🪄

mdobprv-lab avatar Oct 23 '26 11:10 mdobprv-lab

Thanks for asking first. Group headers: CSS please, text-transform: uppercase on .cloud-nav-group-label (the cloud styles live in web/index.html.original), so the keys stay in normal case and existing ones can be reused.

Role dialog: a titleKey next to title is fine, same idea as the labelKey tabs in dashboard.js. One catch: t() hands back the key itself when nothing is found, so t(meta.titleKey) || meta.title never reaches the fallback. meta.titleKey ? t(meta.titleKey) : meta.title keeps unknown categories showing their raw name.

Fine to localize the Cloud layout now. It's still a preview, but the keys move along with it if it changes.

MK

mkellermann97 avatar Oct 23 '26 13:10 mkellermann97

Both halves are on Testing now: the role dialog headers came with #1188, the Cloud sidebar with #1187, and the languages you left to us are filled in for both. They come with the next release, so I'll keep this open until then.

MK

mkellermann97 avatar Oct 29 '26 10:10 mkellermann97

Both parts shipped in v1.5.0: the Cloud sidebar with #1187 and the role dialog headers with #1188. Closing, thanks.

mdobprv-lab avatar Nov 17 '26 09:11 mdobprv-lab