Skip to content

Commit

Permalink
Adding translation for Compagn Details (podkrepi-bg#1837)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyan90 authored and gparlakov committed Jun 19, 2024
1 parent 2403d42 commit 22f2370
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ Watch releases of this repository to be notified about future updates:
## Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-79-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Please check [contributors guide](https://github.com/podkrepi-bg/frontend/blob/master/CONTRIBUTING.md) for:
Expand Down
7 changes: 7 additions & 0 deletions public/locales/bg/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,12 @@
"nature": "Природа",
"art": "Изкуство",
"others": "Други"
},
"campaign-details-report": {
"amount-collected": "Събрана сума",
"available": "Налични",
"guaranteed": "Гарантирани",
"translated": "Преведени",
"accounted": "Отчетени"
}
}
7 changes: 7 additions & 0 deletions public/locales/en/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
13 changes: 8 additions & 5 deletions src/components/client/campaigns/CampaignDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,21 +249,24 @@ 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 (
<StyledGrid item>
<Typography variant="h5" fontWeight={500}>
Събрана сума: {moneyPublic(total)}
{t('campaigns:campaign-details-report.amount-collected')}: {moneyPublic(total)}
</Typography>
<Typography className={classes.financeSummary}>
Налични: {moneyPublic(campaign.summary.currentAmount)}
{t('campaigns:campaign-details-report.available')}:{' '}
{moneyPublic(campaign.summary.currentAmount)}
<Tooltip enterTouchDelay={0} title="Средства налични по сметката на Podkrepi.bg">
<IconButton size="small" color="primary">
<InfoOutlined fontSize="small" />
</IconButton>
</Tooltip>
</Typography>
<Typography className={classes.financeSummary}>
Гарантирани: {moneyPublic(campaign.summary.guaranteedAmount ?? 0)}
{t('campaigns:campaign-details-report.guaranteed')}:{' '}
{moneyPublic(campaign.summary.guaranteedAmount ?? 0)}
<Tooltip
enterTouchDelay={0}
title={
Expand All @@ -275,7 +278,7 @@ const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) =>
</Tooltip>
</Typography>
<Typography className={classes.financeSummary} fontWeight={600}>
Преведени: {moneyPublic(transferred)}
{t('campaigns:campaign-details-report.translated')}: {moneyPublic(transferred)}
<Tooltip
enterTouchDelay={0}
title="Средства преведени от сметката на Podkrepi.bg към организатора на кампанията">
Expand All @@ -285,7 +288,7 @@ const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) =>
</Tooltip>
</Typography>
<Typography className={classes.financeSummary}>
Отчетени: {moneyPublic(expenses)}
{t('campaigns:campaign-details-report.accounted')}: {moneyPublic(expenses)}
<Tooltip enterTouchDelay={0} title="Отчетени разходи">
<IconButton size="small" color="primary">
<InfoOutlined fontSize="small" />
Expand Down

0 comments on commit 22f2370

Please sign in to comment.