aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Widgets
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-03-24 15:02:39 +0100
committerArmand Philippot <git@armandphilippot.com>2022-03-24 15:02:39 +0100
commitef15022857409312e2b26585ba194f9838bf1262 (patch)
tree4db2b9cb28eb823a1aacb10eaecc41c4964e5869 /src/components/Widgets
parent8bb3431fc1c545643511e586e6fa7218521b716f (diff)
parent9226671f49b507ce6f71e6e2c3621014f05f74e9 (diff)
refactor: replace babel with swc
The build time will be faster with SWC.
Diffstat (limited to 'src/components/Widgets')
-rw-r--r--src/components/Widgets/CVPreview/CVPreview.tsx1
-rw-r--r--src/components/Widgets/RecentPosts/RecentPosts.tsx2
-rw-r--r--src/components/Widgets/RelatedThematics/RelatedThematics.tsx1
-rw-r--r--src/components/Widgets/RelatedTopics/RelatedTopics.tsx1
-rw-r--r--src/components/Widgets/Sharing/Sharing.tsx12
-rw-r--r--src/components/Widgets/SocialMedia/SocialMedia.tsx4
-rw-r--r--src/components/Widgets/ThematicsList/ThematicsList.tsx1
-rw-r--r--src/components/Widgets/ToC/ToC.tsx3
-rw-r--r--src/components/Widgets/TopicsList/TopicsList.tsx1
9 files changed, 25 insertions, 1 deletions
diff --git a/src/components/Widgets/CVPreview/CVPreview.tsx b/src/components/Widgets/CVPreview/CVPreview.tsx
index 08a4c72..cf6a8fa 100644
--- a/src/components/Widgets/CVPreview/CVPreview.tsx
+++ b/src/components/Widgets/CVPreview/CVPreview.tsx
@@ -28,6 +28,7 @@ const CVPreview = ({
<FormattedMessage
defaultMessage="Download <link>CV in PDF</link>"
description="CVPreview: download as PDF link"
+ id="xC3Khf"
values={{
link: (chunks: string) => (
<Link href={pdf}>
diff --git a/src/components/Widgets/RecentPosts/RecentPosts.tsx b/src/components/Widgets/RecentPosts/RecentPosts.tsx
index 1a58574..11d8558 100644
--- a/src/components/Widgets/RecentPosts/RecentPosts.tsx
+++ b/src/components/Widgets/RecentPosts/RecentPosts.tsx
@@ -44,6 +44,7 @@ const RecentPosts = ({ posts }: { posts: PostsList }) => {
{intl.formatMessage({
defaultMessage: 'Published on:',
description: 'RecentPosts: publication date label',
+ id: '1h+N2z',
})}
</dt>
<dd>
@@ -64,6 +65,7 @@ const RecentPosts = ({ posts }: { posts: PostsList }) => {
return intl.formatMessage({
defaultMessage: 'Failed to load.',
description: 'RecentPosts: failed to load text',
+ id: 'iyEh0R',
});
if (!data) return <Spinner />;
diff --git a/src/components/Widgets/RelatedThematics/RelatedThematics.tsx b/src/components/Widgets/RelatedThematics/RelatedThematics.tsx
index 74325bb..a66de82 100644
--- a/src/components/Widgets/RelatedThematics/RelatedThematics.tsx
+++ b/src/components/Widgets/RelatedThematics/RelatedThematics.tsx
@@ -27,6 +27,7 @@ const RelatedThematics = ({ thematics }: { thematics: ThematicPreview[] }) => {
defaultMessage:
'{thematicsCount, plural, =0 {Related thematics} one {Related thematic} other {Related thematics}}',
description: 'RelatedThematics: widget title',
+ id: 'qXQETZ',
},
{ thematicsCount: thematics.length }
)}
diff --git a/src/components/Widgets/RelatedTopics/RelatedTopics.tsx b/src/components/Widgets/RelatedTopics/RelatedTopics.tsx
index 1702e82..992173d 100644
--- a/src/components/Widgets/RelatedTopics/RelatedTopics.tsx
+++ b/src/components/Widgets/RelatedTopics/RelatedTopics.tsx
@@ -27,6 +27,7 @@ const RelatedTopics = ({ topics }: { topics: TopicPreview[] }) => {
defaultMessage:
'{topicsCount, plural, =0 {Related topics} one {Related topic} other {Related topics}}',
description: 'RelatedTopics: widget title',
+ id: 'w/lPUh',
},
{ topicsCount: topicsList.length }
)}
diff --git a/src/components/Widgets/Sharing/Sharing.tsx b/src/components/Widgets/Sharing/Sharing.tsx
index dd2d2a0..45fe3ce 100644
--- a/src/components/Widgets/Sharing/Sharing.tsx
+++ b/src/components/Widgets/Sharing/Sharing.tsx
@@ -1,5 +1,4 @@
import { ExpandableWidget } from '@components/WidgetParts';
-import { getIntlInstance } from '@utils/helpers/i18n';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { useIntl } from 'react-intl';
@@ -58,10 +57,12 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
const intro = intl.formatMessage({
defaultMessage: 'Introduction:',
description: 'Sharing: email content prefix',
+ id: 'yfgMcl',
});
const readMore = intl.formatMessage({
defaultMessage: 'Read more here:',
description: 'Sharing: content link prefix',
+ id: 'UsQske',
});
const body = `${intro}\n\n"${pageExcerpt}"\n\n${readMore} ${pageUrl}`;
sharingUrl += encodeURI(body);
@@ -76,6 +77,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
{
defaultMessage: 'Seen on {domainName}:',
description: 'Sharing: seen on text',
+ id: 'eUXMG4',
},
{ domainName }
)
@@ -101,6 +103,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
name: intl.formatMessage({
defaultMessage: 'Diaspora',
description: 'Sharing: Diaspora',
+ id: 'Dhow1m',
}),
parameters: {
content: '',
@@ -115,6 +118,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
name: intl.formatMessage({
defaultMessage: 'Facebook',
description: 'Sharing: Facebook',
+ id: '7iiaRx',
}),
parameters: {
content: '',
@@ -129,6 +133,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
name: intl.formatMessage({
defaultMessage: 'LinkedIn',
description: 'Sharing: LinkedIn',
+ id: 'csCQQk',
}),
parameters: {
content: '',
@@ -143,6 +148,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
name: intl.formatMessage({
defaultMessage: 'Twitter',
description: 'Sharing: Twitter',
+ id: 'WjVBnY',
}),
parameters: {
content: '',
@@ -157,6 +163,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
name: intl.formatMessage({
defaultMessage: 'Journal du hacker',
description: 'Sharing: Journal du hacker',
+ id: 'P0I+Xm',
}),
parameters: {
content: '',
@@ -171,6 +178,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
name: intl.formatMessage({
defaultMessage: 'Email',
description: 'Sharing: Email',
+ id: 'lKZm9t',
}),
parameters: {
content: 'body',
@@ -200,6 +208,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
{
defaultMessage: 'Share on {name}',
description: 'Sharing: share on social network text',
+ id: 'ureXFw',
},
{ name }
)}
@@ -215,6 +224,7 @@ const Sharing = ({ excerpt, title }: { excerpt: string; title: string }) => {
title={intl.formatMessage({
defaultMessage: 'Share',
description: 'Sharing: widget title',
+ id: 'q3U6uI',
})}
expand={true}
>
diff --git a/src/components/Widgets/SocialMedia/SocialMedia.tsx b/src/components/Widgets/SocialMedia/SocialMedia.tsx
index f96d10f..decf657 100644
--- a/src/components/Widgets/SocialMedia/SocialMedia.tsx
+++ b/src/components/Widgets/SocialMedia/SocialMedia.tsx
@@ -27,6 +27,7 @@ const SocialMedia = ({
name: intl.formatMessage({
defaultMessage: 'Github',
description: 'SocialMedia: Github',
+ id: 'SWjj4l',
}),
url: 'https://github.com/ArmandPhilippot',
},
@@ -35,6 +36,7 @@ const SocialMedia = ({
name: intl.formatMessage({
defaultMessage: 'Gitlab',
description: 'SocialMedia: Gitlab',
+ id: 'obmlFh',
}),
url: 'https://gitlab.com/ArmandPhilippot',
},
@@ -43,6 +45,7 @@ const SocialMedia = ({
name: intl.formatMessage({
defaultMessage: 'LinkedIn',
description: 'SocialMedia: LinkedIn',
+ id: 'VbcHZ4',
}),
url: 'https://www.linkedin.com/in/armandphilippot',
},
@@ -51,6 +54,7 @@ const SocialMedia = ({
name: intl.formatMessage({
defaultMessage: 'Twitter',
description: 'SocialMedia: Twitter',
+ id: 'IPs/Ck',
}),
url: 'https://twitter.com/ArmandPhilippot',
},
diff --git a/src/components/Widgets/ThematicsList/ThematicsList.tsx b/src/components/Widgets/ThematicsList/ThematicsList.tsx
index f50a069..51254ee 100644
--- a/src/components/Widgets/ThematicsList/ThematicsList.tsx
+++ b/src/components/Widgets/ThematicsList/ThematicsList.tsx
@@ -35,6 +35,7 @@ const ThematicsList = ({
{intl.formatMessage({
defaultMessage: 'Failed to load.',
description: 'ThematicsList: failed to load text',
+ id: 'PxMDzL',
})}
</ul>
);
diff --git a/src/components/Widgets/ToC/ToC.tsx b/src/components/Widgets/ToC/ToC.tsx
index 89ca8d4..3f759db 100644
--- a/src/components/Widgets/ToC/ToC.tsx
+++ b/src/components/Widgets/ToC/ToC.tsx
@@ -9,6 +9,7 @@ const ToC = () => {
const title = intl.formatMessage({
defaultMessage: 'Table of contents',
description: 'ToC: widget title',
+ id: 'Zg4L7U',
});
const getItems = (headings: Heading[]) => {
@@ -19,6 +20,7 @@ const ToC = () => {
<FormattedMessage
defaultMessage="<a11y>Jump to </a11y>{title}"
description="ToC: link"
+ id="GgIWnN"
values={{
title: heading.title,
a11y: (chunks: string) => (
@@ -42,6 +44,7 @@ const ToC = () => {
defaultMessage:
'Javascript is required to use the table of contents.',
description: 'ToC: noscript tag',
+ id: 'RZzx/4',
})}
</noscript>
<OrderedList items={getItems(headingsTree)} />
diff --git a/src/components/Widgets/TopicsList/TopicsList.tsx b/src/components/Widgets/TopicsList/TopicsList.tsx
index 55bf5af..7bc7d70 100644
--- a/src/components/Widgets/TopicsList/TopicsList.tsx
+++ b/src/components/Widgets/TopicsList/TopicsList.tsx
@@ -35,6 +35,7 @@ const TopicsList = ({
{intl.formatMessage({
defaultMessage: 'Failed to load.',
description: 'TopicsList: failed to load text',
+ id: '00Pf5p',
})}
</ul>
);