feat: role based translations - #1649
Merged
Merged
Conversation
jekabs-karklins
approved these changes
Aug 6, 2026
ACLay
reviewed
Aug 7, 2026
| const techniquesColumns = () => [ | ||
| { | ||
| title: 'Technique', | ||
| title: i18n.t(`${currentRoleFirstTagName}.Technique`), |
Contributor
There was a problem hiding this comment.
The i18n call in TechniqueFilter.tsx was changed to not have the . after Jekab's review, but it's still here in this use.
ACLay
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: UserOfficeProject/issue-tracker#1519
Motivation
Another facility at STFC would like to use the Xpress functionality but need uses of the term "technique" to be changed to "facility". ISIS would like to retain the use of the term "technique", so a way to change translations for different users is needed.
How It Works
The first tag associated with the user's current role (we're assuming the role only has one tag) is used to determine what translation to use for the term "technique". A nested object in the translation file with the same name as the tag allows the correct translation to be used.
For example, given tag,name = CLF
and the following in translation.json:
The term "Technique" will be translated to "Facility"
This PR introduces a new environment variable to point to the translation file in the backend. If it's not set, it could cause the "Technique" column header in the technique proposals export to appear incorrectly.
How Has This Been Tested
Tested manually
Changes