Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding translation for Compaign Details Financial Reports #1837

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading