Skip to content

Commit

Permalink
FIX #720
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Sep 13, 2024
1 parent c7f19cc commit fa7dad3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,10 @@ export function SimpleNotification(props: ISimpleNotificationProps) {
};

const fromFormatter = (action: any, sender: any) => {
console.debug({props, sender})
switch (action.__typename) {
case 'ApiAccess':
return `${sender.name}/${Option(props.notification.action.team!.name).getOrNull()}`;
return `${sender.name}/${props.notification.action.team?.name ?? translate("Unknown team") }`;
case 'TeamAccess':
case 'NewPostPublished':
case 'NewIssueOpen':
Expand All @@ -430,10 +431,9 @@ export function SimpleNotification(props: ISimpleNotificationProps) {
case 'ApiSubscriptionReject':
case 'ApiSubscriptionAccept':
case 'TeamInvitation':
return props.notification.action.team!.name;
return props.notification.action.team?.name ?? translate("Unknown team");
case 'ApiSubscriptionDemand':
return `${sender.name}/${Option(props.notification.action.team!.name)
.getOrNull()}`;
return `${sender.name}/${props.notification.action.team?.name ?? translate("Unknown team")}`;
case 'OtoroshiSyncSubscriptionError':
return 'Otoroshi verifier job';
case 'OtoroshiSyncApiError':
Expand Down
1 change: 1 addition & 0 deletions daikoku/javascript/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@
"moment.duration.months": "%s m",
"moment.duration.years": "%s y",
"Unknown user": "Unknown user",
"Unknown teal": "Unknown team",
"European server": "European server",
"API creation security": "API creation security",
"creation.security.help": "if enabled, only authorized teams will be able to create APIs",
Expand Down
1 change: 1 addition & 0 deletions daikoku/javascript/src/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@
"moment.duration.months": "%s m",
"moment.duration.years": "%s a",
"Unknown user": "Utilisateur inconnu",
"Unknown team": "Équipe inconnue",
"European server": "Serveur européen",
"API creation security": "Sécurité - création d'API",
"creation.security.help": "si activé, seules les équipes autorisées pourront créer des APIs",
Expand Down

0 comments on commit fa7dad3

Please sign in to comment.