translate permission "displayName" values
Description
Environment
Potential Workaround
Attachments
- 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
is cloned by
is duplicated by
relates to
Checklist
hideTestRail: Results
Activity
Zak Burke April 14, 2020 at 6:29 PM
@Ann-Marie Breaux, 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
@Zak Burke and @Cate Boerema it looks like @md331 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, @Zak Burke. 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
@Peter Murray, 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 @md331 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
@Zak Burke: Do you have a sense of what would be the best way to get this technique introduced? Is it something to ask @Mike Gorrell to include on an upcoming Technical Council call?
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 theirpackage.json
files for permissions. Instead, it should pull thepermissionName
value throughstripes.intl.formatMessage()
to retrieve the localized versions of these values.