From 4e7a96c5a831882463802cdd4f84fe1464969cb0 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 23 Mar 2022 12:29:43 +0100 Subject: refactor: use formatjs swc plugin I'm not able to configure SWC plugins in Next.js so to make it works, all translation must have an id. --- src/components/MetaItems/Author/Author.tsx | 1 + src/components/MetaItems/CommentsCount/CommentsCount.tsx | 2 ++ src/components/MetaItems/Dates/Dates.tsx | 2 ++ src/components/MetaItems/PostsCount/PostsCount.tsx | 2 ++ src/components/MetaItems/ReadingTime/ReadingTime.tsx | 6 +++++- src/components/MetaItems/Thematics/Thematics.tsx | 1 + src/components/MetaItems/Topics/Topics.tsx | 1 + src/components/MetaItems/Website/Website.tsx | 1 + 8 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/components/MetaItems') diff --git a/src/components/MetaItems/Author/Author.tsx b/src/components/MetaItems/Author/Author.tsx index c3d78c2..4ff0086 100644 --- a/src/components/MetaItems/Author/Author.tsx +++ b/src/components/MetaItems/Author/Author.tsx @@ -10,6 +10,7 @@ const Author = ({ name, kind }: { name: string; kind: MetaKind }) => { title={intl.formatMessage({ defaultMessage: 'Written by:', description: 'Author: article author meta label', + id: 'jCyqZS', })} value={name} kind={kind} diff --git a/src/components/MetaItems/CommentsCount/CommentsCount.tsx b/src/components/MetaItems/CommentsCount/CommentsCount.tsx index bd1990d..04cffa6 100644 --- a/src/components/MetaItems/CommentsCount/CommentsCount.tsx +++ b/src/components/MetaItems/CommentsCount/CommentsCount.tsx @@ -15,6 +15,7 @@ const CommentsCount = ({ total, kind }: { total: number; kind: MetaKind }) => { defaultMessage: '{total, plural, =0 {No comments} one {# comment} other {# comments}}', description: 'CommentsCount: comment count value', + id: 'lKGNKx', }, { total } ); @@ -25,6 +26,7 @@ const CommentsCount = ({ total, kind }: { total: number; kind: MetaKind }) => { title={intl.formatMessage({ defaultMessage: 'Comments:', description: 'CommentsCount: comment count meta label', + id: '6BRtAu', })} value={ isArticle() ? ( diff --git a/src/components/MetaItems/Dates/Dates.tsx b/src/components/MetaItems/Dates/Dates.tsx index 04dff3a..4314ed9 100644 --- a/src/components/MetaItems/Dates/Dates.tsx +++ b/src/components/MetaItems/Dates/Dates.tsx @@ -27,6 +27,7 @@ const Dates = ({ title={intl.formatMessage({ defaultMessage: 'Published on:', description: 'Dates: publication date meta label', + id: '52Fev1', })} values={[