diff --git a/src/components/community/user/index.tsx b/src/components/community/user/index.tsx index 70e771761..e53851538 100644 --- a/src/components/community/user/index.tsx +++ b/src/components/community/user/index.tsx @@ -5,6 +5,7 @@ import env from '../../../env'; import SC from './styled'; import type { CommunityUser } from '../../../types'; +import translations from '../../../lib/localization'; const { FDK_COMMUNITY_BASE_URI } = env; @@ -12,6 +13,13 @@ interface Props { user: CommunityUser; } +const Username = ({ user }: { user: CommunityUser }) => { + const name = user.displayname ?? user.username; + return name.includes('former-user') + ? translations.community.formerUser + : name; +}; + const User: FC = ({ user }) => ( {user.picture ? ( @@ -20,7 +28,9 @@ const User: FC = ({ user }) => ( {user['icon:text']} )} - {user.displayname ?? user.username} + + + ); diff --git a/src/l10n/en.json b/src/l10n/en.json index 14368a25f..085708f23 100644 --- a/src/l10n/en.json +++ b/src/l10n/en.json @@ -1002,6 +1002,7 @@ "seeAllComments": "See all comments", "seeAllBlogArticles": "Se alle bloggartikler", "meetingTitle": "Meeting title: ", + "formerUser": "Former user", "subtitle": { "link": "our data community", "showAllMentions": "Show all mentions in Datalandsbyen", diff --git a/src/l10n/nb.json b/src/l10n/nb.json index a7ac5b8f9..af9219a9e 100644 --- a/src/l10n/nb.json +++ b/src/l10n/nb.json @@ -1011,6 +1011,7 @@ "seeAllBlogArticles": "Se alle bloggartikler", "meetingTitle": "Møtetittel: ", "seeLatestComments": "Siste kommentarer i", + "formerUser": "Tidligere bruker", "subtitle": { "link": "Datalandsbyen", "mention": " innlegg i ", diff --git a/src/l10n/nn.json b/src/l10n/nn.json index e9b27a680..90d6b2e6e 100644 --- a/src/l10n/nn.json +++ b/src/l10n/nn.json @@ -1007,6 +1007,7 @@ "seeAllPosts": "Sjå alle saker", "seeAllBlogArticles": "Sjå alle bloggartiklar", "meetingTitle": "Møtetittel: ", + "formerUser": "Tidlegare brukar", "subtitle": { "link": "Datalandsbyen", "mention": " innlegg i ",