Skip to content

Commit

Permalink
translations added
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhaniivanov committed Jul 29, 2023
1 parent 5b47584 commit e26fa7b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
10 changes: 9 additions & 1 deletion public/locales/bg/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,15 @@
"end-date": "Крайна дата:",
"indefinite": "Безсрочна",
"tag": "Таг:",
"date": "Дата:"
"date": "Дата:",
"chipsLabels": {
"news": "Новини",
"docs": "Документи",
"experts": "Експертен съвет",
"guarantor": "Гарант",
"signals": "Сигнали",
"others": "Други"
}
},
"info-graphics": {
"donation-title": "100% от дарението отива при нуждаещите се",
Expand Down
10 changes: 9 additions & 1 deletion public/locales/en/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,15 @@
"start-date": "Start date:",
"end-date": "End date:",
"tag": "Tag:",
"date": "Date:"
"date": "Date:",
"chipsLabels": {
"news": "News",
"docs": "Documents",
"experts": "Experts",
"guarantor": "Guarantor",
"signals": "Signals",
"others": "Others"
}
},
"info-graphics": {
"donation-title": "100% of the donation goes to those in need",
Expand Down
11 changes: 9 additions & 2 deletions src/components/client/campaigns/CampaignDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,22 @@ type Props = {
campaign: CampaignResponse
}

const chipsLabel = { news: 'News', experts: 'Experts', expenses: 'Financial Expesnes' }

export default function CampaignDetails({ campaign }: Props) {
const { t } = useTranslation()
const sliderImages = campaignSliderUrls(campaign)
const canEditCampaign = useCanEditCampaign(campaign.slug)
const { data: expensesList } = useCampaignApprovedExpensesList(campaign.slug)
const totalExpenses = expensesList?.reduce((acc, expense) => acc + expense.amount, 0)

const chipsLabel = {
news: t('campaigns:campaign.chipsLabels.news'),
docs: t('campaigns:campaign.chipsLabels.docs'),
experts: t('campaigns:campaign.chipsLabels.experts'),
guarantor: t('campaigns:campaign.chipsLabels.guarantor'),
signals: t('campaigns:campaign.chipsLabels.signals'),
others: t('campaigns:campaign.chipsLabels.others'),
}

const scrollToSection = (sectionId: string) => {
const target = document.getElementById(sectionId)
if (target) {
Expand Down

0 comments on commit e26fa7b

Please sign in to comment.