From 4fa29948b6a3513615c99b033207ed7874a5668a Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 16 Apr 2020 12:17:05 +0200 Subject: [PATCH] use the child components --- .../account/messages/messages_en.properties | 5 ++--- .../content/my-resources-page/ResourcesTable.tsx | 16 ++++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/themes/src/main/resources/theme/keycloak-preview/account/messages/messages_en.properties b/themes/src/main/resources/theme/keycloak-preview/account/messages/messages_en.properties index 9a6aae99ae..9e8936c1d0 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/messages/messages_en.properties +++ b/themes/src/main/resources/theme/keycloak-preview/account/messages/messages_en.properties @@ -35,9 +35,8 @@ resourceName=Resource Name nextPage=Next previousPage=Previous firstPage=First Page -resourceSharedWith=Resource is shared with -and=and -otherUsers=other users +resourceSharedWith=Resource is shared with {0} +and= and {0} other users add=Add shareSuccess=Resource successfully shared. resourceAlreadyShared=Resource is already shared with this user. diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx index 1b30d375ec..831804424d 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx @@ -98,12 +98,16 @@ export class ResourcesTable extends React.Component); - // TODO: Not using a parameterized message because I want to use tag. Need to figure out a good solution to this. - if (this.numOthers(row) > 0) { - return ( {this.firstUser(row)} {this.numOthers(row)} .) - } else { - return ( {this.firstUser(row)}.) - } + return ( + + + {this.firstUser(row)} + + {this.numOthers(row) > 0 && + {this.numOthers(row)} + }. + + ); } public render(): React.ReactNode {