Skip to content

Commit 1a5b121

Browse files
authored
feat: add donate button for english donate modal (#992)
1 parent 8da17e1 commit 1a5b121

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/locale/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080

8181
"donation_through_bank_title": "Donation through bank transfer",
8282
"donation_through_bank_reccomendation": "It is recommended to donate a bank transfer to the public knowledge workshop bank account, as this fee is lower",
83+
"donate_to_hasadna": "Donate to Hasadna",
84+
"donation_link": "Donation link",
8385

8486
"bank": "Bank",
8587
"branch": "Branch",

src/locale/he.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979

8080
"donation_through_bank_title": "תרומה דרך העברה בנקאית",
8181
"donation_through_bank_reccomendation": "מומלץ לתרום דרך העברה בנקאית לחשבון הבנק של הסדנא לידע ציבורי, מכיוון שבאפיק זה העמלה נמוכה יותר",
82+
"donate_to_hasadna": "תרומה לסדנא",
83+
"donation_link": "קישור לתרומה",
8284

8385
"bank": "בנק",
8486
"branch": "סניף",

src/pages/DonateModal/DonateModal.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ export const DonateModal: React.FC<DonateModalProps> = ({ isVisible, onClose })
2828
const { t } = useTranslation()
2929
const { direction } = useTheme()
3030

31+
// Use Image with Hebrew text for RTL and English text for LTR
32+
const donateNowImageUrlEN =
33+
'https://www.hasadna.org.il/wp-content/uploads/2018/08/button-300x73.png'
34+
const donateNowImageUrlHE =
35+
'https://www.hasadna.org.il/wp-content/uploads/2018/08/button-EN-300x73.png'
36+
3137
return (
3238
<Modal
3339
dir={direction}
@@ -59,14 +65,14 @@ export const DonateModal: React.FC<DonateModalProps> = ({ isVisible, onClose })
5965
rel="noreferrer">
6066
<img
6167
src="https://www.hasadna.org.il/wp-content/uploads/2017/12/%D7%AA%D7%A8%D7%95%D7%9E%D7%95%D7%AA.jpg"
62-
alt="קישור לתרומה"
68+
alt={t('donation_link')}
6369
width={'90%'}
6470
style={{ maxWidth: '420px' }}
6571
/>
6672
<img
6773
width={'90%'}
68-
src="https://www.hasadna.org.il/wp-content/uploads/2018/08/button-300x73.png"
69-
alt="תרום עכשיו"
74+
src={direction === 'rtl' ? donateNowImageUrlEN : donateNowImageUrlHE}
75+
alt={t('donate_to_hasadna')}
7076
// style={{ margin: shouldImgCollapse ? 'auto' : '', display: 'block' }}
7177
style={{ display: 'block', maxWidth: '300px' }}
7278
/>

0 commit comments

Comments
 (0)