From e4d5b8151802517b2943756fc0d09ffa95e2c4e2 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sat, 29 Jan 2022 18:21:37 +0100
Subject: chore: replace lingui functions with react-intl

---
 .../PaginationCursor/PaginationCursor.tsx           | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

(limited to 'src/components/PaginationCursor/PaginationCursor.tsx')

diff --git a/src/components/PaginationCursor/PaginationCursor.tsx b/src/components/PaginationCursor/PaginationCursor.tsx
index bcbb555..a8c6265 100644
--- a/src/components/PaginationCursor/PaginationCursor.tsx
+++ b/src/components/PaginationCursor/PaginationCursor.tsx
@@ -1,4 +1,4 @@
-import { plural, t } from '@lingui/macro';
+import { useIntl } from 'react-intl';
 import styles from './PaginationCursor.module.scss';
 
 const PaginationCursor = ({
@@ -8,6 +8,8 @@ const PaginationCursor = ({
   current: number;
   total: number;
 }) => {
+  const intl = useIntl();
+
   return (
     <div className={styles.wrapper}>
       <progress
@@ -16,12 +18,19 @@ const PaginationCursor = ({
         value={current}
         aria-valuemin={0}
         aria-valuemax={total}
-        aria-label={t`Number of articles loaded out of the total available.`}
-        title={plural(current, {
-          zero: `# articles out of a total of ${total}`,
-          one: `# article out of a total of ${total}`,
-          other: `# articles out of a total of ${total}`,
+        aria-label={intl.formatMessage({
+          defaultMessage:
+            'Number of articles loaded out of the total available.',
+          description: 'PaginationCursor: loaded articles count aria-label',
         })}
+        title={intl.formatMessage(
+          {
+            defaultMessage:
+              '{articlesCount, plural, =0 {# articles} one {# article} other {# articles}} out of a total of {total}',
+            description: 'PaginationCursor: loaded articles count message',
+          },
+          { articlesCount: current, total }
+        )}
       ></progress>
     </div>
   );
-- 
cgit v1.2.3

