From e701572161b8b3759e05b76d85e16f21f90b84ba Mon Sep 17 00:00:00 2001 From: Rahat Ali Date: Mon, 11 Dec 2023 12:38:08 +0500 Subject: [PATCH] fix: ar translations added (#6) --- src/components/Footer.jsx | 4 +-- src/components/Footer.messages.js | 11 ++---- .../__snapshots__/Footer.test.jsx.snap | 12 ++----- src/i18n/messages/ar.json | 34 ++++++++++++++++++- 4 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index a70516d9f..53558d068 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -64,9 +64,7 @@ class SiteFooter extends React.Component {

- {intl.formatMessage(messages['footer.copyright'])} - {` ${config.SITE_NAME} © `} - {intl.formatMessage(messages['footer.copyright.date'])} + {intl.formatMessage(messages['footer.copyright.text'], { platformName: config.SITE_NAME })}

diff --git a/src/components/Footer.messages.js b/src/components/Footer.messages.js index 71104201c..cfa978c96 100644 --- a/src/components/Footer.messages.js +++ b/src/components/Footer.messages.js @@ -151,16 +151,11 @@ const messages = defineMessages({ defaultMessage: 'Page Footer', description: 'aria-label for the footer component', }, - 'footer.copyright': { - id: 'footer.copyright', - defaultMessage: 'All rights reserved.', + 'footer.copyright.text': { + id: 'footer.copyright.text', + defaultMessage: 'All rights reserved. {platformName} © 2023', description: 'copyright text for the footer component', }, - 'footer.copyright.date': { - id: 'footer.copyright.date', - defaultMessage: '2023', - description: 'copyright date for the footer component', - }, }); export default messages; diff --git a/src/components/__snapshots__/Footer.test.jsx.snap b/src/components/__snapshots__/Footer.test.jsx.snap index a17597812..2a5836107 100644 --- a/src/components/__snapshots__/Footer.test.jsx.snap +++ b/src/components/__snapshots__/Footer.test.jsx.snap @@ -30,9 +30,7 @@ exports[`