diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-03-24 15:02:39 +0100 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-03-24 15:02:39 +0100 | 
| commit | ef15022857409312e2b26585ba194f9838bf1262 (patch) | |
| tree | 4db2b9cb28eb823a1aacb10eaecc41c4964e5869 /src/components | |
| parent | 8bb3431fc1c545643511e586e6fa7218521b716f (diff) | |
| parent | 9226671f49b507ce6f71e6e2c3621014f05f74e9 (diff) | |
refactor: replace babel with swc
The build time will be faster with SWC.
Diffstat (limited to 'src/components')
48 files changed, 201 insertions, 24 deletions
| diff --git a/src/components/Branding/Branding.tsx b/src/components/Branding/Branding.tsx index 5c76fd2..b19116d 100644 --- a/src/components/Branding/Branding.tsx +++ b/src/components/Branding/Branding.tsx @@ -76,6 +76,7 @@ const Branding: BrandingReturn = ({ isHome = false }) => {                  {                    defaultMessage: '{brandingName} picture',                    description: 'Branding: branding name picture.', +                  id: 'ILRLTq',                  },                  {                    brandingName: settings.name, diff --git a/src/components/Breadcrumb/Breadcrumb.tsx b/src/components/Breadcrumb/Breadcrumb.tsx index 92350c0..a7b945a 100644 --- a/src/components/Breadcrumb/Breadcrumb.tsx +++ b/src/components/Breadcrumb/Breadcrumb.tsx @@ -25,6 +25,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {                {intl.formatMessage({                  defaultMessage: 'Home',                  description: 'Breadcrumb: Home item', +                id: 'Enij19',                })}              </a>            </Link> @@ -37,6 +38,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {                    {intl.formatMessage({                      defaultMessage: 'Blog',                      description: 'Breadcrumb: Blog item', +                    id: 'z0ic9c',                    })}                  </a>                </Link> @@ -51,6 +53,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {                    {intl.formatMessage({                      defaultMessage: 'Projects',                      description: 'Breadcrumb: Projects item', +                    id: 'Igx3qp',                    })}                  </a>                </Link> @@ -70,6 +73,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {        name: intl.formatMessage({          defaultMessage: 'Home',          description: 'Breadcrumb: Home item', +        id: 'Enij19',        }),        item: settings.url,      }; @@ -83,6 +87,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {          name: intl.formatMessage({            defaultMessage: 'Blog',            description: 'Breadcrumb: Blog item', +          id: 'z0ic9c',          }),          item: `${settings.url}/blog`,        }; @@ -97,6 +102,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {          name: intl.formatMessage({            defaultMessage: 'Projects',            description: 'Breadcrumb: Projects item', +          id: 'Igx3qp',          }),          item: `${settings.url}/projets`,        }; @@ -136,6 +142,7 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => {              {intl.formatMessage({                defaultMessage: 'You are here:',                description: 'Breadcrumb: You are here prefix', +              id: '16zl9Z',              })}            </span>            <ol className={styles.list}>{getItems()}</ol> diff --git a/src/components/Buttons/ButtonHelp/ButtonHelp.tsx b/src/components/Buttons/ButtonHelp/ButtonHelp.tsx index 252e58c..2616a8f 100644 --- a/src/components/Buttons/ButtonHelp/ButtonHelp.tsx +++ b/src/components/Buttons/ButtonHelp/ButtonHelp.tsx @@ -32,6 +32,7 @@ const ButtonHelp = ({          {intl.formatMessage({            defaultMessage: 'Help',            description: 'ButtonHelp: screen reader text', +          id: 'oPf+XA',          })}        </span>      </button> diff --git a/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx b/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx index e9f6079..7ceb70d 100644 --- a/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx +++ b/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx @@ -44,6 +44,7 @@ const ButtonToolbar = (              {                defaultMessage: 'Close {type}',                description: 'ButtonToolbar: Close button', +              id: 'SWq8a4',              },              {                type, @@ -56,6 +57,7 @@ const ButtonToolbar = (              {                defaultMessage: 'Open {type}',                description: 'ButtonToolbar: Open button', +              id: 'Z1eSIz',              },              {                type, diff --git a/src/components/Comment/Comment.tsx b/src/components/Comment/Comment.tsx index e20c5aa..355363b 100644 --- a/src/components/Comment/Comment.tsx +++ b/src/components/Comment/Comment.tsx @@ -56,6 +56,7 @@ const Comment = ({        {          defaultMessage: '{date} at {time}',          description: 'Comment: publication date', +        id: 'CT3ydM',        },        {          date, @@ -88,6 +89,7 @@ const Comment = ({                {intl.formatMessage({                  defaultMessage: 'Published on:',                  description: 'Comment: publication date label', +                id: 'soj7do',                })}              </dt>              <dd> @@ -109,10 +111,12 @@ const Comment = ({                    ? intl.formatMessage({                        defaultMessage: 'Cancel reply',                        description: 'Comment: reply button', +                      id: 'e1Forh',                      })                    : intl.formatMessage({                        defaultMessage: 'Reply',                        description: 'Comment: reply button', +                      id: 'hzHuCc',                      })}                </Button>              </footer> @@ -148,6 +152,7 @@ const Comment = ({          {intl.formatMessage({            defaultMessage: 'This comment is awaiting moderation.',            description: 'Comment: awaiting moderation message', +          id: 'rXeTkM',          })}        </p>      ); diff --git a/src/components/CommentForm/CommentForm.tsx b/src/components/CommentForm/CommentForm.tsx index eb7c100..128dc58 100644 --- a/src/components/CommentForm/CommentForm.tsx +++ b/src/components/CommentForm/CommentForm.tsx @@ -63,6 +63,7 @@ const CommentForm = ({            intl.formatMessage({              defaultMessage: 'Thanks for your comment!',              description: 'CommentForm: success notice', +            id: 'AVUUgG',            })          );        } else { @@ -71,6 +72,7 @@ const CommentForm = ({              defaultMessage:                'Thanks for your comment! It is now awaiting moderation.',              description: 'CommentForm: success notice but awaiting moderation', +            id: 'Ul2NIl',            })          );        } @@ -85,6 +87,7 @@ const CommentForm = ({            defaultMessage:              'An unexpected error happened. Comment cannot be submitted.',            description: 'CommentForm: error notice', +          id: 'cjK9Ad',          })        );      } @@ -105,6 +108,7 @@ const CommentForm = ({            defaultMessage:              'Some required fields are empty. Comment cannot be submitted.',            description: 'CommentForm: missing required fields', +          id: 'Rle+UK',          })        );      } @@ -126,21 +130,25 @@ const CommentForm = ({    const nameLabelBody = intl.formatMessage({      defaultMessage: 'Name',      description: 'CommentForm: Name field label', +    id: 'F7QxJH',    });    const emailLabelBody = intl.formatMessage({      defaultMessage: 'Email',      description: 'CommentForm: Email field label', +    id: 'Oim3rQ',    });    const websiteLabelBody = intl.formatMessage({      defaultMessage: 'Website',      description: 'CommentForm: Website field label', +    id: 'jN+dY5',    });    const commentLabelBody = intl.formatMessage({      defaultMessage: 'Comment',      description: 'CommentForm: Comment field label', +    id: 'J4nhm4',    });    return ( @@ -149,6 +157,7 @@ const CommentForm = ({          {intl.formatMessage({            defaultMessage: 'Leave a comment',            description: 'CommentForm: Form title', +          id: '+aHn7j',          })}        </h2>        <Form @@ -202,12 +211,14 @@ const CommentForm = ({              {intl.formatMessage({                defaultMessage: 'Javascript is required to post a comment.',                description: 'CommentForm: noscript tag', +              id: 'g1cFCa',              })}            </noscript>            <ButtonSubmit>              {intl.formatMessage({                defaultMessage: 'Send',                description: 'CommentForm: Send button', +              id: 'WGFOmA',              })}            </ButtonSubmit>          </FormItem> @@ -217,6 +228,7 @@ const CommentForm = ({            message={intl.formatMessage({              defaultMessage: 'Submitting...',              description: 'CommentForm: submitting message', +            id: 'HEJ3Gv',            })}          />        )} diff --git a/src/components/CommentsList/CommentsList.tsx b/src/components/CommentsList/CommentsList.tsx index 4ea2fc2..0eaac17 100644 --- a/src/components/CommentsList/CommentsList.tsx +++ b/src/components/CommentsList/CommentsList.tsx @@ -25,6 +25,7 @@ const CommentsList = ({        return intl.formatMessage({          defaultMessage: 'Failed to load.',          description: 'CommentsList: failed to load', +        id: 'Zlkww3',        });      } @@ -47,6 +48,7 @@ const CommentsList = ({          {intl.formatMessage({            defaultMessage: 'Comments',            description: 'CommentsList: Comments section title', +          id: 'Ns8CFb',          })}        </h2>        {data && data.length > 0 ? ( @@ -56,6 +58,7 @@ const CommentsList = ({            {intl.formatMessage({              defaultMessage: 'No comments yet.',              description: 'CommentsList: No comment message', +            id: 'e9L59q',            })}          </p>        )} diff --git a/src/components/ContactForm/ContactForm.tsx b/src/components/ContactForm/ContactForm.tsx index 48772a0..5af6982 100644 --- a/src/components/ContactForm/ContactForm.tsx +++ b/src/components/ContactForm/ContactForm.tsx @@ -34,6 +34,7 @@ const ContactForm = () => {            defaultMessage:              'Warning: mail not sent. Some required fields are empty.',            description: 'ContactForm: missing fields message.', +          id: 'WpycgB',          })        );        return; @@ -57,6 +58,7 @@ const ContactForm = () => {            defaultMessage:              'Thanks. Your message was successfully sent. I will answer it as soon as possible.',            description: 'ContactForm: success message', +          id: 'gQKeF+',          })        );        resetForm(); @@ -64,6 +66,7 @@ const ContactForm = () => {        const errorPrefix = intl.formatMessage({          defaultMessage: 'An error occurred:',          description: 'ContactForm: error message', +        id: 'pTxT7N',        });        const error = `${errorPrefix} ${mail.message}`;        setStatus('error'); @@ -94,21 +97,25 @@ const ContactForm = () => {    const nameLabelBody = intl.formatMessage({      defaultMessage: 'Name',      description: 'ContactForm: name field label', +    id: '6ibqFS',    });    const emailLabelBody = intl.formatMessage({      defaultMessage: 'Email',      description: 'ContactForm: email field label', +    id: 'Vuryko',    });    const subjectLabelBody = intl.formatMessage({      defaultMessage: 'Subject',      description: 'ContactForm: subject field label', +    id: 'uMURuJ',    });    const messageLabelBody = intl.formatMessage({      defaultMessage: 'Message',      description: 'ContactForm: message field label', +    id: '0zBQpa',    });    return ( @@ -160,6 +167,7 @@ const ContactForm = () => {              {intl.formatMessage({                defaultMessage: 'Send',                description: 'ContactForm: send button text', +              id: 'X7n7N2',              })}            </ButtonSubmit>          </FormItem> diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index 4aa980d..381b4a8 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -41,6 +41,7 @@ const Footer = () => {              {intl.formatMessage({                defaultMessage: 'Back to top',                description: 'Footer: Back to top button', +              id: 'dqrd6I',              })}            </span>            <ArrowIcon direction="top" /> diff --git a/src/components/FooterNav/FooterNav.tsx b/src/components/FooterNav/FooterNav.tsx index 7167b69..763e951 100644 --- a/src/components/FooterNav/FooterNav.tsx +++ b/src/components/FooterNav/FooterNav.tsx @@ -12,6 +12,7 @@ const FooterNav = () => {        name: intl.formatMessage({          defaultMessage: 'Legal notice',          description: 'FooterNav: legal notice link', +        id: 'yWjXRx',        }),        slug: '/mentions-legales',      }, @@ -33,6 +34,7 @@ const FooterNav = () => {        aria-label={intl.formatMessage({          defaultMessage: 'Footer',          description: 'FooterNav: aria-label', +        id: 'HTdaZj',        })}      >        <ul className={styles.list}>{navItems}</ul> diff --git a/src/components/Icons/Moon/Moon.tsx b/src/components/Icons/Moon/Moon.tsx index acdf6ae..26f56a1 100644 --- a/src/components/Icons/Moon/Moon.tsx +++ b/src/components/Icons/Moon/Moon.tsx @@ -14,6 +14,7 @@ const MoonIcon = () => {          {intl.formatMessage({            defaultMessage: 'Dark theme',            description: 'Icons: Moon icon (dark theme)', +          id: 'ode0YK',          })}        </title>        <path d="M 51.077315,1.9893942 A 43.319985,43.319985 0 0 1 72.840039,39.563145 43.319985,43.319985 0 0 1 29.520053,82.88313 43.319985,43.319985 0 0 1 5.4309911,75.569042 48.132997,48.132997 0 0 0 46.126047,98 48.132997,48.132997 0 0 0 94.260004,49.867002 48.132997,48.132997 0 0 0 51.077315,1.9893942 Z" /> diff --git a/src/components/Icons/Sun/Sun.tsx b/src/components/Icons/Sun/Sun.tsx index 44945c2..12f47d3 100644 --- a/src/components/Icons/Sun/Sun.tsx +++ b/src/components/Icons/Sun/Sun.tsx @@ -14,6 +14,7 @@ const SunIcon = () => {          {intl.formatMessage({            defaultMessage: 'Light theme',            description: 'Icons: Sun icon (light theme)', +          id: 'KeRtm/',          })}        </title>        <path d="M 69.398043,50.000437 A 19.399259,19.399204 0 0 1 49.998784,69.399641 19.399259,19.399204 0 0 1 30.599525,50.000437 19.399259,19.399204 0 0 1 49.998784,30.601234 19.399259,19.399204 0 0 1 69.398043,50.000437 Z m 27.699233,1.125154 c 2.657696,0.0679 1.156196,12.061455 -1.435545,11.463959 L 80.113224,59.000697 c -2.589801,-0.597494 -1.625657,-8.345536 1.032041,-8.278609 z m -18.06653,37.251321 c 1.644087,2.091234 -9.030355,8.610337 -10.126414,6.188346 L 62.331863,80.024585 c -1.096058,-2.423931 5.197062,-6.285342 6.839209,-4.194107 z M 38.611418,97.594444 C 38.02653,100.18909 26.24148,95.916413 27.436475,93.54001 l 7.168026,-14.256474 c 1.194024,-2.376403 8.102101,0.151313 7.517214,2.744986 z M 6.1661563,71.834242 C 3.7916868,73.028262 -0.25499873,61.16274 2.3386824,60.577853 L 17.905618,57.067567 c 2.593681,-0.584886 4.894434,6.403678 2.518995,7.598668 z M 6.146757,30.055146 c -2.3764094,-1.194991 4.46571,-11.714209 6.479353,-9.97798 l 12.090589,10.414462 c 2.014613,1.736229 -1.937017,7.926514 -4.314396,6.731524 z M 38.56777,4.2639045 C 37.982883,1.6682911 50.480855,0.41801247 50.415868,3.0766733 L 50.020123,19.028638 c -0.06596,2.657691 -7.357169,3.394862 -7.943027,0.800218 z m 40.403808,9.1622435 c 1.635357,-2.098023 10.437771,6.872168 8.339742,8.506552 l -12.58818,9.805327 c -2.099,1.634383 -7.192276,-3.626682 -5.557888,-5.724706 z M 97.096306,50.69105 c 2.657696,-0.06596 1.164926,12.462047 -1.425846,11.863582 L 80.122924,58.96578 c -2.590771,-0.597496 -1.636327,-7.814 1.021371,-7.879957 z" /> diff --git a/src/components/Layouts/Layout.tsx b/src/components/Layouts/Layout.tsx index 23c1d0e..ada32b3 100644 --- a/src/components/Layouts/Layout.tsx +++ b/src/components/Layouts/Layout.tsx @@ -121,6 +121,7 @@ const Layout = ({          {intl.formatMessage({            defaultMessage: 'Skip to content',            description: 'Layout: Skip to content button', +          id: 'iqAbyn',          })}        </a>        <Header isHome={isHome} /> @@ -132,6 +133,7 @@ const Layout = ({              defaultMessage:                'Without Javascript, some features may not work like loading more posts or use search. If you want to benefit from these features, please activate Javascript.',              description: 'Layout: noscript banner', +            id: 'LR70nt',            })}          </div>        </noscript> diff --git a/src/components/MDX/CodeBlock/CodeBlock.tsx b/src/components/MDX/CodeBlock/CodeBlock.tsx index b5cb30e..c330063 100644 --- a/src/components/MDX/CodeBlock/CodeBlock.tsx +++ b/src/components/MDX/CodeBlock/CodeBlock.tsx @@ -1,28 +1,25 @@ +import { +  PrismDefaultPlugins, +  PrismLanguages, +  PrismPlugins, +} from '@ts/types/prism'; +import { usePrismTheme } from '@utils/providers/prism-theme';  import { useRouter } from 'next/router';  import Prism from 'prismjs'; -import { ReactChildren, useEffect } from 'react'; +import { useCallback, useEffect, useMemo } from 'react';  import { useIntl } from 'react-intl'; -import '@utils/plugins/prism-color-scheme'; -import { usePrismTheme } from '@utils/providers/prism';  const CodeBlock = ({ -  className, -  children, +  code, +  language, +  plugins,  }: { -  className: string; -  children: ReactChildren; +  code: string; +  language: PrismLanguages; +  plugins: PrismPlugins[];  }) => { -  const classNames = className.split('+'); -  const languageClass = classNames.find((name: string) => -    name.startsWith('language-') -  );    const intl = useIntl();    const router = useRouter(); - -  useEffect(() => { -    Prism.highlightAll(); -  }, []); -    const { setCodeBlocks } = usePrismTheme();    useEffect(() => { @@ -32,39 +29,86 @@ const CodeBlock = ({      setCodeBlocks(allPre);    }, [setCodeBlocks, router.asPath]); +  const defaultPlugins: PrismDefaultPlugins[] = useMemo( +    () => [ +      'autoloader', +      'toolbar', +      'show-language', +      'copy-to-clipboard', +      'color-scheme', +      'match-braces', +      'normalize-whitespace', +    ], +    [] +  ); + +  const loadPrismPlugins = useCallback( +    async (prismPlugins: (PrismDefaultPlugins | PrismPlugins)[]) => { +      for (const plugin of prismPlugins) { +        try { +          if (plugin === 'color-scheme') { +            await import(`@utils/plugins/prism-${plugin}`); +          } else { +            await import(`prismjs/plugins/${plugin}/prism-${plugin}.min.js`); + +            if (plugin === 'autoloader') +              Prism.plugins.autoloader.languages_path = '/prism/'; +          } +        } catch (error) { +          console.error('CodeBlock: an error occurred with Prism.'); +          console.error(error); +        } +      } +    }, +    [] +  ); + +  useEffect(() => { +    loadPrismPlugins([...defaultPlugins, ...plugins]).then(() => { +      Prism.highlightAll(); +    }); +  }, [loadPrismPlugins, defaultPlugins, plugins]); +    const copyText = intl.formatMessage({      defaultMessage: 'Copy',      description: 'Prism: copy button text (no clicked)', +    id: '/ly3AC',    });    const copiedText = intl.formatMessage({      defaultMessage: 'Copied!',      description: 'Prism: copy button text (clicked)', +    id: 'OV9r1K',    });    const errorText = intl.formatMessage({      defaultMessage: 'Use Ctrl+c to copy',      description: 'Prism: error text', +    id: 'z9qkcQ',    });    const darkTheme = intl.formatMessage({      defaultMessage: 'Dark Theme 🌙',      description: 'Prism: toggle dark theme button text', +    id: 'nFMdWI',    });    const lightTheme = intl.formatMessage({      defaultMessage: 'Light Theme 🌞',      description: 'Prism: toggle light theme button text', +    id: 'Ua2g2p',    }); +  const defaultPluginsClasses = 'match-braces'; +  const pluginsClasses = plugins.join(' '); +    return ( -    <div +    <pre +      className={`language-${language} ${defaultPluginsClasses} ${pluginsClasses}`}        data-prismjs-copy={copyText}        data-prismjs-copy-success={copiedText}        data-prismjs-copy-error={errorText}        data-prismjs-color-scheme-dark={darkTheme}        data-prismjs-color-scheme-light={lightTheme}      > -      <pre className={classNames.join(' ')}> -        <code className={languageClass}>{children}</code> -      </pre> -    </div> +      <code className={`language-${language}`}>{code}</code> +    </pre>    );  }; diff --git a/src/components/MainNav/MainNav.tsx b/src/components/MainNav/MainNav.tsx index dcaba30..9cb6b4c 100644 --- a/src/components/MainNav/MainNav.tsx +++ b/src/components/MainNav/MainNav.tsx @@ -32,6 +32,7 @@ const MainNav = (        name: intl.formatMessage({          defaultMessage: 'Home',          description: 'MainNav: home link', +        id: 'ZJMNRW',        }),        slug: '/',      }, @@ -40,6 +41,7 @@ const MainNav = (        name: intl.formatMessage({          defaultMessage: 'Blog',          description: 'MainNav: blog link', +        id: 'zPJifH',        }),        slug: '/blog',      }, @@ -48,6 +50,7 @@ const MainNav = (        name: intl.formatMessage({          defaultMessage: 'Projects',          description: 'MainNav: projects link', +        id: 'akSutM',        }),        slug: '/projets',      }, @@ -56,6 +59,7 @@ const MainNav = (        name: intl.formatMessage({          defaultMessage: 'Resume',          description: 'MainNav: resume link', +        id: 'jpv+Nz',        }),        slug: '/cv',      }, @@ -64,6 +68,7 @@ const MainNav = (        name: intl.formatMessage({          defaultMessage: 'Contact',          description: 'MainNav: contact link', +        id: 'c2NtPj',        }),        slug: '/contact',      }, @@ -124,10 +129,12 @@ const MainNav = (              ? intl.formatMessage({                  defaultMessage: 'Close menu',                  description: 'MainNav: close button', +                id: 'dE8xxV',                })              : intl.formatMessage({                  defaultMessage: 'Open menu',                  description: 'MainNav: open button', +                id: 'azc1GT',                })}          </span>        </label> @@ -136,6 +143,7 @@ const MainNav = (          aria-label={intl.formatMessage({            defaultMessage: 'Primary',            description: 'MainNav: aria-label', +          id: 'H7C5Bk',          })}        >          <ul className={styles.list}>{navItems}</ul> 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={[            <time key={publication} dateTime={publication}> @@ -40,6 +41,7 @@ const Dates = ({            title={intl.formatMessage({              defaultMessage: 'Updated on:',              description: 'Dates: update date meta label', +            id: 'C+r/LF',            })}            values={[              <time key={update} dateTime={update}> diff --git a/src/components/MetaItems/PostsCount/PostsCount.tsx b/src/components/MetaItems/PostsCount/PostsCount.tsx index 9fb1784..679abcd 100644 --- a/src/components/MetaItems/PostsCount/PostsCount.tsx +++ b/src/components/MetaItems/PostsCount/PostsCount.tsx @@ -10,12 +10,14 @@ const PostsCount = ({ total, kind }: { total: number; kind: MetaKind }) => {        title={intl.formatMessage({          defaultMessage: 'Total:',          description: 'PostCount: total found articles meta label', +        id: 'p1zZ/Z',        })}        value={intl.formatMessage(          {            defaultMessage:              '{total, plural, =0 {No articles} one {# article} other {# articles}}',            description: 'PostCount: total found articles', +          id: '4EMSLO',          },          { total }        )} diff --git a/src/components/MetaItems/ReadingTime/ReadingTime.tsx b/src/components/MetaItems/ReadingTime/ReadingTime.tsx index 94215b3..79d6f3c 100644 --- a/src/components/MetaItems/ReadingTime/ReadingTime.tsx +++ b/src/components/MetaItems/ReadingTime/ReadingTime.tsx @@ -20,6 +20,7 @@ const ReadingTime = ({        return intl.formatMessage({          defaultMessage: 'less than 1 minute',          description: 'ReadingTime: Reading time value', +        id: 'ySsWZl',        });      } @@ -28,6 +29,7 @@ const ReadingTime = ({          defaultMessage:            '{time, plural, =0 {# minutes} one {# minute} other {# minutes}}',          description: 'ReadingTime: reading time value', +        id: 'wdqOpf',        },        { time }      ); @@ -38,12 +40,14 @@ const ReadingTime = ({        title={intl.formatMessage({          defaultMessage: 'Reading time:',          description: 'ReadingTime: reading time meta label', +        id: 'n0Gbod',        })}        value={getEstimation()}        info={intl.formatMessage(          { -          defaultMessage: `Approximately {number} words`, +          defaultMessage: 'Approximately {number} words',            description: 'ReadingTime: number of words', +          id: 'k7/SkN',          },          { number: words.toLocaleString(locale) }        )} diff --git a/src/components/MetaItems/Thematics/Thematics.tsx b/src/components/MetaItems/Thematics/Thematics.tsx index a127715..e655c5d 100644 --- a/src/components/MetaItems/Thematics/Thematics.tsx +++ b/src/components/MetaItems/Thematics/Thematics.tsx @@ -30,6 +30,7 @@ const Thematics = ({            defaultMessage:              '{thematicsCount, plural, =0 {Thematics:} one {Thematic:} other {Thematics:}}',            description: 'Thematics: thematics list meta label', +          id: '1r4ujR',          },          { thematicsCount: list.length }        )} diff --git a/src/components/MetaItems/Topics/Topics.tsx b/src/components/MetaItems/Topics/Topics.tsx index 4f2dc1f..d5d90f0 100644 --- a/src/components/MetaItems/Topics/Topics.tsx +++ b/src/components/MetaItems/Topics/Topics.tsx @@ -24,6 +24,7 @@ const Topics = ({ list, kind }: { list: TopicPreview[]; kind: MetaKind }) => {            defaultMessage:              '{topicsCount, plural, =0 {Topics:} one {Topic:} other {Topics:}}',            description: 'Topics: topics list meta label', +          id: '0pp/IQ',          },          { topicsCount: list.length }        )} diff --git a/src/components/MetaItems/Website/Website.tsx b/src/components/MetaItems/Website/Website.tsx index bcf3fc8..7d2dc06 100644 --- a/src/components/MetaItems/Website/Website.tsx +++ b/src/components/MetaItems/Website/Website.tsx @@ -10,6 +10,7 @@ const Website = ({ url, kind }: { url: string; kind: MetaKind }) => {        title={intl.formatMessage({          defaultMessage: 'Website:',          description: 'Website: website meta label', +        id: 'JsOoAW',        })}        value={<a href={url}>{url}</a>}        kind={kind} diff --git a/src/components/Pagination/Pagination.tsx b/src/components/Pagination/Pagination.tsx index 2c24a8c..55c366a 100644 --- a/src/components/Pagination/Pagination.tsx +++ b/src/components/Pagination/Pagination.tsx @@ -23,6 +23,7 @@ const Pagination = ({ baseUrl, total }: { baseUrl: string; total: number }) => {                {                  defaultMessage: '{icon} Previous page',                  description: 'Pagination: previous page link', +                id: 'aMFqPH',                },                { icon: '←' }              )} @@ -41,6 +42,7 @@ const Pagination = ({ baseUrl, total }: { baseUrl: string; total: number }) => {                {                  defaultMessage: 'Next page {icon}',                  description: 'Pagination: Next page link', +                id: 'R4yaW6',                },                { icon: '→' }              )} @@ -62,6 +64,7 @@ const Pagination = ({ baseUrl, total }: { baseUrl: string; total: number }) => {                  {                    defaultMessage: '<a11y>Page </a11y>{number}',                    description: 'Pagination: page number', +                  id: 'TSXPzr',                  },                  {                    number: i, @@ -83,6 +86,7 @@ const Pagination = ({ baseUrl, total }: { baseUrl: string; total: number }) => {                    {                      defaultMessage: '<a11y>Page </a11y>{number}',                      description: 'Pagination: page number', +                    id: 'TSXPzr',                    },                    {                      number: i, @@ -117,6 +121,7 @@ const Pagination = ({ baseUrl, total }: { baseUrl: string; total: number }) => {          {intl.formatMessage({            defaultMessage: 'Pagination',            description: 'Pagination: pagination title', +          id: 'BAkq7J',          })}        </h2>        <ul className={styles.list}> diff --git a/src/components/PaginationCursor/PaginationCursor.tsx b/src/components/PaginationCursor/PaginationCursor.tsx index 3b0c15f..d64f961 100644 --- a/src/components/PaginationCursor/PaginationCursor.tsx +++ b/src/components/PaginationCursor/PaginationCursor.tsx @@ -18,6 +18,7 @@ const PaginationCursor = ({              defaultMessage:                '{articlesCount, plural, =0 {# loaded articles} one {# loaded article} other {# loaded articles}} out of a total of {total}',              description: 'PaginationCursor: loaded articles count message', +            id: 'du4MLN',            },            { articlesCount: current, total }          )} @@ -32,6 +33,7 @@ const PaginationCursor = ({            defaultMessage:              'Number of articles loaded out of the total available.',            description: 'PaginationCursor: loaded articles count aria-label', +          id: 'mC21ht',          })}        ></progress>      </div> diff --git a/src/components/PostFooter/PostFooter.tsx b/src/components/PostFooter/PostFooter.tsx index 6c97ec2..9bc4053 100644 --- a/src/components/PostFooter/PostFooter.tsx +++ b/src/components/PostFooter/PostFooter.tsx @@ -37,6 +37,7 @@ const PostFooter = ({ topics }: { topics: TopicPreview[] }) => {                {intl.formatMessage({                  defaultMessage: 'Read more articles about:',                  description: 'PostFooter: read more posts about given subjects', +                id: 'YEudoh',                })}              </dt>              <dd> diff --git a/src/components/PostPreview/PostPreview.tsx b/src/components/PostPreview/PostPreview.tsx index 8b20eca..0b9e332 100644 --- a/src/components/PostPreview/PostPreview.tsx +++ b/src/components/PostPreview/PostPreview.tsx @@ -100,6 +100,7 @@ const PostPreview = ({              <FormattedMessage                defaultMessage="Read more<a11y> about {title}</a11y>"                description="PostPreview: read more link" +              id="bkbrN7"                values={{                  title,                  a11y: (chunks: string) => ( diff --git a/src/components/PostsList/PostsList.tsx b/src/components/PostsList/PostsList.tsx index b57630e..f998846 100644 --- a/src/components/PostsList/PostsList.tsx +++ b/src/components/PostsList/PostsList.tsx @@ -37,6 +37,7 @@ const PostsList = (                  {intl.formatMessage({                    defaultMessage: 'Published on',                    description: 'PostsList: published on year label', +                  id: 'EvODgw',                  })}{' '}                </span>                {year} @@ -77,6 +78,7 @@ const PostsList = (              {intl.formatMessage({                defaultMessage: 'No results found.',                description: 'PostsList: no results', +              id: 'vK7Sxv',              })}            </p>          ); diff --git a/src/components/ProjectPreview/ProjectPreview.tsx b/src/components/ProjectPreview/ProjectPreview.tsx index 043d945..1e1ced2 100644 --- a/src/components/ProjectPreview/ProjectPreview.tsx +++ b/src/components/ProjectPreview/ProjectPreview.tsx @@ -25,6 +25,7 @@ const ProjectPreview = ({ project }: { project: Project }) => {                      {                        defaultMessage: '{title} picture',                        description: 'ProjectPreview: cover alt text', +                      id: '2pykor',                      },                      { title }                    )} @@ -49,6 +50,7 @@ const ProjectPreview = ({ project }: { project: Project }) => {                          defaultMessage:                            '{count, plural, =0 {Technologies:} one {Technology:} other {Technologies:}}',                          description: 'ProjectPreview: technologies list label', +                        id: 'okFrAO',                        },                        { count: meta.technologies.length }                      )} diff --git a/src/components/ProjectSummary/ProjectSummary.tsx b/src/components/ProjectSummary/ProjectSummary.tsx index e51015e..79e783e 100644 --- a/src/components/ProjectSummary/ProjectSummary.tsx +++ b/src/components/ProjectSummary/ProjectSummary.tsx @@ -33,6 +33,7 @@ const ProjectSummary = ({              alt={intl.formatMessage({                defaultMessage: '{title} preview',                description: 'ProjectSummary: cover alt text', +              id: 'mh7tGg',              })}              layout="fill"              objectFit="contain" @@ -46,6 +47,7 @@ const ProjectSummary = ({                {intl.formatMessage({                  defaultMessage: 'Created on:',                  description: 'ProjectSummary: creation date label', +                id: 'CWi0go',                })}              </dt>              <dd> @@ -61,6 +63,7 @@ const ProjectSummary = ({                {intl.formatMessage({                  defaultMessage: 'Last updated on:',                  description: 'ProjectSummary: update date label', +                id: 'vJ+QDV',                })}              </dt>              <dd> @@ -75,6 +78,7 @@ const ProjectSummary = ({              {intl.formatMessage({                defaultMessage: 'License:',                description: 'ProjectSummary: license label', +              id: 'hKagVG',              })}            </dt>            <dd>{license}</dd> @@ -87,6 +91,7 @@ const ProjectSummary = ({                    defaultMessage:                      '{count, plural, =0 {Technologies:} one {Technology:} other {Technologies:}}',                    description: 'ProjectSummary: technologies list label', +                  id: 'enwhNm',                  },                  { count: technologies.length }                )} @@ -109,6 +114,7 @@ const ProjectSummary = ({                    defaultMessage:                      '{count, plural, =0 {Repositories:} one {Repository:} other {Repositories:}}',                    description: 'ProjectSummary: repositories list label', +                  id: 'OTTv+m',                  },                  { count: Object.keys(repos).length }                )} @@ -143,6 +149,7 @@ const ProjectSummary = ({                {intl.formatMessage({                  defaultMessage: 'Popularity:',                  description: 'ProjectSummary: popularity label', +                id: 'vgMk0q',                })}              </dt>              {repos.github && ( @@ -154,6 +161,7 @@ const ProjectSummary = ({                        defaultMessage:                          '{starsCount, plural, =0 {0 stars on Github} one {# star on Github} other {# stars on Github}}',                        description: 'ProjectSummary: technologies list label', +                      id: 'aA3hOT',                      },                      { starsCount: data.stargazers_count }                    )} diff --git a/src/components/SearchForm/SearchForm.tsx b/src/components/SearchForm/SearchForm.tsx index fe809a3..f4735af 100644 --- a/src/components/SearchForm/SearchForm.tsx +++ b/src/components/SearchForm/SearchForm.tsx @@ -32,6 +32,7 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => {          {intl.formatMessage({            defaultMessage: 'Search',            description: 'SearchForm : form title', +          id: 'eFMu2E',          })}        </div>        <Form submitHandler={launchSearch} kind="search" id="search"> @@ -39,6 +40,7 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => {            {intl.formatMessage({              defaultMessage: 'Keywords:',              description: 'SearchForm: search field label', +            id: 'YvMPuD',            })}          </label>          <Field @@ -56,6 +58,7 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => {              {intl.formatMessage({                defaultMessage: 'Search',                description: 'SearchForm: search button text', +              id: 'AnaPbu',              })}            </span>          </ButtonSubmit> diff --git a/src/components/Settings/AckeeSelect/AckeeSelect.tsx b/src/components/Settings/AckeeSelect/AckeeSelect.tsx index e1a8ed8..f711fe2 100644 --- a/src/components/Settings/AckeeSelect/AckeeSelect.tsx +++ b/src/components/Settings/AckeeSelect/AckeeSelect.tsx @@ -14,6 +14,7 @@ const AckeeSelect = () => {        name: intl.formatMessage({          defaultMessage: 'Partial',          description: 'AckeeSelect: partial option name', +        id: 'e/8Kyj',        }),        value: 'partial',      }, @@ -22,6 +23,7 @@ const AckeeSelect = () => {        name: intl.formatMessage({          defaultMessage: 'Full',          description: 'AckeeSelect: full option name', +        id: 'PzRpPw',        }),        value: 'full',      }, @@ -47,6 +49,7 @@ const AckeeSelect = () => {        body={intl.formatMessage({          defaultMessage: 'Tracking:',          description: 'AckeeSelect: select label', +        id: '2pmylc',        })}        htmlFor="ackee-settings"        kind="settings" @@ -57,11 +60,13 @@ const AckeeSelect = () => {      intl.formatMessage({        defaultMessage: 'Partial includes only page url, views and duration.',        description: 'AckeeSelect: tooltip message', +      id: 'skb4W5',      }),      intl.formatMessage({        defaultMessage:          'Full includes all information from partial as well as information about referrer, operating system, device, browser, screen size and language.',        description: 'AckeeSelect: tooltip message', +      id: 'Ogccx6',      }),    ]; @@ -81,6 +86,7 @@ const AckeeSelect = () => {          title={intl.formatMessage({            defaultMessage: 'Ackee tracking (analytics)',            description: 'AckeeSelect: tooltip title', +          id: 'F1EQX3',          })}        />      </div> diff --git a/src/components/Settings/PrismThemeToggle/PrismThemeToggle.tsx b/src/components/Settings/PrismThemeToggle/PrismThemeToggle.tsx index 6f42f86..20ad267 100644 --- a/src/components/Settings/PrismThemeToggle/PrismThemeToggle.tsx +++ b/src/components/Settings/PrismThemeToggle/PrismThemeToggle.tsx @@ -1,7 +1,7 @@  import { Toggle } from '@components/FormElements';  import { MoonIcon, SunIcon } from '@components/Icons';  import Spinner from '@components/Spinner/Spinner'; -import { usePrismTheme } from '@utils/providers/prism'; +import { usePrismTheme } from '@utils/providers/prism-theme';  import { useEffect, useState } from 'react';  import { useIntl } from 'react-intl'; @@ -37,6 +37,7 @@ const PrismThemeToggle = () => {        label={intl.formatMessage({          defaultMessage: 'Code blocks:',          description: 'PrismThemeToggle: toggle label', +        id: 'w0UfY0',        })}        leftChoice={<SunIcon />}        rightChoice={<MoonIcon />} diff --git a/src/components/Settings/ReduceMotion/ReduceMotion.tsx b/src/components/Settings/ReduceMotion/ReduceMotion.tsx index d0f7980..00562cd 100644 --- a/src/components/Settings/ReduceMotion/ReduceMotion.tsx +++ b/src/components/Settings/ReduceMotion/ReduceMotion.tsx @@ -27,14 +27,17 @@ const ReduceMotion = () => {        label={intl.formatMessage({          defaultMessage: 'Animations:',          description: 'ReduceMotion: toggle label', +        id: 'X3PDXO',        })}        leftChoice={intl.formatMessage({          defaultMessage: 'On',          description: 'ReduceMotion: toggle on label', +        id: 'qPU/Qn',        })}        rightChoice={intl.formatMessage({          defaultMessage: 'Off',          description: 'ReduceMotion: toggle off label', +        id: 'w1nIrj',        })}        value={isDeactivated}        changeHandler={updateState} diff --git a/src/components/Settings/Settings.tsx b/src/components/Settings/Settings.tsx index 4ccb895..fec4c45 100644 --- a/src/components/Settings/Settings.tsx +++ b/src/components/Settings/Settings.tsx @@ -16,6 +16,7 @@ const Settings = () => {          {intl.formatMessage({            defaultMessage: 'Settings',            description: 'Settings: modal title', +          id: 'bHEmkY',          })}        </div>        <ThemeToggle /> diff --git a/src/components/Settings/ThemeToggle/ThemeToggle.tsx b/src/components/Settings/ThemeToggle/ThemeToggle.tsx index 77b2797..ec2cee1 100644 --- a/src/components/Settings/ThemeToggle/ThemeToggle.tsx +++ b/src/components/Settings/ThemeToggle/ThemeToggle.tsx @@ -28,6 +28,7 @@ const ThemeToggle = () => {        label={intl.formatMessage({          defaultMessage: 'Theme:',          description: 'ThemeToggle: toggle label', +        id: 'O9XLDc',        })}        leftChoice={<SunIcon />}        rightChoice={<MoonIcon />} diff --git a/src/components/Spinner/Spinner.tsx b/src/components/Spinner/Spinner.tsx index afe86f6..9117d90 100644 --- a/src/components/Spinner/Spinner.tsx +++ b/src/components/Spinner/Spinner.tsx @@ -14,6 +14,7 @@ const Spinner = ({ message }: { message?: string }) => {            intl.formatMessage({              defaultMessage: 'Loading...',              description: 'Spinner: loading text', +            id: 'q9cJQe',            })}        </div>      </div> diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 5929c96..56a87ab 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -29,10 +29,12 @@ const Tooltip = ({      ? intl.formatMessage({          defaultMessage: 'Close help',          description: 'Tooltip: button title', +        id: '9kx83j',        })      : intl.formatMessage({          defaultMessage: 'Show help',          description: 'Tooltip: button title', +        id: 'A5n+C9',        });    const wrapperModifier = isOpen ? styles.visible : styles.hidden; diff --git a/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx b/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx index 1040e7e..38e57ad 100644 --- a/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx +++ b/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx @@ -42,10 +42,12 @@ const ExpandableWidget = ({              ? intl.formatMessage({                  defaultMessage: 'Collapse',                  description: 'ExpandableWidget: collapse text', +                id: 'WRkY1/',                })              : intl.formatMessage({                  defaultMessage: 'Expand',                  description: 'ExpandableWidget: expand text', +                id: 'hV0qHp',                })}          </span>          <TitleTag className={styles.title}>{title}</TitleTag> 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>        ); | 
