From fc52796e34305760d917588265ecb71a83127424 Mon Sep 17 00:00:00 2001 From: Slavcho Ivanov Date: Wed, 24 Jan 2024 17:52:19 +0530 Subject: [PATCH 01/13] Incorrect restriction in withdrawls edit form (#1709) * Remove unused translations, add EN translations for bank transactions (#1703) * Remove unused import and translations * Remove unused translations, added EN translations for bank transactions * Remove unused translations from campaigns.json * Remove unused translations from campaign.json * Add missing EN trnlations in campaigns.json * Add missing translations for common.json * Fix lint error --------- Co-authored-by: ani-kalpachka * Update email address on FAQ (#1705) Co-authored-by: ani-kalpachka * Update translations (#1706) * Update translations * Update tranlations * Update translations --------- Co-authored-by: ani-kalpachka * Update translations (#1707) * Add missing EN translations * Update translations for support.json and reccurong-donation.json * Update translations for validation.json and transfer.json * Update translations --------- Co-authored-by: ani-kalpachka * components/commmon: Gallery component improvements (#1708) * components/commmon: Gallery component improvements - Improved logic to render the Gallery Component more efficiently - Expanded the size of the images, when FullScreen is toggled - Added a button to minimize fullscreen slider * common/Gallery: Fix component crash when child is a single image In some situations, only a single image is uploaded, and in that case child.props.children is an object rather, than an array to map it over. * common/ImageSlider: Hide backdrop on FullScreenImageSlider Avoid minimizing gallery due to accidental touches * The amount of the withdrawals can be a decimal number. It should not be limited to integers only. --------- Co-authored-by: Ani Co-authored-by: ani-kalpachka Co-authored-by: Aleksandar Petkov --- src/components/admin/withdrawals/EditForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/admin/withdrawals/EditForm.tsx b/src/components/admin/withdrawals/EditForm.tsx index 3c443d67c..2c1e4e06f 100644 --- a/src/components/admin/withdrawals/EditForm.tsx +++ b/src/components/admin/withdrawals/EditForm.tsx @@ -47,7 +47,7 @@ const validationSchema: yup.SchemaOf = yup .defined() .shape({ status: yup.string().trim().min(1).max(10).required(), - amount: yup.number().positive().integer().required(), + amount: yup.number().positive().required(), reason: yup.string().trim().min(1).max(300).required(), currency: yup.string().oneOf(Object.values(Currency)).required(), sourceVaultId: yup.string().uuid().required(), From e2e972927847f00dd869aa3d743246c0fb795471 Mon Sep 17 00:00:00 2001 From: Slavcho Ivanov Date: Sun, 28 Jan 2024 20:17:14 +0530 Subject: [PATCH 02/13] Invalidate a donation from the admin panel (#1704) * Allow for the special user with the right credentials to mark a successfull donation as invalid. This would help us manually fix issues with stripe. * Fix the formatting of the donation's Grid.tsx. An extra new line needed to be removed. * We should allow for invalidation of the bank donations as well. * Change the API for the invalidation of a donation to be more REST friendly. --- public/locales/bg/donations.json | 10 ++++ public/locales/en/donations.json | 10 ++++ .../admin/donations/DonationsPage.tsx | 1 + src/components/admin/donations/grid/Grid.tsx | 48 ++++++++++++++----- .../donations/modals/InvalidateModal.tsx | 48 +++++++++++++++++++ src/service/apiEndpoints.ts | 2 + src/service/donation.ts | 10 ++++ 7 files changed, 118 insertions(+), 11 deletions(-) create mode 100644 src/components/admin/donations/modals/InvalidateModal.tsx diff --git a/public/locales/bg/donations.json b/public/locales/bg/donations.json index 036db7acb..1e34bafac 100644 --- a/public/locales/bg/donations.json +++ b/public/locales/bg/donations.json @@ -32,6 +32,7 @@ "edit": "Дарението беше редактирано успешно!", "delete": "Дарението беше изтрито успешно!", "refundSuccess": "Беше създадена успешна заявка за връщане на парите към Stripe.", + "invalidate": "Дарението беше маркирано като невалидно!", "editDonor": "Дарителят беше редактиран успешно!", "error": "Възникна грешка! Моля опитайте отново по-късно.", "requiredError": "Полето е задължително." @@ -66,5 +67,14 @@ "amount": "Сума:", "email": "Е-mail на дарител:", "confirm-button": "Възстанови парите от дарение" + }, + "invalidate": { + "icon": "Маркирай като невалидно", + "title": "Маркиране на дарение като невалидно", + "confirmation": "Сигурни ли сте, че искате да маркирате като невалидно дарението:", + "number": "Номер:", + "amount": "Сума:", + "email": "Е-mail на дарител:", + "confirm-button": "Маркирай като невалидно" } } diff --git a/public/locales/en/donations.json b/public/locales/en/donations.json index a87b2076f..f912bfdb4 100644 --- a/public/locales/en/donations.json +++ b/public/locales/en/donations.json @@ -32,6 +32,7 @@ "edit": "Document has been edited successfully!", "delete": "Document has been deleted successfully!", "refundSuccess": "A successful refund request was created with Stripe.", + "invalidate": "Document has been marked as invalid successfully!", "editDonor": "Donation donor has been edited successfully!", "error": "An error has occured! Please try again later.", "requiredError": "Fields is required!" @@ -66,5 +67,14 @@ "amount": "Amount:", "email": "Donator's email:", "confirm-button": "Refund a donation" + }, + "invalidate": { + "icon": "Mark as invalid", + "title": "Mark as invalid", + "confirmation": "Are you sure you want to refund the donation:", + "number": "Number:", + "amount": "Amount:", + "email": "Е-mail", + "confirm-button": "Mark as invalid" } } diff --git a/src/components/admin/donations/DonationsPage.tsx b/src/components/admin/donations/DonationsPage.tsx index 88e1a041f..b4678295d 100644 --- a/src/components/admin/donations/DonationsPage.tsx +++ b/src/components/admin/donations/DonationsPage.tsx @@ -9,6 +9,7 @@ import { RefundStoreImpl } from './store/RefundStore' export const ModalStore = new ModalStoreImpl() export const RefundStore = new RefundStoreImpl() +export const InvalidateStore = new ModalStoreImpl() export default function DocumentsPage() { const { t } = useTranslation() diff --git a/src/components/admin/donations/grid/Grid.tsx b/src/components/admin/donations/grid/Grid.tsx index 5899f3c6f..81bb99621 100644 --- a/src/components/admin/donations/grid/Grid.tsx +++ b/src/components/admin/donations/grid/Grid.tsx @@ -14,8 +14,8 @@ import { observer } from 'mobx-react' import { useDonationsList } from 'common/hooks/donation' import DetailsModal from '../modals/DetailsModal' -import DeleteModal from '../modals/DeleteModal' -import { ModalStore, RefundStore } from '../DonationsPage' +import InvalidateModal from '../modals/InvalidateModal' +import { ModalStore, RefundStore, InvalidateStore } from '../DonationsPage' import { getExactDateTime } from 'common/util/date' import { useRouter } from 'next/router' import { money } from 'common/util/money' @@ -26,8 +26,10 @@ import RenderEditPersonCell from './RenderEditPersonCell' import { useStores } from '../../../../common/hooks/useStores' import RenderEditBillingEmailCell from './RenderEditBillingEmailCell' import RestoreIcon from '@mui/icons-material/Restore' +import CancelIcon from '@mui/icons-material/Cancel' import RefundModal from '../modals/RefundModal' import { DonationStatus, PaymentProvider } from '../../../../gql/donations.enums' +import { useSession } from 'next-auth/react' interface RenderCellProps { params: GridRenderCellParams @@ -51,8 +53,16 @@ export default observer(function Grid() { const router = useRouter() const { isDetailsOpen } = ModalStore const { isRefundOpen } = RefundStore + const { + isDeleteOpen, + setSelectedRecord: setInvalidateRecord, + showDelete: showInvalidate, + } = InvalidateStore const campaignId = router.query.campaignId as string | undefined - + const { data: session } = useSession() + const canEditFinancials = session?.user?.realm_access?.roles.includes( + 'account-edit-financials-requests', + ) const { data: { items: donations, total: allDonationsCount } = { items: [], total: 0 }, // error: donationHistoryError, @@ -147,6 +157,11 @@ export default observer(function Grid() { showRefund() } + function invalidateClickHandler(id: string) { + setInvalidateRecord({ id, name: '' }) + showInvalidate() + } + const columns: GridColDef[] = [ { field: 'actions', @@ -155,20 +170,31 @@ export default observer(function Grid() { width: 120, resizable: false, renderCell: (params: GridRenderCellParams) => { - return params.row?.status === DonationStatus.succeeded && - params.row?.provider === PaymentProvider.stripe ? ( + if (!canEditFinancials || params.row?.status !== DonationStatus.succeeded) { + return '' + } + + return ( <> - + {params.row.provider === PaymentProvider.stripe && ( + + refundClickHandler(params.row.id)}> + + + + )} + refundClickHandler(params.row.id)}> - + onClick={() => invalidateClickHandler(params.row.id)}> + - ) : ( - '' ) }, }, @@ -292,7 +318,7 @@ export default observer(function Grid() { {/* making sure we don't sent requests to the API when not needed */} {isDetailsOpen && } {isRefundOpen && } - + {isDeleteOpen && } ) }) diff --git a/src/components/admin/donations/modals/InvalidateModal.tsx b/src/components/admin/donations/modals/InvalidateModal.tsx new file mode 100644 index 000000000..226ee569d --- /dev/null +++ b/src/components/admin/donations/modals/InvalidateModal.tsx @@ -0,0 +1,48 @@ +import React from 'react' +import { useRouter } from 'next/router' +import { useMutation } from '@tanstack/react-query' +import { observer } from 'mobx-react' +import { AxiosError, AxiosResponse } from 'axios' +import { useTranslation } from 'next-i18next' + +import { DonationResponse } from 'gql/donations' +import { ApiErrors } from 'service/apiErrors' +import { AlertStore } from 'stores/AlertStore' +import { routes } from 'common/routes' +import DeleteDialog from 'components/admin/DeleteDialog' +import { useInvalidateStripeDonation } from 'service/donation' + +import { InvalidateStore } from '../DonationsPage' + +type Props = { + onUpdate: () => void +} + +export default observer(function InvalidateModal({ onUpdate }: Props) { + const router = useRouter() + const { hideDelete, selectedRecord } = InvalidateStore + const { t } = useTranslation() + + const mutationFn = useInvalidateStripeDonation() + + const invalidateMutation = useMutation< + AxiosResponse, + AxiosError, + string + >({ + mutationFn, + onError: () => AlertStore.show(t('donations:alerts:error'), 'error'), + onSuccess: () => { + hideDelete() + AlertStore.show(t('donations:alerts:invalidate'), 'success') + router.push(routes.admin.donations.index) + onUpdate() + }, + }) + + function invalidateHandler() { + invalidateMutation.mutate(selectedRecord.id) + } + + return +}) diff --git a/src/service/apiEndpoints.ts b/src/service/apiEndpoints.ts index a18cee857..2b892a82a 100644 --- a/src/service/apiEndpoints.ts +++ b/src/service/apiEndpoints.ts @@ -118,6 +118,8 @@ export const endpoints = { createBankDonation: { url: '/donation/create-bank-payment', method: 'POST' }, refundStripePayment: (id: string) => { url: `/donation/refund-stripe-payment/${id}`, method: 'POST' }, + invalidateStripePayment: (id: string) => + { url: `/donation/${id}/invalidate`, method: 'PATCH' }, getDonation: (id: string) => { url: `/donation/${id}`, method: 'GET' }, donationsList: ( campaignId?: string, diff --git a/src/service/donation.ts b/src/service/donation.ts index 6090471fb..f1dba2b4f 100644 --- a/src/service/donation.ts +++ b/src/service/donation.ts @@ -78,6 +78,16 @@ export const useRefundStripeDonation = () => { ) } } +export const useInvalidateStripeDonation = () => { + const { data: session } = useSession() + return async (extPaymentId: string) => { + return await apiClient.patch( + endpoints.donation.invalidateStripePayment(extPaymentId).url, + '', + authConfig(session?.accessToken), + ) + } +} export const useUploadBankTransactionsFiles = () => { const { data: session } = useSession() From c47ac74775441417e17ebbc1bdca3827cbfc3f6a Mon Sep 17 00:00:00 2001 From: Ani Date: Tue, 30 Jan 2024 18:53:40 +0200 Subject: [PATCH 03/13] Fix translations on Contact page (#1711) * Fix contact translations * fix lint error --------- Co-authored-by: ani-kalpachka --- src/pages/contact.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index 36c516ecf..ae5175cf4 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -5,7 +5,13 @@ import ContactPage from 'components/client/contact/ContactPage' export const getStaticProps: GetStaticProps = async ({ locale }) => ({ props: { - ...(await serverSideTranslations(locale ?? 'bg', ['common', 'auth', 'validation', 'contact'])), + ...(await serverSideTranslations(locale ?? 'bg', [ + 'common', + 'auth', + 'validation', + 'contact', + 'campaigns', + ])), }, }) From 8e4f2a95b88aacc51e3808e53f2e5c8c92c91de6 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 1 Feb 2024 11:26:51 +0200 Subject: [PATCH 04/13] SQUASH: Translation fixes (#1713) * CampaignInfoStatus.tsx: Fix wrong namespace on end date translation * locales: Move email notification translations to common namespace * pages/contact.tsx: Remove campaign namespace from translations * Run lint --- public/locales/bg/campaigns.json | 22 ------------------ public/locales/bg/common.json | 22 ++++++++++++++++++ public/locales/en/campaigns.json | 22 ------------------ public/locales/en/common.json | 23 +++++++++++++++++++ .../client/campaigns/CampaignDetails.tsx | 2 +- .../CampaignInfo/CampaignInfoStatus.tsx | 2 +- .../PlatformStatisticsSection.tsx | 6 ++--- .../SubscriptionSection.tsx | 6 ++--- .../client/layout/Footer/Subscription.tsx | 2 +- .../notifications/CampaignSubscribeModal.tsx | 20 ++++++++-------- .../notifications/GeneralSubscribeModal.tsx | 20 ++++++++-------- src/pages/contact.tsx | 8 +------ 12 files changed, 75 insertions(+), 80 deletions(-) diff --git a/public/locales/bg/campaigns.json b/public/locales/bg/campaigns.json index c3cb8daf5..eee6d3220 100644 --- a/public/locales/bg/campaigns.json +++ b/public/locales/bg/campaigns.json @@ -71,14 +71,6 @@ "save": "Запази", "submit": "Изпрати", "apply": "Кандидатствайте", - "subscribe": "Абонирай се за email известия за кампанията", - "subscribeFooter": "Абонирай се за бюлетина", - "subscribeGeneral": "Абонирайте се за email известия от Подкрепи.бг", - "subscribe-monthly-newsletter": "Месечен бюлтеин на Подкрепи.бг", - "subscribeGeneralSubtext": "Получавайте нашия месечен бюлетин, в който ще Ви информираме за най-интересните новини от Подкрепи.бг!", - "subscribe-general-monthly-newsletter": "Получавайте нашия месечен бюлетин, за да сте в час най-интересните новини от Подкрепи.бг!", - "subscribeGeneralButton": "Абонирайте се за новини", - "subscribe-general-newsletter-button": "Абонирайте се", "support": "Дарете", "support-cause-today": "Подкрепете кауза днес!", "support-now": "Подкрепете сега", @@ -97,20 +89,6 @@ "download": "Изтеглете", "allow-donation-on-complete": "Разрешете дарения след достигане на сумата" }, - "subscribe": { - "confirm-sent": "Моля, активирай абонамента си от email-a, който ти изпратихме на {{email}}", - "confirm-subscribe": "Записа се успешно.", - "subscribe-title": "Абониране за новините на Подкрепи.бг", - "subscribe-campaign-title": "Абониране за новините по кампанията", - "subscribe-text-nonLoggedUser": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия за тази кампания, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", - "subscribe-text-nonLoggedUser-general": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия от нас, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", - "subscribe-text-loggedUser": "Моля, избери дали желаеш да получаваш новините за кампанията на email адреса, асоцииран с профила ти, или на алтернативен адрес:", - "subscribe-subtitle": "Искам да получавам новини и известия от Подкрепи.бг на този email адрес:", - "subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:", - "subscribe-button": "Запиши ме", - "profile-button": "На профилния", - "another-button": "На друг" - }, "campaign": { "subheading": "Вашата подкрепа променя света и има значение. Всички подкрепящи чрез Подкрепи.бг са наши партньори в подпомагането на кампании за общността. Като щедър дарител Вие ставате важен партньор в подпомагането на кампания за нечие здраве или за успеха на кауза, която ви е близка до сърцето.", "title": "Име на кампанията", diff --git a/public/locales/bg/common.json b/public/locales/bg/common.json index 1319b9af9..39d98e0c0 100644 --- a/public/locales/bg/common.json +++ b/public/locales/bg/common.json @@ -101,6 +101,28 @@ "cta": { "more-information": "Повече информация" }, + "notifications": { + "subscribe": "Абонирай се за email известия за кампанията", + "subscribeFooter": "Абонирай се за бюлетина", + "subscribeGeneral": "Абонирайте се за email известия от Подкрепи.бг", + "subscribe-monthly-newsletter": "Месечен бюлтеин на Подкрепи.бг", + "subscribeGeneralSubtext": "Получавайте нашия месечен бюлетин, в който ще Ви информираме за най-интересните новини от Подкрепи.бг!", + "subscribe-general-monthly-newsletter": "Получавайте нашия месечен бюлетин, за да сте в час най-интересните новини от Подкрепи.бг!", + "subscribeGeneralButton": "Абонирайте се за новини", + "subscribe-general-newsletter-button": "Абонирайте се", + "confirm-sent": "Моля, активирай абонамента си от email-a, който ти изпратихме на {{email}}", + "confirm-subscribe": "Записа се успешно.", + "subscribe-title": "Абониране за новините на Подкрепи.бг", + "subscribe-campaign-title": "Абониране за новините по кампанията", + "subscribe-text-nonLoggedUser": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия за тази кампания, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", + "subscribe-text-nonLoggedUser-general": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия от нас, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", + "subscribe-text-loggedUser": "Моля, избери дали желаеш да получаваш новините за кампанията на email адреса, асоцииран с профила ти, или на алтернативен адрес:", + "subscribe-subtitle": "Искам да получавам новини и известия от Подкрепи.бг на този email адрес:", + "subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:", + "subscribe-button": "Запиши ме", + "profile-button": "На профилния", + "another-button": "На друг" + }, "cookieConsent": "Подкрепи.бг не използва бисквитки, освен тези от трети страни, нужни за аналитичните компоненти Google Analytics и HotJar. Приемането на бисквитките ще ни помогне да подобрим вашето потребителско преживяване.", "cookieConsentButton": "Приемам", "cookieRejectButton": "Отхвърлям" diff --git a/public/locales/en/campaigns.json b/public/locales/en/campaigns.json index 04f405c1f..bbf5c8a92 100644 --- a/public/locales/en/campaigns.json +++ b/public/locales/en/campaigns.json @@ -71,14 +71,6 @@ "save": "Save", "submit": "Submit", "apply": "Apply", - "subscribe": "Subscribe for email notifications for the campaign", - "subscribeFooter": "Subscribe for the newsletter", - "subscribeGeneral": "Subscribe for email notifications from Podkrepi.bg", - "subscribe-monthly-newsletter": "Monthly newsletter of Podkrepi.bg", - "subscribeGeneralSubtext": "Receive our monthly newsletter which will inform you about the most interesting news from Podkrepi.bg!!", - "subscribe-general-monthly-newsletter": "Receive our monthly newsletter so that you are aware of the most interesting news from Podkrepi.bg!", - "subscribeGeneralButton": "Subscribe for news", - "subscribe-general-newsletter-button": "Subscribe", "support": "Donate", "support-cause-today": "Support a campaign today!", "support-now": "Support now", @@ -97,20 +89,6 @@ "download": "Download", "allow-donation-on-complete": "Allow donations after the amount is reached" }, - "subscribe": { - "confirm-sent": "Please, activate your subscription from the email that we sent to {{email}}", - "confirm-subscribe": "You subscribed successfully", - "subscribe-title": "Subscribe for news from Podkrepi.bg", - "subscribe-campaign-title": "Subscribe for news about the campaign", - "subscribe-text-nonLoggedUser": "Please, proceed as a guest and write down your email, on which you want to receive notifications for this campaign or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile", - "subscribe-text-nonLoggedUser-general": "Please, proceed as a guest and write down your email, on which you want to receive notifications from us or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile", - "subscribe-text-loggedUser": "Please, choose if you want to receive the news about the campaign on your profile email or on another one:", - "subscribe-subtitle": "I want to receive news and notifications from Podkrepi.bg on this email:", - "subscribe-campaign-subtTitle": "I want to receive news about the campaign on this email:", - "subscribe-button": "Subscribe me", - "profile-button": "On the profile one", - "another-button": "On another one" - }, "campaign": { "subheading": "Your support for the world matters. All supporters through Podkrepi.bg are our partners in supporting the community campaign. As a generous benefactor, you become an important partner in supporting a campaign regarding someone's health or the success of a cause that is close to your heart.", "title": "Campaign name", diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 47459e250..c047bf5e1 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -101,6 +101,29 @@ "cta": { "more-information": "More information" }, + "notifications": { + "subscribe": "Subscribe for email notifications for the campaign", + "subscribeFooter": "Subscribe for the newsletter", + "subscribeGeneral": "Subscribe for email notifications from Podkrepi.bg", + "subscribe-monthly-newsletter": "Monthly newsletter of Podkrepi.bg", + "subscribeGeneralSubtext": "Receive our monthly newsletter which will inform you about the most interesting news from Podkrepi.bg!!", + "subscribe-general-monthly-newsletter": "Receive our monthly newsletter so that you are aware of the most interesting news from Podkrepi.bg!", + "subscribeGeneralButton": "Subscribe for news", + "subscribe-general-newsletter-button": "Subscribe", + "confirm-sent": "Please, activate your subscription from the email that we sent to {{email}}", + "confirm-subscribe": "You subscribed successfully", + "subscribe-title": "Subscribe for news from Podkrepi.bg", + "subscribe-campaign-title": "Subscribe for news about the campaign", + "subscribe-text-nonLoggedUser": "Please, proceed as a guest and write down your email, on which you want to receive notifications for this campaign or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile", + "subscribe-text-nonLoggedUser-general": "Please, proceed as a guest and write down your email, on which you want to receive notifications from us or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile", + "subscribe-text-loggedUser": "Please, choose if you want to receive the news about the campaign on your profile email or on another one:", + "subscribe-subtitle": "I want to receive news and notifications from Podkrepi.bg on this email:", + "subscribe-campaign-subtTitle": "I want to receive news about the campaign on this email:", + "subscribe-button": "Subscribe me", + "profile-button": "On the profile one", + "another-button": "On another one" + }, + "cookieConsent": "Podkrepi.bg doesn't use cookies, except the third-party cookies required for the analytics components Google Analytics and HotJar. Accepting the cookies will help us improve your user experience.", "cookieConsentButton": "Accept", "cookieRejectButton": "Reject" diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index b6a48bce6..3c872d4c1 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -151,7 +151,7 @@ export default function CampaignDetails({ campaign }: Props) { cursor="pointer" /> setSubscribeOpen(true)} className={classes.subscribeLink}> - {t('campaigns:cta.subscribe')} + {t('common:notifications.subscribe')} diff --git a/src/components/client/campaigns/CampaignInfo/CampaignInfoStatus.tsx b/src/components/client/campaigns/CampaignInfo/CampaignInfoStatus.tsx index 2034c24cc..68501d29e 100644 --- a/src/components/client/campaigns/CampaignInfo/CampaignInfoStatus.tsx +++ b/src/components/client/campaigns/CampaignInfo/CampaignInfoStatus.tsx @@ -87,7 +87,7 @@ export default function CampaignInfoStatus({ campaign, showExpensesLink }: Props {campaign.endDate ? getExactDate(campaign.endDate, locale) - : t('campaigns:campaign.indefinite')} + : t('campaigns:indefinite')} diff --git a/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.tsx b/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.tsx index 4fe900a49..f3723015e 100644 --- a/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.tsx +++ b/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.tsx @@ -42,14 +42,14 @@ export default function PlatformStatisticsSection() { {subscribeIsOpen && } - {t('campaigns:cta.subscribeGeneral')} + {t('common:notifications.subscribeGeneral')} - {t('campaigns:cta.subscribeGeneralSubtext')} + {t('common:notifications.subscribeGeneralSubtext')} setSubscribeOpen(true)} variant="contained" endIcon={}> - {t('campaigns:cta.subscribeGeneralButton')} + {t('common:notifications.subscribeGeneralButton')} diff --git a/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx b/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx index dcb74da18..fae834c52 100644 --- a/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx +++ b/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx @@ -48,14 +48,14 @@ const SubscriptionSection = () => { cursor="pointer" /> setSubscribeOpen(true)}> - {t('campaigns:cta.subscribe-monthly-newsletter')} + {t('common:notifications.subscribe-monthly-newsletter')} - {t('campaigns:cta.subscribe-general-monthly-newsletter')} + {t('common:notifications.subscribe-general-monthly-newsletter')} setSubscribeOpen(true)} variant="contained"> - {t('campaigns:cta.subscribe-general-newsletter-button')} + {t('common:notifications.subscribe-general-newsletter-button')} diff --git a/src/components/client/layout/Footer/Subscription.tsx b/src/components/client/layout/Footer/Subscription.tsx index 8bf5afe7c..4a86bf8c8 100644 --- a/src/components/client/layout/Footer/Subscription.tsx +++ b/src/components/client/layout/Footer/Subscription.tsx @@ -22,7 +22,7 @@ export default function Subscription() { cursor="pointer" /> setSubscribeOpen(true)}> - {t('campaigns:cta.subscribeFooter')} + {t('common:components.footer.subscribe')} ) diff --git a/src/components/client/notifications/CampaignSubscribeModal.tsx b/src/components/client/notifications/CampaignSubscribeModal.tsx index 35ea56b4a..fb8f1ac4e 100644 --- a/src/components/client/notifications/CampaignSubscribeModal.tsx +++ b/src/components/client/notifications/CampaignSubscribeModal.tsx @@ -107,7 +107,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda - {t('campaigns:subscribe.subscribe-campaign-subtTitle')} + {t('common:notifications.subscribe-campaign-subtTitle')} @@ -120,7 +120,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda @@ -159,15 +159,15 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda - {t('campaigns:subscribe.subscribe-campaign-title')} + {t('common:notifications.subscribe-campaign-title')} {status !== 'authenticated' - ? t('campaigns:subscribe.subscribe-text-nonLoggedUser') - : t('campaigns:subscribe.subscribe-text-loggedUser')} + ? t('common:notifications.subscribe-text-nonLoggedUser') + : t('common:notifications.subscribe-text-loggedUser')} @@ -178,7 +178,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda label={ status !== 'authenticated' ? 'auth:cta.login' - : 'campaigns:subscribe.profile-button' + : 'common:notifications.profile-button' } loading={loading} onClick={() => sendOnProfileEmail(status)} @@ -191,7 +191,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda label={ status !== 'authenticated' ? 'auth:cta.guest' - : 'campaigns:subscribe.another-button' + : 'common:notifications.another-button' } loading={loading} onClick={() => openAsGuest()} @@ -220,7 +220,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda - {t('campaigns:subscribe.subscribe-campaign-title')} + {t('common:notifications.subscribe-campaign-title')} @@ -236,13 +236,13 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda - {t('campaigns:subscribe.confirm-subscribe')} + {t('common:notifications.confirm-subscribe')} diff --git a/src/components/client/notifications/GeneralSubscribeModal.tsx b/src/components/client/notifications/GeneralSubscribeModal.tsx index 9f5409f60..1f09c12fb 100644 --- a/src/components/client/notifications/GeneralSubscribeModal.tsx +++ b/src/components/client/notifications/GeneralSubscribeModal.tsx @@ -112,7 +112,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { - {t('campaigns:subscribe.subscribe-subtitle')} + {t('common:notifications.subscribe-subtitle')} @@ -125,7 +125,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { @@ -164,15 +164,15 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { - {t('campaigns:subscribe.subscribe-title')} + {t('common:notifications.subscribe-title')} {status !== 'authenticated' - ? t('campaigns:subscribe.subscribe-text-nonLoggedUser-general') - : t('campaigns:subscribe.subscribe-text-loggedUser')} + ? t('common:notifications.subscribe-text-nonLoggedUser-general') + : t('common:notifications.subscribe-text-loggedUser')} @@ -183,7 +183,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { label={ status !== 'authenticated' ? 'auth:cta.login' - : 'campaigns:subscribe.profile-button' + : 'common:notifications.profile-button' } loading={loading} onClick={() => sendOnProfileEmail(status)} @@ -196,7 +196,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { label={ status !== 'authenticated' ? 'auth:cta.guest' - : 'campaigns:subscribe.another-button' + : 'common:notifications.another-button' } loading={loading} onClick={() => openAsGuest()} @@ -225,7 +225,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { - {t('campaigns:subscribe.subscribe-title')} + {t('common:notifications.subscribe-title')} @@ -241,13 +241,13 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { - {t('campaigns:subscribe.confirm-subscribe')} + {t('common:notifications.confirm-subscribe')} diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index ae5175cf4..36c516ecf 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -5,13 +5,7 @@ import ContactPage from 'components/client/contact/ContactPage' export const getStaticProps: GetStaticProps = async ({ locale }) => ({ props: { - ...(await serverSideTranslations(locale ?? 'bg', [ - 'common', - 'auth', - 'validation', - 'contact', - 'campaigns', - ])), + ...(await serverSideTranslations(locale ?? 'bg', ['common', 'auth', 'validation', 'contact'])), }, }) From 324bd9fce76a847e7ab4346ad31d164b338d48b2 Mon Sep 17 00:00:00 2001 From: Ani Date: Thu, 1 Feb 2024 11:27:37 +0200 Subject: [PATCH 05/13] Update Finance reports title (#1712) Co-authored-by: ani-kalpachka --- public/locales/bg/about-project.json | 2 +- public/locales/en/about-project.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/locales/bg/about-project.json b/public/locales/bg/about-project.json index a3ba364bb..93921e616 100644 --- a/public/locales/bg/about-project.json +++ b/public/locales/bg/about-project.json @@ -66,7 +66,7 @@ "with-holder": "с титуляр", "association-name": "Сдружение Подкрепи БГ", "finance-report-page": { - "financeReport": "Финансови отчети за НПО Aсоциация Подкрепи.бг", + "financeReport": "Финансови отчети на Сдружение Подкрепи.бг", "finance-report-2021": "Финансов отчет за 2021:", "finance-report-2022-january-june": "Финансов отчет за 2022 Януари-Юни:", "finance-report-2022": "Финансов отчет за 2022:", diff --git a/public/locales/en/about-project.json b/public/locales/en/about-project.json index 6c7ff5f7e..64dbf753f 100644 --- a/public/locales/en/about-project.json +++ b/public/locales/en/about-project.json @@ -68,7 +68,7 @@ "with-holder": "with holder", "association-name": "Association Podkrepi BG", "finance-report-page": { - "financeReport": "Finance reports for NPO Association Podkrepi.bg", + "financeReport": "Finance reports of Podkrepi.bg Association", "finance-report-2021": "Finance report for 2021:", "finance-report-2022-january-june": "Finance report for 2022 January-June:", "finance-report-2022": "Finance report for 2022", From b82536486e7170ff045c2a55f03f3b54a0a9919d Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 1 Feb 2024 19:44:09 +0200 Subject: [PATCH 06/13] locales: Fix broken translation of notifications modal on some pages (#1714) Not every page includes the auth namespace, thus on some pages, translation on buttons is broken(Blog, finance report etc..) Move notification related ctas, to the common namespace --- public/locales/bg/auth.json | 1 - public/locales/bg/common.json | 12 ++++++++---- public/locales/en/auth.json | 1 - public/locales/en/common.json | 12 ++++++++---- .../client/notifications/CampaignSubscribeModal.tsx | 10 +++++----- .../client/notifications/GeneralSubscribeModal.tsx | 10 +++++----- 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/public/locales/bg/auth.json b/public/locales/bg/auth.json index 440e59019..943d0491f 100644 --- a/public/locales/bg/auth.json +++ b/public/locales/bg/auth.json @@ -12,7 +12,6 @@ }, "cta": { "login": "Вход", - "guest": "Като гост", "logout": "Изход", "register": "Регистрация", "send": "Изпрати", diff --git a/public/locales/bg/common.json b/public/locales/bg/common.json index 39d98e0c0..8517c4046 100644 --- a/public/locales/bg/common.json +++ b/public/locales/bg/common.json @@ -102,6 +102,13 @@ "more-information": "Повече информация" }, "notifications": { + "cta": { + "login": "Вход", + "guest": "Като гост", + "subscribe-button": "Запиши ме", + "profile-button": "На профилния", + "another-button": "На друг" + }, "subscribe": "Абонирай се за email известия за кампанията", "subscribeFooter": "Абонирай се за бюлетина", "subscribeGeneral": "Абонирайте се за email известия от Подкрепи.бг", @@ -118,10 +125,7 @@ "subscribe-text-nonLoggedUser-general": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия от нас, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", "subscribe-text-loggedUser": "Моля, избери дали желаеш да получаваш новините за кампанията на email адреса, асоцииран с профила ти, или на алтернативен адрес:", "subscribe-subtitle": "Искам да получавам новини и известия от Подкрепи.бг на този email адрес:", - "subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:", - "subscribe-button": "Запиши ме", - "profile-button": "На профилния", - "another-button": "На друг" + "subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:" }, "cookieConsent": "Подкрепи.бг не използва бисквитки, освен тези от трети страни, нужни за аналитичните компоненти Google Analytics и HotJar. Приемането на бисквитките ще ни помогне да подобрим вашето потребителско преживяване.", "cookieConsentButton": "Приемам", diff --git a/public/locales/en/auth.json b/public/locales/en/auth.json index 8fb087a09..a3e659ade 100644 --- a/public/locales/en/auth.json +++ b/public/locales/en/auth.json @@ -11,7 +11,6 @@ }, "cta": { "login": "Login", - "guest": "As guest", "logout": "Logout", "register": "Register", "send": "Send", diff --git a/public/locales/en/common.json b/public/locales/en/common.json index c047bf5e1..b385ca011 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -102,6 +102,13 @@ "more-information": "More information" }, "notifications": { + "cta": { + "login": "Login", + "guest": "As guest", + "subscribe-button": "Subscribe me", + "profile-button": "On the profile one", + "another-button": "On another one" + }, "subscribe": "Subscribe for email notifications for the campaign", "subscribeFooter": "Subscribe for the newsletter", "subscribeGeneral": "Subscribe for email notifications from Podkrepi.bg", @@ -118,10 +125,7 @@ "subscribe-text-nonLoggedUser-general": "Please, proceed as a guest and write down your email, on which you want to receive notifications from us or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile", "subscribe-text-loggedUser": "Please, choose if you want to receive the news about the campaign on your profile email or on another one:", "subscribe-subtitle": "I want to receive news and notifications from Podkrepi.bg on this email:", - "subscribe-campaign-subtTitle": "I want to receive news about the campaign on this email:", - "subscribe-button": "Subscribe me", - "profile-button": "On the profile one", - "another-button": "On another one" + "subscribe-campaign-subtTitle": "I want to receive news about the campaign on this email:" }, "cookieConsent": "Podkrepi.bg doesn't use cookies, except the third-party cookies required for the analytics components Google Analytics and HotJar. Accepting the cookies will help us improve your user experience.", diff --git a/src/components/client/notifications/CampaignSubscribeModal.tsx b/src/components/client/notifications/CampaignSubscribeModal.tsx index fb8f1ac4e..fd919cf44 100644 --- a/src/components/client/notifications/CampaignSubscribeModal.tsx +++ b/src/components/client/notifications/CampaignSubscribeModal.tsx @@ -120,7 +120,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda @@ -177,8 +177,8 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda className={classes.subscribeBtn} label={ status !== 'authenticated' - ? 'auth:cta.login' - : 'common:notifications.profile-button' + ? 'common:notifications.cta.login' + : 'common:notifications.cta.profile-button' } loading={loading} onClick={() => sendOnProfileEmail(status)} @@ -190,8 +190,8 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda className={classes.subscribeBtn} label={ status !== 'authenticated' - ? 'auth:cta.guest' - : 'common:notifications.another-button' + ? 'common:notifications.cta.guest' + : 'common:notifications.cta.another-button' } loading={loading} onClick={() => openAsGuest()} diff --git a/src/components/client/notifications/GeneralSubscribeModal.tsx b/src/components/client/notifications/GeneralSubscribeModal.tsx index 1f09c12fb..0b489db25 100644 --- a/src/components/client/notifications/GeneralSubscribeModal.tsx +++ b/src/components/client/notifications/GeneralSubscribeModal.tsx @@ -125,7 +125,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { @@ -182,8 +182,8 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { className={classes.subscribeBtn} label={ status !== 'authenticated' - ? 'auth:cta.login' - : 'common:notifications.profile-button' + ? 'common:notifications.cta.login' + : 'common:notifications.cta.profile-button' } loading={loading} onClick={() => sendOnProfileEmail(status)} @@ -195,8 +195,8 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { className={classes.subscribeBtn} label={ status !== 'authenticated' - ? 'auth:cta.guest' - : 'common:notifications.another-button' + ? 'common:notifications.cta.guest' + : 'common:notifications.cta.another-button' } loading={loading} onClick={() => openAsGuest()} From d5ee24d1903ffa97c18cc4e77f1c16cc2eb709c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 19:52:35 +0200 Subject: [PATCH 07/13] build(deps): bump actions/cache from 3 to 4 (#1715) Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-nextjs.yml | 2 +- .github/workflows/playwright.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-nextjs.yml b/.github/workflows/build-nextjs.yml index a0304c42b..ab801b112 100644 --- a/.github/workflows/build-nextjs.yml +++ b/.github/workflows/build-nextjs.yml @@ -16,7 +16,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index ebcb6081e..0673eccbc 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -27,7 +27,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 93d7a5657..861d4f5fb 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,7 +26,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ${{ steps.yarn-cache-dir-path.outputs.dir }} From fbca1ba7cc0afafa34c1e0c058968107f1e84ab3 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Fri, 2 Feb 2024 08:26:07 +0200 Subject: [PATCH 08/13] Another notification related translation fix (#1716) * locales: Fix broken translation of notifications modal on some pages Not every page includes the auth namespace, thus on some pages, translation on buttons is broken(Blog, finance report etc..) Move notification related ctas, to the common namespace * Another notification related translation fix Between the News and The campaign was supported by sections --- src/components/client/campaigns/CampaignDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index 3c872d4c1..c78e0a6db 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -214,7 +214,7 @@ export default function CampaignDetails({ campaign }: Props) { cursor="pointer" /> setSubscribeOpen(true)} className={classes.subscribeLink}> - {t('campaigns:cta.subscribe')} + {t('common:notifications.subscribe')} From c1d9ec01f7391cd9eac428c58f344c7f2fbe4413 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Fri, 2 Feb 2024 21:54:10 +0200 Subject: [PATCH 09/13] public/locales: Change text of finance reports (#1717) As requested by Petya Dimitrova --- public/locales/bg/about-project.json | 6 +++--- public/locales/bg/common.json | 2 +- public/locales/en/about-project.json | 8 ++++---- public/locales/en/beneficiary.json | 2 +- public/locales/en/common.json | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/public/locales/bg/about-project.json b/public/locales/bg/about-project.json index 93921e616..5a2fae274 100644 --- a/public/locales/bg/about-project.json +++ b/public/locales/bg/about-project.json @@ -67,9 +67,9 @@ "association-name": "Сдружение Подкрепи БГ", "finance-report-page": { "financeReport": "Финансови отчети на Сдружение Подкрепи.бг", - "finance-report-2021": "Финансов отчет за 2021:", - "finance-report-2022-january-june": "Финансов отчет за 2022 Януари-Юни:", - "finance-report-2022": "Финансов отчет за 2022:", + "finance-report-2021": "Финансов отчет за 2021 г.:", + "finance-report-2022-january-june": "Финансов отчет за полугодие Януари-Юни 2022 г.:", + "finance-report-2022": "Годишен финансов отчет за 2022 г.:", "download-from-here": "Свалете от тук" } } diff --git a/public/locales/bg/common.json b/public/locales/bg/common.json index 8517c4046..63ca83067 100644 --- a/public/locales/bg/common.json +++ b/public/locales/bg/common.json @@ -7,7 +7,7 @@ "who-are-we": "Кои сме ние?", "support_us": "Подкрепете ни", "support-us": "Станете доброволец", - "reports": "Отчети", + "reports": "Финансови отчети", "contacts": "Контакти", "partners": "Партньори" }, diff --git a/public/locales/en/about-project.json b/public/locales/en/about-project.json index 64dbf753f..201146f90 100644 --- a/public/locales/en/about-project.json +++ b/public/locales/en/about-project.json @@ -68,10 +68,10 @@ "with-holder": "with holder", "association-name": "Association Podkrepi BG", "finance-report-page": { - "financeReport": "Finance reports of Podkrepi.bg Association", - "finance-report-2021": "Finance report for 2021:", - "finance-report-2022-january-june": "Finance report for 2022 January-June:", - "finance-report-2022": "Finance report for 2022", + "financeReport": "Annual Reports", + "finance-report-2021": "Financial Report for 2021:", + "finance-report-2022-january-june": "Semi-annual Financial Report for January-June 2022:", + "finance-report-2022": "Annual Financial Report for 2022", "download-from-here": "Download from here" } } diff --git a/public/locales/en/beneficiary.json b/public/locales/en/beneficiary.json index 7a169acf3..61b954e82 100644 --- a/public/locales/en/beneficiary.json +++ b/public/locales/en/beneficiary.json @@ -37,7 +37,7 @@ "company-select": "Select company or", "create-new": "create new", "person-label": "Person", - "company-label": "Company", + "company-label": "Company" } }, "actions": "Actions", diff --git a/public/locales/en/common.json b/public/locales/en/common.json index b385ca011..0b25f135e 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -7,7 +7,7 @@ "who-are-we": "Who are we?", "support_us": "Support us", "support-us": "Join us", - "reports": "Reports", + "reports": "Annual Reports", "contacts": "Contacts", "partners": "Partners" }, @@ -69,7 +69,7 @@ "about-project": "About the project", "support-us": "Support us", "become-a-volunteer": "Become a volunteer", - "reports": "Reports", + "reports": "Anual Reports", "contact": "Contact", "faq": "Frequently asked questions", "privacy-policy": "Privacy Policy", From 2bc35565fadd231c67f7b10fe7bdeab6999c377c Mon Sep 17 00:00:00 2001 From: Ani Date: Wed, 14 Feb 2024 20:07:10 +0200 Subject: [PATCH 10/13] Add minor UI fixes on News subscription (#1719) * Update subscribtion modal on mobile * Update subscription translations * Update translations --------- Co-authored-by: ani-kalpachka --- public/locales/bg/auth.json | 8 ++++---- public/locales/bg/common.json | 10 +++++----- public/locales/bg/index.json | 4 ++-- public/locales/en/auth.json | 10 +++++----- .../client/auth/register/RegisterPage.tsx | 2 +- .../PlatformStatisticsSection.styled.tsx | 2 +- .../notifications/GeneralSubscribeModal.tsx | 20 ++++++++++++++++--- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/public/locales/bg/auth.json b/public/locales/bg/auth.json index 943d0491f..b0fb0c13e 100644 --- a/public/locales/bg/auth.json +++ b/public/locales/bg/auth.json @@ -55,10 +55,10 @@ }, "register": { "individual": "Регистрация като физическо лице", - "individual-subtitle": "Дарения от този профил, ще се извършват от физическо лице ", + "individual-subtitle": "Дарения от този профил ще се извършват от физическо лице.", "corporate": "Регистрация като юридическо лице", - "corporate-subtitle": "Дарения от този профил, ще се извършват от името на организацията, която представлявате", - "success": "Регистрацията беше успешна", - "corporate-subtitle-success": "Член от екипа на Podkrepi.bg, ще се свърже с вас с цел финализиране на регистрацията на представляваната от Вас компания в платформата" + "corporate-subtitle": "Дарения от този профил ще се извършват от името на организацията, която представлявате.", + "success": "Регистрацията беше успешна.", + "corporate-subtitle-success": "Член от екипа на Podkrepi.bg ще се свърже с вас с цел финализиране на регистрацията на представляваната от Вас компания в платформата." } } diff --git a/public/locales/bg/common.json b/public/locales/bg/common.json index 63ca83067..b71a2d521 100644 --- a/public/locales/bg/common.json +++ b/public/locales/bg/common.json @@ -117,13 +117,13 @@ "subscribe-general-monthly-newsletter": "Получавайте нашия месечен бюлетин, за да сте в час най-интересните новини от Подкрепи.бг!", "subscribeGeneralButton": "Абонирайте се за новини", "subscribe-general-newsletter-button": "Абонирайте се", - "confirm-sent": "Моля, активирай абонамента си от email-a, който ти изпратихме на {{email}}", - "confirm-subscribe": "Записа се успешно.", + "confirm-sent": "Моля, активирайте абонамента си от email-a, който Ви изпратихме на {{email}}", + "confirm-subscribe": "Записахте се успешно.", "subscribe-title": "Абониране за новините на Подкрепи.бг", "subscribe-campaign-title": "Абониране за новините по кампанията", - "subscribe-text-nonLoggedUser": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия за тази кампания, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", - "subscribe-text-nonLoggedUser-general": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия от нас, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.", - "subscribe-text-loggedUser": "Моля, избери дали желаеш да получаваш новините за кампанията на email адреса, асоцииран с профила ти, или на алтернативен адрес:", + "subscribe-text-nonLoggedUser": "Моля, продължете като гост и въведете email адреса, на който желаете да получавате известия за тази кампания, или влезте в профила си. Вписвайки се с потребителското си име и парола, ще можете да управлявате абонамента си от своя Личен профил.", + "subscribe-text-nonLoggedUser-general": "Моля, продължете като гост и въведете email адреса, на който желаете да получавате известия от нас, или влезте в профила си. Вписвайки се с потребителското си име и парола, ще можете да управлявате абонамента си от своя Личен профил.", + "subscribe-text-loggedUser": "Моля, изберете дали желаете да получавате новините за кампанията на email адреса, асоцииран с профила Ви, или на алтернативен адрес:", "subscribe-subtitle": "Искам да получавам новини и известия от Подкрепи.бг на този email адрес:", "subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:" }, diff --git a/public/locales/bg/index.json b/public/locales/bg/index.json index f80a50d21..485c3d3d3 100644 --- a/public/locales/bg/index.json +++ b/public/locales/bg/index.json @@ -7,8 +7,8 @@ "meet-our-team": "Запознайте се с екипа ни" }, "subscription-section": { - "heading": "Искаш да си в час с бъдещите ни постижения?", - "content": "Абонирай се за нашия бюлетин и ние ще те информираме за най-важното от живота на Подкрепи.бг. Всеки месец ще получваш email от нас, в който ще ти споделяме най-интересното за кампаниите, които поддържаме, както и за техните организатори и бенефициенти. Ще получаваш новините за нашите партньори, доброволци и дарители в електронната си пощенска кутия. Ако ти звучи добре, запиши се, като въведеш email адреса си тук:" + "heading": "Искате да си в час с бъдещите ни постижения?", + "content": "Абонирайте се за нашия бюлетин и ние ще Ви информираме за най-важното от живота на Подкрепи.бг. Всеки месец ще получвате email от нас, в който ще Ви споделяме най-интересното за кампаниите, които поддържаме, както и за техните организатори и бенефициенти. Ще получавате новините за нашите партньори, доброволци и дарители в електронната си пощенска кутия. Ако Ви звучи добре, запишете се, като въведеш email адреса си тук:" }, "campaign": { "see-all": "Вижте всички" diff --git a/public/locales/en/auth.json b/public/locales/en/auth.json index a3e659ade..4515292c0 100644 --- a/public/locales/en/auth.json +++ b/public/locales/en/auth.json @@ -54,14 +54,14 @@ }, "registration": { "success": "Registration successfull", - "corporate-subtitle-success": "Member of Podkrepi.bg, will contact you, to verify the corporation you represent" + "corporate-subtitle-success": "Member of Podkrepi.bg, will contact you, to verify the corporation you represent." }, "register": { "individual": "Register as individual", - "individual-subtitle": "Donations made by this account, will be done by the individual", + "individual-subtitle": "Donations made by this account will be done by the individual.", "corporate": "Register as corporation", - "corporate-subtitle": "Donations made by this account, will be done by the represented company", - "success": "Registration successfull", - "corporate-subtitle-success": "Member of Podkrepi.bg, will contact you, in order to finalize the registration of the company you represent" + "corporate-subtitle": "Donations made by this account will be done by the represented company.", + "success": "Registration is successfull.", + "corporate-subtitle-success": "Member of Podkrepi.bg, will contact you in order to finalize the registration of the company you represent." } } diff --git a/src/components/client/auth/register/RegisterPage.tsx b/src/components/client/auth/register/RegisterPage.tsx index 3866063d5..eacd700b6 100644 --- a/src/components/client/auth/register/RegisterPage.tsx +++ b/src/components/client/auth/register/RegisterPage.tsx @@ -62,7 +62,7 @@ export default function RegisterPage({ providers }: RegisterPageProps) { // Register in Keycloak const registerResponse = await register(values) - console.log(registerResponse) + if (registerResponse.data.data?.errorMessage) { AlertStore.show(t('auth:alerts.duplicate-email'), 'error') return diff --git a/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.styled.tsx b/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.styled.tsx index 51c99674e..dd6cd38a1 100644 --- a/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.styled.tsx +++ b/src/components/client/index/sections/PlatformStatisticsSection/PlatformStatisticsSection.styled.tsx @@ -77,7 +77,7 @@ export const HelpThoseInNeedButton = styled(LinkButton)(() => ({ export const SubscribeHeading = styled(Typography)(() => ({ fontWeight: 500, fontSize: theme.typography.pxToRem(16.5), - textAlign: 'center', + marginBottom: theme.spacing(2), })) export const SubscribeButton = styled(Button)(() => ({ diff --git a/src/components/client/notifications/GeneralSubscribeModal.tsx b/src/components/client/notifications/GeneralSubscribeModal.tsx index 0b489db25..b29df2db5 100644 --- a/src/components/client/notifications/GeneralSubscribeModal.tsx +++ b/src/components/client/notifications/GeneralSubscribeModal.tsx @@ -22,6 +22,7 @@ import { routes } from 'common/routes' import { useSendConfirmationEmail } from 'service/notification' import { SendConfirmationEmailResponse, SendConfirmationEmailInput } from 'gql/notification' +import theme from 'common/theme' const PREFIX = 'GeneralSubscribeModal' @@ -175,10 +176,23 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { : t('common:notifications.subscribe-text-loggedUser')} - + Date: Wed, 21 Feb 2024 19:45:41 +0200 Subject: [PATCH 11/13] build(deps): bump ip from 2.0.0 to 2.0.1 (#1720) Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3f3adca8a..63baa590e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8383,9 +8383,9 @@ __metadata: linkType: hard "ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + version: 2.0.1 + resolution: "ip@npm:2.0.1" + checksum: d765c9fd212b8a99023a4cde6a558a054c298d640fec1020567494d257afd78ca77e37126b1a3ef0e053646ced79a816bf50621d38d5e768cdde0431fa3b0d35 languageName: node linkType: hard From df6330633b914de104eb47cbd8e1b76569ffb9b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:15:46 +0200 Subject: [PATCH 12/13] build(deps): bump ip from 2.0.0 to 2.0.1 in /e2e (#1721) Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- e2e/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/yarn.lock b/e2e/yarn.lock index 22f0e11ea..e9af67be6 100644 --- a/e2e/yarn.lock +++ b/e2e/yarn.lock @@ -515,9 +515,9 @@ __metadata: linkType: hard "ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + version: 2.0.1 + resolution: "ip@npm:2.0.1" + checksum: d765c9fd212b8a99023a4cde6a558a054c298d640fec1020567494d257afd78ca77e37126b1a3ef0e053646ced79a816bf50621d38d5e768cdde0431fa3b0d35 languageName: node linkType: hard From bb8fab3f222fe5b29e9f0b626d2f33f82758c468 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:59:38 +0200 Subject: [PATCH 13/13] build(deps): bump es5-ext from 0.10.62 to 0.10.64 (#1723) Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.64) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63baa590e..6421c7b99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6554,14 +6554,15 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50": - version: 0.10.62 - resolution: "es5-ext@npm:0.10.62" +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:~0.10.14": + version: 0.10.64 + resolution: "es5-ext@npm:0.10.64" dependencies: es6-iterator: ^2.0.3 es6-symbol: ^3.1.3 + esniff: ^2.0.1 next-tick: ^1.1.0 - checksum: 25f42f6068cfc6e393cf670bc5bba249132c5f5ec2dd0ed6e200e6274aca2fed8e9aec8a31c76031744c78ca283c57f0b41c7e737804c6328c7b8d3fbcba7983 + checksum: 01179fab0769fdbef213062222f99d0346724dbaccf04b87c0e6ee7f0c97edabf14be647ca1321f0497425ea7145de0fd278d1b3f3478864b8933e7136a5c645 languageName: node linkType: hard @@ -6900,6 +6901,18 @@ __metadata: languageName: node linkType: hard +"esniff@npm:^2.0.1": + version: 2.0.1 + resolution: "esniff@npm:2.0.1" + dependencies: + d: ^1.0.1 + es5-ext: ^0.10.62 + event-emitter: ^0.3.5 + type: ^2.7.2 + checksum: d814c0e5c39bce9925b2e65b6d8767af72c9b54f35a65f9f3d6e8c606dce9aebe35a9599d30f15b0807743f88689f445163cfb577a425de4fb8c3c5bc16710cc + languageName: node + linkType: hard + "espree@npm:^9.6.0": version: 9.6.0 resolution: "espree@npm:9.6.0" @@ -6984,6 +6997,16 @@ __metadata: languageName: node linkType: hard +"event-emitter@npm:^0.3.5": + version: 0.3.5 + resolution: "event-emitter@npm:0.3.5" + dependencies: + d: 1 + es5-ext: ~0.10.14 + checksum: 27c1399557d9cd7e0aa0b366c37c38a4c17293e3a10258e8b692a847dd5ba9fb90429c3a5a1eeff96f31f6fa03ccbd31d8ad15e00540b22b22f01557be706030 + languageName: node + linkType: hard + "eventemitter3@npm:^2.0.3": version: 2.0.3 resolution: "eventemitter3@npm:2.0.3"