From 044d551b60e52312fec6cab932f3332cc7744f44 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 24 Apr 2022 00:12:38 +0700 Subject: [PATCH] fix : translation strings in DocumentMeta component (2955) (#3417) * fix issue 2955 * Linter * Linter * Linter * Fix stupid mistake to run my own tests --- app/components/DocumentMeta.tsx | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/app/components/DocumentMeta.tsx b/app/components/DocumentMeta.tsx index 719f296b1..716ce0657 100644 --- a/app/components/DocumentMeta.tsx +++ b/app/components/DocumentMeta.tsx @@ -73,42 +73,61 @@ const DocumentMeta: React.FC = ({ const collection = collections.get(document.collectionId); const lastUpdatedByCurrentUser = user.id === updatedBy.id; + const userName = updatedBy.name; let content; if (deletedAt) { content = ( - {t("deleted")} ); } else if (archivedAt) { content = ( - {t("archived")} ); } else if (createdAt === updatedAt) { content = ( - {t("created")} ); } else if (publishedAt && (publishedAt === updatedAt || showPublished)) { content = ( - {t("published")} ); } else if (isDraft) { content = ( - {t("saved")} ); } else { content = ( - {t("updated")} ); } @@ -143,7 +162,6 @@ const DocumentMeta: React.FC = ({ return ( - {lastUpdatedByCurrentUser ? t("You") : updatedBy.name}  {to ? {content} : content} {showCollection && collection && (