translate permission "displayName" values

Description

Description: The user-update page should translate permission names

Details: The "User permissions" section of the user-update page is using the displayName values provided by modules in their package.json files for permissions. Instead, it should pull the permissionName value through stripes.intl.formatMessage() to retrieve the localized versions of these values.

Environment

None

Potential Workaround

None

Attachments

5
  • 15 Apr 2020, 08:31 AM
  • 10 Apr 2020, 07:01 PM
  • 10 Apr 2020, 07:00 PM
  • 10 Apr 2020, 06:29 PM
  • 10 Apr 2020, 05:53 PM

Checklist

hide

TestRail: Results

Activity

Show:

Zak Burke April 14, 2020 at 6:29 PM

, I think you can go ahead and create per-app stories with the template you posted above, with the additional detail that permissions must be named with the UI module-id as the prefix, for example "permissionName": "ui-requests.moveRequest", or "permissionName": "ui-inventory.settings.materialtypes",. When they are copied into the translations, the module-id should be replaced with permission, e.g. the permission ui-requests.moveRequest becomes the translation key permission.moveRequest.

The work Mark D did simply allows us to continue looking up the display-name in the permission object if we can't find a matching key in the translations. This allows us the UI to keep showing the US English value (as it always has) until this work of creating translation keys for other apps is complete.

Ann-Marie Breaux April 14, 2020 at 4:28 PM

and it looks like put some instructions in the Stripes-updates channel regarding what UI devs need to do, so maybe I should not create UI stories for each app? I'll add a note in the PO channel reminding POs to check with their UI leads about it.

Peter Murray April 14, 2020 at 3:55 PM

Thanks for the assessment, . Massoud is going to show this work at the upcoming Product Council meeting, so coming out of that we can get a sense of prioritization for the technical folks.

Zak Burke April 14, 2020 at 11:22 AM

, specifically with regard to localized display of compile-time permission sets names, i.e. those that are described in a UI app's package.json file, I actually think the work did in the attached PR is the right way to go because it provides l10n for those values out of the box for all tenants rather than requiring each tenant to add them individually.

That said, translation of run-time values, e.g. additional permission sets created via Settings > Users > Permission sets, or Settings > Inventory > [anything], etc, is absolutely a problem we need to solve – probably with prioritization determined by the PC? – and I look forward to exploring how we can apply this work there.

Peter Murray April 13, 2020 at 3:46 PM

: Do you have a sense of what would be the best way to get this technique introduced? Is it something to ask to include on an upcoming Technical Council call?

Done

Details

Assignee

Reporter

Labels

Priority

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created May 1, 2018 at 4:14 PM
Updated February 10, 2021 at 3:21 PM
Resolved May 5, 2020 at 5:39 PM
TestRail: Cases
TestRail: Runs

Flag notifications