From 42fb0e33d9becefac6f4fa1a977e6f0f625af68d Mon Sep 17 00:00:00 2001 From: Ani Date: Tue, 16 Jan 2024 17:38:59 +0200 Subject: [PATCH 1/4] Update email address on FAQ (#1705) Co-authored-by: ani-kalpachka --- src/components/client/faq/contents/campaigns.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/client/faq/contents/campaigns.tsx b/src/components/client/faq/contents/campaigns.tsx index 88fb95941..aea179fee 100644 --- a/src/components/client/faq/contents/campaigns.tsx +++ b/src/components/client/faq/contents/campaigns.tsx @@ -12,8 +12,8 @@ export const CAMPAIGN_QUESTIONS: ContentType[] = [ {'Тук '} {' '} можете да се запознаете с Общите условия на Подкрепи.бг за процеса по създаване на кампания. - Все още сме в Бета тест период и засега, ако имате интерес за създаване на кампания можете - да ни изпратите email на този адрес: info@podkrepi.bg + Все още сме в Бета тест период и засега ако имате интерес за създаване на кампания, можете + да ни изпратите email на този адрес: campaign_coordinators@podkrepi.bg ), }, From 6a519e11729b23d896b1bbc7c08250a1554a6cd2 Mon Sep 17 00:00:00 2001 From: Ani Date: Wed, 17 Jan 2024 09:41:52 +0200 Subject: [PATCH 2/4] Update translations (#1706) * Update translations * Update tranlations * Update translations --------- Co-authored-by: ani-kalpachka --- public/locales/bg/countries.json | 2 -- public/locales/bg/expenses.json | 4 +--- public/locales/bg/index.json | 21 --------------------- public/locales/bg/news.json | 1 - public/locales/bg/one-time-donation.json | 6 +----- public/locales/bg/person.json | 2 +- public/locales/bg/privacy-policy.json | 0 public/locales/en/countries.json | 2 -- public/locales/en/expenses.json | 6 +++--- public/locales/en/index.json | 21 --------------------- public/locales/en/news.json | 3 ++- public/locales/en/one-time-donation.json | 6 +----- public/locales/en/person.json | 1 - public/locales/en/privacy-policy.json | 0 14 files changed, 9 insertions(+), 66 deletions(-) delete mode 100644 public/locales/bg/privacy-policy.json delete mode 100644 public/locales/en/privacy-policy.json diff --git a/public/locales/bg/countries.json b/public/locales/bg/countries.json index 2dc25c036..a94fa1ca0 100644 --- a/public/locales/bg/countries.json +++ b/public/locales/bg/countries.json @@ -41,8 +41,6 @@ "description": "Всички държави", "tooltips": { "add": "Добави", - "view": "Преглед", - "edit": "Редактирай", "delete": "Изтрий" }, "country": "Държава", diff --git a/public/locales/bg/expenses.json b/public/locales/bg/expenses.json index 7f49246fd..00a9db24c 100644 --- a/public/locales/bg/expenses.json +++ b/public/locales/bg/expenses.json @@ -82,14 +82,12 @@ "description": "Всички разходи", "reported": "Общо отчетени разходи", "donations": "Общо събрани дарения", - "uploaded-documents": "Прикачени документи", "uploaded-files": "Прикачени файлове", "new-files": "Нови файлове", + "add-documents": "Добави документи", "deleteTitle": "Сигурни ли сте, че искате да изтриете файла?", "tooltips": { "add": "Добави", - "view": "Преглед", - "edit": "Редактирай", "delete": "Изтрий", "download": "Свали" } diff --git a/public/locales/bg/index.json b/public/locales/bg/index.json index 732554929..f80a50d21 100644 --- a/public/locales/bg/index.json +++ b/public/locales/bg/index.json @@ -1,10 +1,6 @@ { "title": "Подкрепи.бг - прозрачна онлайн дарителска платформа", "metaDescription": "Подкрепи.бг е прозрачна и безплатна онлайн дарителска платформа, създадена от доброволния труд на членовете на сдружение Подкрепи БГ.", - "activity-section": { - "heading": "Какво правим?", - "content": "Подкрепи.бг е сдружение от професионалисти, обединени от идеята да създадем безплатна и напълно прозрачна онлайн платформа за дарения, която да може да се ползва свободно от граждани и организации." - }, "team-section": { "heading": "Кой стои зад Подкрепи.бг?", "content": "Подкрепи.бг представлява общност от специалисти в областта на програмирането, правото, маркетинга, дизайна, медицината, финансите, социалното предприемачество и др. Обединени сме от целта да създадем устойчива и прозрачна платформа за дарения, която подкрепя каузи и хора в нужда, като заедно с това популяризира и връща доверието към дарителството в България.", @@ -14,23 +10,6 @@ "heading": "Искаш да си в час с бъдещите ни постижения?", "content": "Абонирай се за нашия бюлетин и ние ще те информираме за най-важното от живота на Подкрепи.бг. Всеки месец ще получваш email от нас, в който ще ти споделяме най-интересното за кампаниите, които поддържаме, както и за техните организатори и бенефициенти. Ще получаваш новините за нашите партньори, доброволци и дарители в електронната си пощенска кутия. Ако ти звучи добре, запиши се, като въведеш email адреса си тук:" }, - "support-us-section": { - "heading": "Подкрепете ни като:", - "financial-support": "- дарител", - "labour-support": "- доброволец", - "media-support": "- медия", - "become-a-partner": "- партньор", - "click-here-button": "Включете се" - }, - "mission-vision-goals-section": { - "mission-title": "Мисия", - "mission-text": "Създаване на напълно прозрачна онлайн платформа за дарения, издържаща се от дарения и членски внос към сдружението ни, а не % комисиона от кампаниите.", - "vision-title": "Визия", - "vision-text": "Да подобрим дарителската култура в България драстично като увеличим прозрачността и доверието в дарителските кампании и платформи.", - "goals-title": "Цели", - "goals-text-trust": "- Да върнем доверието в дарителството.", - "goals-text-open-source": "- Да създадем open-source платформа, което намалява шансовете за злоупотреба." - }, "campaign": { "see-all": "Вижте всички" }, diff --git a/public/locales/bg/news.json b/public/locales/bg/news.json index 9c101b5aa..0d4aeb052 100644 --- a/public/locales/bg/news.json +++ b/public/locales/bg/news.json @@ -23,7 +23,6 @@ "warning": "Редактирането на това поле ще измени линка към статията и ще направи текущия невалиден", "placeholder": "Стойността по подразбиране е същата като 'Заглавие на статия'" }, - "select-campaign": "Изберете кампания", "source-link": { "label": "Линк към източник", "field-description": "Това поле е нужно само, в случай че статията е взета от друг източник.\nОставете празно ако вие сте автора на статията." diff --git a/public/locales/bg/one-time-donation.json b/public/locales/bg/one-time-donation.json index 727c46af8..9cff6460e 100644 --- a/public/locales/bg/one-time-donation.json +++ b/public/locales/bg/one-time-donation.json @@ -10,15 +10,12 @@ "info-start": "При дарение без регистрация, няма да можем да Ви изпратим сертификат за дарение, който да използвате за данъчни облекчения. Ако искате да получите сертификат, регистрирайте се или влезте в профила си.", "firstName": "Име", "lastName": "Фамилия", - "phone": "Телефон", - "info-end": "Данните Ви няма да бъдат споделяни с никого.", - "want-anonymous-donation": "Искам да даря анонимно!" + "phone": "Телефон" }, "first-step": { "wish": "Искате ли да пожелаете нещо на бенефициента?", "message": "Вашето послание", "check-box-label": "Анонимно дарение", - "info-anonymous": "Анонимно дарение означава, че организаторът и бенефициентът на кампания няма да узнаят Вашето име", "amount": "Каква сума желаете да дарите?", "other": "Друга сума", "BGN": "лв.", @@ -87,7 +84,6 @@ "btn-back-to-campaign": "Виж кампанията" }, "errors-fields": { - "checkbox-anonymous": "Моля изберете опция Анонимно дарение или Дарение без регистрация ако искате да продължите!", "bank-payment": "Съжаляваме за създаденото неудобство временно може да дарите само чрез банков превод!", "amount": "Моля изберете сумата, която желаете да дарите!", "other-amount": "Минималната сума която може да дарите с карта е 1лв." diff --git a/public/locales/bg/person.json b/public/locales/bg/person.json index 859f7c3b8..d79ff3db8 100644 --- a/public/locales/bg/person.json +++ b/public/locales/bg/person.json @@ -1,6 +1,5 @@ { "personSelect": "Изберете потребител", - "emptySelectItem": "Не е избран", "selectDialog": { "notSelected": "Не сте избрали потребител", "select": "Избиране", @@ -29,6 +28,7 @@ "fields": { "actions": "Действия", "name": "Име", + "create-heading": "Създай нов потребител", "first-name": "Име", "last-name": "Фамилия", "email": "Имейл", diff --git a/public/locales/bg/privacy-policy.json b/public/locales/bg/privacy-policy.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/public/locales/en/countries.json b/public/locales/en/countries.json index 5f4455b60..7ddae1052 100644 --- a/public/locales/en/countries.json +++ b/public/locales/en/countries.json @@ -41,8 +41,6 @@ "description": "All countries", "tooltips": { "add": "Add", - "view": "View", - "edit": "Edit", "delete": "Delete" }, "country-label": "Country", diff --git a/public/locales/en/expenses.json b/public/locales/en/expenses.json index 86250e496..be76a9dcf 100644 --- a/public/locales/en/expenses.json +++ b/public/locales/en/expenses.json @@ -10,11 +10,14 @@ "status": "Status", "amount": "Amount", "vault": "Vault", + "sourceVault": "From sub account", + "targetVault": "To sub account", "deleted": "Deleted", "description": "Description", "documentId": "Document Id", "approvedById": "Approved by (Id)", "approvedBy": "Approved by", + "approved": "Approved", "action": "Action", "empty": "Empty", "date": "Date", @@ -79,15 +82,12 @@ "description": "All expenses", "reported": "Total reported", "donations": "Total donations", - "uploaded-documents": "Uploaded documents", "uploaded-files": "Uploaded files", "new-files": "New files", "add-documents": "Add documents", "deleteTitle": "Delete expense file?", "tooltips": { "add": "Add", - "view": "View", - "edit": "Edit", "delete": "Delete", "download": "Download" } diff --git a/public/locales/en/index.json b/public/locales/en/index.json index 2f546d6c5..e5c8c96c1 100644 --- a/public/locales/en/index.json +++ b/public/locales/en/index.json @@ -1,10 +1,6 @@ { "title": "Podkrepi.bg - a transparent online donation platform", "metaDescription": "Podkrepi.bg is a transparent online donation platform created by a team of volunteers from the Podkrepi BG organization.", - "activity-section": { - "heading": "What do we do?", - "content": "Podkrepi.bg is an association of professionals united by the idea of creating a free and completely transparent online donation platform, which can be used freely by citizens and organizations." - }, "team-section": { "heading": "Who is behind Podkrepi.bg?", "content": "Podkrepi.bg is a community of specialists in the field of programming, law, marketing, design, medicine, finance, social entrepreneurship and others. We are united by the goal of creating a sustainable and transparent donation platform that supports causes and people in need, while promoting and restoring trust in donations in Bulgaria.", @@ -14,23 +10,6 @@ "heading": "You want to know about our future achievements?", "content": "Subscribe for our newsletter we will infrom you about the most important from the life of Podkrepi.bg. Every month you will receive email from us in which we will share with you the most important things about the campaigns that we have and their organizers and beneficiaries. You will receive news for our partners, volunteers and donors in your email box. If this sounds good for you, subscribe as you fill in your email here:" }, - "support-us-section": { - "heading": "Support us as:", - "financial-support": "- a benefactor", - "labour-support": "- a volunteer", - "media-support": "- media", - "become-a-partner": "- a partner", - "click-here-button": "Join us" - }, - "mission-vision-goals-section": { - "mission-title": "Mission", - "mission-text": "To create a completely transparent online donation platform, supported by donations and membership fees to our association, and not % commission from the companies.", - "vision-title": "Vision", - "vision-text": "To improve the donation culture in Bulgaria drastically by increasing transparency and trust in donation campaigns and platforms.", - "goals-title": "Goals", - "goals-text-trust": "- To restore trust in donation.", - "goals-text-open-source": "- To create an open-source platform which reduces the chances of misuse." - }, "campaign": { "see-all": "See all" }, diff --git a/public/locales/en/news.json b/public/locales/en/news.json index e6ced436a..51b065432 100644 --- a/public/locales/en/news.json +++ b/public/locales/en/news.json @@ -1,6 +1,8 @@ { "news": "News", "read-more": "Read more", + "form-heading": "Create new article", + "edit-form-heading": "Edit article", "read-less": "Read less", "see-all-news": "See all news", "news-not-found": "No news articles were found for this campaign", @@ -21,7 +23,6 @@ "warning": "Editing this field is going to change the link to the news article, and make the current one invalid", "placeholder": "The default value is the same as 'Article title'" }, - "select-campaign": "Select campaign", "source-link": { "label": "Link to source", "field-description": "This field is only necessary if the article is taken from another source.\nLeave empty if you are the author of this article" diff --git a/public/locales/en/one-time-donation.json b/public/locales/en/one-time-donation.json index 0ad6991aa..b0cbf160e 100644 --- a/public/locales/en/one-time-donation.json +++ b/public/locales/en/one-time-donation.json @@ -10,15 +10,12 @@ "info-start": "When donating without registration we won't be able to send you back a donation certificate or a list of your donations. If you still want to receive a certificate, please share at least your email - it will not be visible in the platform.", "firstName": "First name", "lastName": "Last name", - "phone": "Telephone", - "info-end": "Your data would not be shared with anyone", - "want-anonymous-donation": "I want to donate anonymously!" + "phone": "Telephone" }, "first-step": { "wish": "Would you like to wish something to the beneficiary?", "message": "Your wish", "check-box-label": "Anonymous donation", - "info-anonymous": "Anonymous donation means that the organisator and beneficiery would not be aware of your identity", "amount": "How much would you like to donate?", "other": "Other amount", "BGN": "BGN", @@ -87,7 +84,6 @@ "btn-back-to-campaign": "See the campaign" }, "errors-fields": { - "checkbox-anonymous": "Please select an option for anonymous donation or donation without registering if you would like to continue!", "bank-payment": "We are sorry for the inconvenience, but you can currently donate only through a bank transfer", "amount": "Please select the amount you would like to donate!", "other-amount": "The minimum amount you can donate with a card is BGN 1." diff --git a/public/locales/en/person.json b/public/locales/en/person.json index d1c490832..487a57204 100644 --- a/public/locales/en/person.json +++ b/public/locales/en/person.json @@ -1,6 +1,5 @@ { "personSelect": "Person Select", - "emptySelectItem": "Not selected", "selectDialog": { "notSelected": "You haven't chosen a person", "select": "Select", diff --git a/public/locales/en/privacy-policy.json b/public/locales/en/privacy-policy.json deleted file mode 100644 index e69de29bb..000000000 From 852fdd7dabb473c0e72a306a5c260ecd3e2946ba Mon Sep 17 00:00:00 2001 From: Ani Date: Fri, 19 Jan 2024 08:07:39 +0200 Subject: [PATCH 3/4] 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 --- public/locales/bg/donations.json | 4 ++-- public/locales/bg/profile.json | 11 +++++------ public/locales/bg/support.json | 16 +++++----------- public/locales/bg/validation.json | 6 ++---- public/locales/en/donations.json | 14 ++++++++++++-- public/locales/en/profile.json | 17 +++++++++++++---- public/locales/en/recurring-donation.json | 1 + public/locales/en/support.json | 19 +++++++------------ public/locales/en/transfer.json | 3 ++- public/locales/en/validation.json | 7 ++++--- public/locales/en/withdrawals.json | 5 +++++ 11 files changed, 58 insertions(+), 45 deletions(-) diff --git a/public/locales/bg/donations.json b/public/locales/bg/donations.json index f4715d131..036db7acb 100644 --- a/public/locales/bg/donations.json +++ b/public/locales/bg/donations.json @@ -31,7 +31,7 @@ "create": "Дарението беше създадено успешно!", "edit": "Дарението беше редактирано успешно!", "delete": "Дарението беше изтрито успешно!", - "refundSuccess": "Беше създадена успешна заявка за връщане на парите към Stripe", + "refundSuccess": "Беше създадена успешна заявка за връщане на парите към Stripe.", "editDonor": "Дарителят беше редактиран успешно!", "error": "Възникна грешка! Моля опитайте отново по-късно.", "requiredError": "Полето е задължително." @@ -65,6 +65,6 @@ "number": "Номер:", "amount": "Сума:", "email": "Е-mail на дарител:", - "confirm-button": "Възстанови парите от даренеие" + "confirm-button": "Възстанови парите от дарение" } } diff --git a/public/locales/bg/profile.json b/public/locales/bg/profile.json index d6e713daf..875c4180e 100644 --- a/public/locales/bg/profile.json +++ b/public/locales/bg/profile.json @@ -22,7 +22,7 @@ "donations": { "index": "Дарения", "donor": "Дарител", - "helpThanks": "благодарим за помощта Ви!", + "helpThanks": "Благодарим за помощта Ви!", "donateNow": "Подкрепи сега", "totalDonations": "Всички дарения", "recurringDonations": "Месечни дарения", @@ -44,15 +44,14 @@ "cancel": "Откажи", "certificate": "Сертификат", "download": "Свалете", - "lv": "лв", "bank": "Банка", "card": "Карта", + "lv": "лв", "status": { "header": "Статус", "initial": "започнато", "waiting": "чакащо", "succeeded": "успешно", - "refund": "възстановено", "cancelled": "отменено", "guaranteed": "гарантирано" @@ -77,9 +76,9 @@ "title-unsubscribe": "Отписване от получаването на известия от Podkrepi.bg?", "campaign-title-unsubscribe": "Отписване от получаването на известия по тази кампания?", "cta": "Потвърждавам", - "subscribe-msg": "Успешно активирахте абонамента си за получаването на известия!", - "unsubscribe-msg": "Успешно деактивирахте абонамента си за получаването на известия!", - "campaign-unsubscribe-msg": "Успешно се отписахте от получаването на известия по кампанията" + "subscribe-msg": "Успешно активирахте абонамента си за получаването на известия.", + "unsubscribe-msg": "Успешно деактивирахте абонамента си за получаването на известия.", + "campaign-unsubscribe-msg": "Успешно се отписахте от получаването на известия по кампанията." }, "status": { "active": "Активен", diff --git a/public/locales/bg/support.json b/public/locales/bg/support.json index e48eb9462..18deeb647 100644 --- a/public/locales/bg/support.json +++ b/public/locales/bg/support.json @@ -7,24 +7,19 @@ "first-subtitle": "Включете се в организацията като:", "fields": { "benefactor": { - "title": "Дарител", - "description": "Дарител..." + "title": "Дарител" }, "partner": { - "title": "Партньор", - "description": "Партньор..." + "title": "Партньор" }, "volunteer": { - "title": "Доброволец", - "description": "Доброволец..." + "title": "Доброволец" }, "associationMember": { - "title": "Член на сдружението", - "description": "Член на сдружението..." + "title": "Член на сдружението" }, "company": { - "title": "Компания", - "description": "Компания..." + "title": "Компания" } } }, @@ -45,7 +40,6 @@ }, "volunteer": { "title": "Доброволец", - "label": "Моля, изберете област", "marketing": "Маркетинг", "backend": "Backend", "frontend": "Frontend", diff --git a/public/locales/bg/validation.json b/public/locales/bg/validation.json index ef89b0927..8e1bc2d71 100644 --- a/public/locales/bg/validation.json +++ b/public/locales/bg/validation.json @@ -9,20 +9,18 @@ "password-match": "Паролата не съвпада", "field-too-short": "Полето трябва да бъде поне {{min}} символа", "field-too-long": "Полето трябва да бъде най-много {{max}} символа", - "one-of": "Невалидна стойност", "select-role": "Моля, изберете си роля", "terms-of-use": "Моля, приемете oбщите условия", "terms-of-service": "Моля, приемете политиката за защита на личните данни", - "agree-terms": "Съгласявам се с Общите условия", "agree-with": "Съгласявам се с", - "agree-with-newsletter": "Съгласявам се да получавам известия ", + "agree-with-newsletter": "Съгласявам се да получавам известия", "agree-with-newsletter-campaign": "Съгласявам се да получавам новини за тази кампания и известия от Подкрепи.бг *", "informed-agree-with": "Запознат съм и се съгласявам с", "terms-and-conditions": "общите условия", "gdpr": "политиката за защита на личните данни", "newsletter": "Моля дайте своето съгласие", "legal-entity": "Юридическо лице", - "unique-field-violation": "Полето `{1}` със тази стойност вече съществува в платформата", + "unique-field-violation": "Полето `{1}` със тази стойност вече съществува в платформата.", "payment-reference": "Невалиден формат на кода за плащане", "eik-invalid": "Невалидно ЕИК" } diff --git a/public/locales/en/donations.json b/public/locales/en/donations.json index e8027fcce..a87b2076f 100644 --- a/public/locales/en/donations.json +++ b/public/locales/en/donations.json @@ -19,18 +19,19 @@ "updated-at": "Updated at", "deleteTitle": "Are you sure?", "deleteContent": "This action will delete this item permanently!", + "actions": "Actions", + "createdAt": "Created at", "bankTransactionsFileId": "Name of bank transactions file", "addFiles": "Select file", "bankImprotResults": "Bank import results", "bankImprotResultsSubtitle": "Here is the status of the imported records, feel free to correct the errors and upload the file again.", "message": "Message", - "actions": "Actions", - "createdAt": "Created at", "noOptions": "No results", "alerts": { "create": "Document has been created successfully!", "edit": "Document has been edited successfully!", "delete": "Document has been deleted successfully!", + "refundSuccess": "A successful refund request was created with Stripe.", "editDonor": "Donation donor has been edited successfully!", "error": "An error has occured! Please try again later.", "requiredError": "Fields is required!" @@ -56,5 +57,14 @@ "sortBy": "Sort By", "minAmount": "Min amount", "maxAmount": "Max amount" + }, + "refund": { + "icon": "Donation return", + "title": "Make a donation return request", + "confirmation": "Are you sure you want to refund a donation:", + "number": "Number:", + "amount": "Amount:", + "email": "Donator's email:", + "confirm-button": "Refund a donation" } } diff --git a/public/locales/en/profile.json b/public/locales/en/profile.json index 2ed59f30b..940e881d6 100644 --- a/public/locales/en/profile.json +++ b/public/locales/en/profile.json @@ -1,6 +1,7 @@ { "header": "Personal profile", "corporate-header": "Corporate Profile", + "campaigns": "Supported campaigns", "personalInfo": { "index": "Personal information", "login": "Login information:", @@ -21,30 +22,37 @@ "donations": { "index": "Donations", "donor": "Donor", - "helpThanks": "thank you for your help!", + "helpThanks": "Thank you for your help!", "donateNow": "Donate now", "totalDonations": "All donations", "recurringDonations": "Monthly donations", "cardDonations": "Donations with card", "bankDonations": "Donations by bank", + "onlineDonations": "Online donations", + "noDonations": "No donations have been made.", + "historyDonations": "Donations history", "monthly": "Monthly", "oneTime": "One time", "fromDate": "From", "toDate": "To", "date": "Date", "type": "Type", + "sort": "Sort", "cause": "Cause", "amount": "Amount", "cancelDonation": "Cancel donation", "cancel": "Cancel", "certificate": "Certificate", "download": "Download", + "bank": "Bank", + "card": "Card", "lv": "lv", "status": { "header": "Status", "initial": "initial", "waiting": "waiting", "succeeded": "succeeded", + "refund": "refunded", "cancelled": "cancelled", "guaranteed": "guaranteed" } @@ -68,9 +76,9 @@ "title-unsubscribe": "Unsubscribe for receiving notifications from Podkrepi.bg", "campaign-title-unsubscribe": "Unsubscribe from receiving notifications from this campaign", "cta": "Confirm", - "subscribe-msg": "You've successfully subscribed for receiving notifications", - "unsubscribe-msg": "You've successfully unsubscribed for receiving notifications", - "campaign-unsubscribe-msg": "You've successfully unsubscribed from receiving notifications regarding this campaign" + "subscribe-msg": "You've successfully subscribed for receiving notifications.", + "unsubscribe-msg": "You've successfully unsubscribed for receiving notifications.", + "campaign-unsubscribe-msg": "You've successfully unsubscribed from receiving notifications regarding this campaign." }, "status": { "active": "Active", @@ -117,6 +125,7 @@ "disabled": "Your account has been deleted." }, "affiliate": { + "summary": "By joining the partner program of Podkrepi.bg, you get access to our Corporate Donations service, through which your employees or customers can donate with donations \"guaranteed\" by your company.", "index": "Affiliate program", "join": "Join the program", "data-summary": "Affiliate program summary", diff --git a/public/locales/en/recurring-donation.json b/public/locales/en/recurring-donation.json index 2155f18be..8328d369a 100644 --- a/public/locales/en/recurring-donation.json +++ b/public/locales/en/recurring-donation.json @@ -22,6 +22,7 @@ "edit": "Recurring donation edited successfully", "delete": "Recurring donation deleted successfully", "cancel": "Recurring donation cancelled successfully", + "cancel-confirm": "Are you sure you want to cancel the donation?", "error": "Error while processing your request. Please try again later." }, "statuses": { diff --git a/public/locales/en/support.json b/public/locales/en/support.json index 079d12b3f..b3eaaeaad 100644 --- a/public/locales/en/support.json +++ b/public/locales/en/support.json @@ -7,24 +7,19 @@ "first-subtitle": "Join the organization as:", "fields": { "benefactor": { - "title": "Benefactor", - "description": "Benefactor..." + "title": "Benefactor" }, "partner": { - "title": "Partner", - "description": "Partner..." + "title": "Partner" }, "volunteer": { - "title": "Volunteer", - "description": "Volunteer..." + "title": "Volunteer" }, "associationMember": { - "title": "Association member", - "description": "Association member..." + "title": "Association member" }, "company": { - "title": "Company", - "description": "Company..." + "title": "Company" } } }, @@ -45,7 +40,6 @@ }, "volunteer": { "title": "Volunteer", - "label": "Please choose area", "marketing": "Marketing", "backend": "Backend", "frontend": "Frontend", @@ -91,7 +85,8 @@ }, "thank-you": { "title": "Thank you", - "content": "Thanks for joining the supporters!" + "content": "Thanks for joining the supporters!", + "await-instructions": "Expect to be contacted by a Podkrepi.bg representative at the specified email address." } }, "cta": { diff --git a/public/locales/en/transfer.json b/public/locales/en/transfer.json index 2b27291cf..ce138ca50 100644 --- a/public/locales/en/transfer.json +++ b/public/locales/en/transfer.json @@ -35,7 +35,8 @@ "delete": "Delete", "edit": "Edit", "details": "Details", - "submit": "Submit" + "submit": "Submit", + "close": "Close" }, "fields": { "approvedById": "Approved by", diff --git a/public/locales/en/validation.json b/public/locales/en/validation.json index 4e1a9592e..bd0126637 100644 --- a/public/locales/en/validation.json +++ b/public/locales/en/validation.json @@ -9,17 +9,18 @@ "password-match": "Password doesn't match", "field-too-short": "Field should be at least {{min}} symbols", "field-too-long": "Field should be maximum {{max}} symbols", - "one-of": "Invalid value", "select-role": "At least one checkbox should be checked", "terms-of-use": "Please accept the Terms and Conditions", "terms-of-service": "Please accept the GDPR policy", - "agree-terms": "Agree to the Terms and Conditions", "agree-with": "I agree to the", - "informed-agree-with": "I understand and I agree to the", "agree-with-newsletter": "I agree to receive news", "agree-with-newsletter-campaign": "I agree to receive news about this campaign and news by Podkrepi.bg *", + "informed-agree-with": "I understand and I agree to the", "terms-and-conditions": "Terms and Conditions", "gdpr": "General Data Protection Regulation (GDPR)", "legal-entity": "Legal entity", + "newsletter": "Please give your consent", + "unique-field-violation": "The field `{1}` with this value already exists in the platform.", + "payment-reference": "Invalid payment code format", "eik-invalid": "Invalid EIK" } diff --git a/public/locales/en/withdrawals.json b/public/locales/en/withdrawals.json index 679020954..6014103ac 100644 --- a/public/locales/en/withdrawals.json +++ b/public/locales/en/withdrawals.json @@ -12,8 +12,13 @@ "amount": "Amount", "reason": "Reason", "status": "Status", + "targetDate": "Target date", "createdAt": "Created at", "updatedAt": "Updated at", + "approvedBy": "Approved by", + "bankAccount": "Bank account", + "sourceCampaign": "Campaign", + "sourceVault": "Sub account", "campaignId": "Campaign ID", "deleteTitle": "Are you sure?", "deleteContent": "This action will delete this item permanently!", From 04c5d2d5dc7f2224cebc53c54dc41bfa82c2acbe Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Sat, 20 Jan 2024 22:00:11 +0200 Subject: [PATCH 4/4] 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 --- .../client/campaign-news/CampaignNewsList.tsx | 33 ++++---- .../client/campaigns/CampaignDetails.tsx | 4 +- .../client/campaigns/CampaignNewsSection.tsx | 32 ++++---- src/components/common/Gallery.tsx | 76 +++++++++++++++++ ...ampaignImageSlider.tsx => ImageSlider.tsx} | 82 +++++++++++-------- .../common/withFullScreenSlider.tsx | 49 ----------- 6 files changed, 160 insertions(+), 116 deletions(-) create mode 100644 src/components/common/Gallery.tsx rename src/components/common/{CampaignImageSlider.tsx => ImageSlider.tsx} (75%) delete mode 100644 src/components/common/withFullScreenSlider.tsx diff --git a/src/components/client/campaign-news/CampaignNewsList.tsx b/src/components/client/campaign-news/CampaignNewsList.tsx index 3ed1f36cd..3d2a5277d 100644 --- a/src/components/client/campaign-news/CampaignNewsList.tsx +++ b/src/components/client/campaign-news/CampaignNewsList.tsx @@ -17,7 +17,7 @@ import { QuillStypeWrapper } from 'components/common/QuillStyleWrapper' import { scrollToTop } from './utils/scrollToTop' import { getArticleHeight } from './utils/getArticleHeight' -import withFullScreenSlider from 'components/common/withFullScreenSlider' +import Gallery from 'components/common/Gallery' const PREFIX = 'CampaignNewsSection' const classes = { @@ -83,7 +83,6 @@ export default function CampaignNewsList({ articles }: Props) { const { t, i18n } = useTranslation('news') const INITIAL_HEIGHT_LIMIT = 400 const [isExpanded, expandContent] = useShowMoreContent() - const WithFullScreenSlider = withFullScreenSlider(Image) return ( <> {articles?.map((article, index: number) => { @@ -158,21 +157,21 @@ export default function CampaignNewsList({ articles }: Props) { {article.newsFiles.length > 0 && ( <> - {images.map((file, index) => { - return ( - - - - ) - })} + + {images.map((file) => { + return ( + + {file.fileName} + + ) + })} + )} diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index 6cf7451e6..b6a48bce6 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -12,7 +12,7 @@ import SecurityIcon from '@mui/icons-material/Security' import { styled } from '@mui/material/styles' import DonationWishes from './DonationWishes' -import CampaignImageSlider from 'components/common/CampaignImageSlider' +import { ImageSlider } from 'components/common/ImageSlider' import CampaignInfo from './CampaignInfo/CampaignInfo' import CampaignInfoGraphics from './CampaignInfoGraphics' import CampaignInfoOperator from './CampaignInfoOperator' @@ -158,7 +158,7 @@ export default function CampaignDetails({ campaign }: Props) { - + diff --git a/src/components/client/campaigns/CampaignNewsSection.tsx b/src/components/client/campaigns/CampaignNewsSection.tsx index 43c1c2976..fa4a19709 100644 --- a/src/components/client/campaigns/CampaignNewsSection.tsx +++ b/src/components/client/campaigns/CampaignNewsSection.tsx @@ -28,7 +28,7 @@ import { sanitizeHTML } from 'common/util/htmlUtils' import { QuillStypeWrapper } from 'components/common/QuillStyleWrapper' import { scrollToTop } from '../campaign-news/utils/scrollToTop' import { getArticleHeight } from '../campaign-news/utils/getArticleHeight' -import withFullScreenSlider from 'components/common/withFullScreenSlider' +import Gallery from 'components/common/Gallery' const PREFIX = 'NewsTimeline' @@ -161,7 +161,6 @@ type Props = { export default function CampaignNewsSection({ campaign, canCreateArticle }: Props) { const { t, i18n } = useTranslation('news') const { small }: { small: boolean } = useMobile() - const WithFullScreenSlider = withFullScreenSlider(Image) const INITIAL_HEIGHT_LIMIT = 200 const [isExpanded, expandContent] = useShowMoreContent() @@ -299,20 +298,21 @@ export default function CampaignNewsSection({ campaign, canCreateArticle }: Prop ))} - {images.map((file, index) => { - return ( - - - - ) - })} + + {images.map((file) => { + return ( + + {file.fileName} + + ) + })} + )} diff --git a/src/components/common/Gallery.tsx b/src/components/common/Gallery.tsx new file mode 100644 index 000000000..0a479f408 --- /dev/null +++ b/src/components/common/Gallery.tsx @@ -0,0 +1,76 @@ +import React, { useMemo, useRef, useState } from 'react' +import { FullScreenImageSlider } from './ImageSlider' +import { ImageSlider } from 'components/common/campaign-file/roles' + +type ChildComponentProps = { + children: JSX.Element[] | JSX.Element + images: ImageSlider[] +} + +/** + * Gallery component which allows images to expand whenever clicked. + * @param {React.JSX.Element | React.JSX.Element[]} children Single React Element , or array of React Elements. + * @param {ImageSlider[]} images List of images to show when gallery is expanded + * @returns + */ +export default function Gallery({ children, images }: ChildComponentProps) { + const initialImage = useRef(0) + const [toggleFullScreeSlider, setToggleFullScreenSlider] = useState(false) + + const onOpenFullScreenSlider = (index: number) => { + setToggleFullScreenSlider(true) + initialImage.current = index + } + + const onCloseFullScreenSlider = () => { + setToggleFullScreenSlider(false) + initialImage.current = 0 + } + + const NestedChild = useMemo(() => { + const childrenCount = React.Children.count(children) + + //if childrenCount > 1, assume list of thumbnail images are shown + if (childrenCount > 1) { + return React.Children.map(children, (child, index) => { + return React.cloneElement(child, { + onClick: () => onOpenFullScreenSlider(index), + style: { cursor: 'pointer' }, + }) + }) + } + + //if childrenCount === 1, assume the child is a component such as slider or gallery grid, and the list of images are nested. + return React.Children.map(children, (child) => { + //In some situations the child could be a single JSX.Element containing an image, thus child.props.children is an object rather than array + if (images.length === 1) { + return React.cloneElement(child, { + style: { cursor: 'pointer' }, + onClick: () => onOpenFullScreenSlider(0), + }) + } + + const modifiedNestedChild = child.props.children.map((elem: JSX.Element, index: number) => { + return React.cloneElement(elem, { + onClick: () => onOpenFullScreenSlider(index), + }) + }) + + return React.cloneElement(child, { style: { cursor: 'pointer' } }, modifiedNestedChild) + }) + }, []) + + return ( + <> + {NestedChild} + {toggleFullScreeSlider && ( + + )} + + ) +} diff --git a/src/components/common/CampaignImageSlider.tsx b/src/components/common/ImageSlider.tsx similarity index 75% rename from src/components/common/CampaignImageSlider.tsx rename to src/components/common/ImageSlider.tsx index d4dd9ea1a..d2f94b66f 100644 --- a/src/components/common/CampaignImageSlider.tsx +++ b/src/components/common/ImageSlider.tsx @@ -4,16 +4,19 @@ import 'slick-carousel/slick/slick.css' import 'slick-carousel/slick/slick-theme.css' import Image from 'next/image' import { styled } from '@mui/material/styles' -import { Modal, Typography } from '@mui/material' +import { IconButton, Modal, Typography } from '@mui/material' import { useTranslation } from 'next-i18next' import theme from 'common/theme' import { ImageSlider } from 'components/common/campaign-file/roles' -import withFullScreenSlider from './withFullScreenSlider' +import Gallery from './Gallery' +import FullscreenExitIcon from '@mui/icons-material/FullscreenExit' +const PREFIX = 'ImageSlider' const classes = { - container: 'container', - slider: 'slider', - carouselFullScreen: 'carouselFullScreen', + container: `${PREFIX}-container`, + slider: `${PREFIX}-slider`, + carouselFullScreen: `${PREFIX}-fullScreen`, + minimizeFullScreenBtn: `${PREFIX}-minimizeFullScreenBtn`, } const Root = styled('div')(() => ({ @@ -30,7 +33,7 @@ const Root = styled('div')(() => ({ zIndex: 3, }, '& .slick-next': { - right: theme.spacing(3.5), + right: theme.spacing(4), zIndex: 3, }, '& .slick-next::before, .slick-prev::before': { @@ -49,19 +52,16 @@ const Root = styled('div')(() => ({ }, }, [`& .${classes.carouselFullScreen}`]: { - maxWidth: '100%', - maxHeight: '100%', + width: '100vw', '& .slick-prev': { - left: theme.spacing(1), - zIndex: 3, + left: '5vw', }, '& .slick-slide': { position: 'relative', }, '& .slick-next': { - right: theme.spacing(3.5), - zIndex: 3, + right: '5vw', }, '& .slick-track img': { @@ -70,18 +70,15 @@ const Root = styled('div')(() => ({ }, '& .slick-track': { - aspectRatio: 20, - minHeight: 350, + height: '42vh', [theme.breakpoints.up(600)]: { - aspectRatio: 45, + height: '80vh', }, [theme.breakpoints.up(800)]: { - minHeight: 370, - aspectRatio: 49, + height: '88vh', }, [theme.breakpoints.up(1024)]: { - minHeight: 540, - aspectRatio: 34, + height: '90vh', }, }, @@ -100,6 +97,18 @@ const Root = styled('div')(() => ({ color: theme.palette.primary.main, }, }, + [`& .${classes.minimizeFullScreenBtn}`]: { + position: 'absolute', + color: 'white', + right: 0, + top: 0, + cursor: 'pointer', + zIndex: 9999, + + ['svg']: { + fontSize: 50, + }, + }, })) type Props = { @@ -123,9 +132,8 @@ const settings: Settings = { ], } -export default function CampaignImageSlider({ sliderImages }: Props) { +export function ImageSlider({ sliderImages }: Props) { const { t } = useTranslation() - const WithFullScreenSlider = withFullScreenSlider(Image) if (sliderImages.length === 0) { return null } @@ -150,21 +158,20 @@ export default function CampaignImageSlider({ sliderImages }: Props) { {t('campaigns:campaign.gallery')} - - {sliderImages.map((image, index) => ( -
- + + {sliderImages.map((image, index) => ( + {image.fileName} -
- ))} -
+ ))} + + ) } @@ -195,14 +202,25 @@ export const FullScreenImageSlider = ({ return ( - + + + + {sliderImages.map((image, index) => (
diff --git a/src/components/common/withFullScreenSlider.tsx b/src/components/common/withFullScreenSlider.tsx deleted file mode 100644 index 66b81547b..000000000 --- a/src/components/common/withFullScreenSlider.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import React, { useRef, useState } from 'react' -import { FullScreenImageSlider } from './CampaignImageSlider' -import { ImageProps } from 'next/image' -import { ImageSlider } from 'components/common/campaign-file/roles' - -type ChildComponentProps = ImageProps & { - images: ImageSlider[] - index: number -} - -/** - * HOC which expands an Image whenever user clicks it - * @param WrappedComponent Next's `Image` component - * @param images: An array of returned Images - * @param index: Index of the clicked image - * @returns - */ -export default function withFullScreenSlider(WrappedComponent: React.ComponentType) { - const [toggleFullScreeSlider, setToggleFullScreenSlider] = useState(false) - const initialImage = useRef(0) - - const onOpenFullScreenSlider = (index: number) => { - setToggleFullScreenSlider(true) - initialImage.current = index - } - - const onCloseFullScreenSlider = () => { - setToggleFullScreenSlider(false) - initialImage.current = 0 - } - - return (props: ChildComponentProps) => ( - <> - onOpenFullScreenSlider(props.index)} - style={{ ...props.style, cursor: 'pointer' }} - /> - {toggleFullScreeSlider && props.index === props.images.length - 1 && ( - - )} - - ) -}