From 4b7ef4fcbc663b94ac7149b633bd6d51b6b3223d Mon Sep 17 00:00:00 2001 From: iliyan90 <74927065+iliyan90@users.noreply.github.com> Date: Fri, 31 May 2024 17:01:49 +0300 Subject: [PATCH] Adding translation for Compagn Details (#1837) --- README.md | 2 ++ public/locales/bg/campaigns.json | 7 +++++++ public/locales/en/campaigns.json | 7 +++++++ src/components/client/campaigns/CampaignDetails.tsx | 13 ++++++++----- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0fc491043..fd0beb22a 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,9 @@ Watch releases of this repository to be notified about future updates: ## Contributors ✨ + [![All Contributors](https://img.shields.io/badge/all_contributors-79-orange.svg?style=flat-square)](#contributors-) + Please check [contributors guide](https://github.com/podkrepi-bg/frontend/blob/master/CONTRIBUTING.md) for: diff --git a/public/locales/bg/campaigns.json b/public/locales/bg/campaigns.json index eee6d3220..3c15ca8e0 100644 --- a/public/locales/bg/campaigns.json +++ b/public/locales/bg/campaigns.json @@ -207,5 +207,12 @@ "nature": "Природа", "art": "Изкуство", "others": "Други" + }, + "campaign-details-report": { + "amount-collected": "Събрана сума", + "available": "Налични", + "guaranteed": "Гарантирани", + "translated": "Преведени", + "accounted": "Отчетени" } } diff --git a/public/locales/en/campaigns.json b/public/locales/en/campaigns.json index bbf5c8a92..820c89e4d 100644 --- a/public/locales/en/campaigns.json +++ b/public/locales/en/campaigns.json @@ -207,5 +207,12 @@ "nature": "Nature", "art": "Art", "others": "others" + }, + "campaign-details-report": { + "amount-collected": "Amount Collected", + "available": "Аvailable", + "guaranteed": "Guaranteed", + "translated": "Translated", + "accounted": "Accounted" } } diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index e2053282c..1afff8217 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -249,13 +249,15 @@ type CampaignFinanceProps = Props & { const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) => { const total = (campaign.summary.guaranteedAmount ?? 0) + campaign.summary.reachedAmount const transferred = campaign.summary.blockedAmount + campaign.summary.withdrawnAmount + const { t } = useTranslation() return ( - Събрана сума: {moneyPublic(total)} + {t('campaigns:campaign-details-report.amount-collected')}: {moneyPublic(total)} - Налични: {moneyPublic(campaign.summary.currentAmount)} + {t('campaigns:campaign-details-report.available')}:{' '} + {moneyPublic(campaign.summary.currentAmount)} @@ -263,7 +265,8 @@ const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) => - Гарантирани: {moneyPublic(campaign.summary.guaranteedAmount ?? 0)} + {t('campaigns:campaign-details-report.guaranteed')}:{' '} + {moneyPublic(campaign.summary.guaranteedAmount ?? 0)} - Преведени: {moneyPublic(transferred)} + {t('campaigns:campaign-details-report.translated')}: {moneyPublic(transferred)} @@ -285,7 +288,7 @@ const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) => - Отчетени: {moneyPublic(expenses)} + {t('campaigns:campaign-details-report.accounted')}: {moneyPublic(expenses)}