Skip to content

Commit

Permalink
Fix for #640
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 11, 2024
1 parent 1e49af9 commit 80cf8a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion account-gui/src/utils/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import I18n from "i18n-js";

export const institutionName = linkedAccount => {
if (linkedAccount.external) {
return I18n.t(`verify.issuers.${linkedAccount.issuer.name}`);
const translation = I18n.translations[I18n.locale];
if (translation.verify.issuers[linkedAccount.issuer.name]) {
return I18n.t(`verify.issuers.${linkedAccount.issuer.name}`);
}
return linkedAccount.issuer.name;
}
if (I18n.locale === "en") {
return linkedAccount.displayNameEn || linkedAccount.displayNameNl || linkedAccount.schacHomeOrganization;
Expand Down
6 changes: 5 additions & 1 deletion myconext-gui/src/utils/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export const institutionLogo = institution => {

export const institutionName = linkedAccount => {
if (linkedAccount.external) {
return I18n.t(`verify.issuers.${linkedAccount.issuer.name}`);
const translation = I18n.translations[I18n.locale];
if (translation.verify.issuers[linkedAccount.issuer.name]) {
return I18n.t(`verify.issuers.${linkedAccount.issuer.name}`);
}
return linkedAccount.issuer.name;
}
if (I18n.locale === "en") {
return linkedAccount.displayNameEn || linkedAccount.displayNameNl || linkedAccount.schacHomeOrganization;
Expand Down

0 comments on commit 80cf8a0

Please sign in to comment.