From 23401195351974e9b1f53148eeba25616065c61b Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Sun, 12 Nov 2023 01:47:57 +0530 Subject: [PATCH] Add sections 2,3,4 of evidence page and add data only in English for these sections --- shared/locales/en/website-evidence.json | 568 +++++++++++++++++- shared/src/utils/i18n.ts | 5 +- .../[country]/(website)/evidence/page.tsx | 6 + .../(website)/evidence/section-1.tsx | 2 - .../(website)/evidence/section-2.tsx | 35 ++ .../(website)/evidence/section-3.tsx | 35 ++ .../(website)/evidence/section-4.tsx | 35 ++ .../(website)/evidence/section-card.tsx | 62 ++ .../(website)/evidence/section-paragraph.tsx | 38 ++ 9 files changed, 781 insertions(+), 5 deletions(-) create mode 100644 website/src/app/[lang]/[country]/(website)/evidence/section-2.tsx create mode 100644 website/src/app/[lang]/[country]/(website)/evidence/section-3.tsx create mode 100644 website/src/app/[lang]/[country]/(website)/evidence/section-4.tsx create mode 100644 website/src/app/[lang]/[country]/(website)/evidence/section-card.tsx create mode 100644 website/src/app/[lang]/[country]/(website)/evidence/section-paragraph.tsx diff --git a/shared/locales/en/website-evidence.json b/shared/locales/en/website-evidence.json index 0207ce1f8..134979aa7 100644 --- a/shared/locales/en/website-evidence.json +++ b/shared/locales/en/website-evidence.json @@ -1,7 +1,571 @@ { + "take-action": "Take Action", "section-1": { - "title": "Want to learn how and why Social Income works? You’ve come ", - "red-title": "to the right place", + "title": "Want to learn how and why Social Income works? You’ve come to ", + "red-title": "the right place.", "subtitle": "Here we’ll run through some of the research that shows Social Income’s measurable impact in the real world." + }, + "section-2": { + "topic": "Poverty Reduction", + "title-black": "How does Social Income ", + "title-red": "reduce poverty?", + "evidence": "Evidence shows that direct cash transfer programs like Social Income significantly improve recipients’ financial health in two important ways.", + "cards": { + "card-1": { + "title": "Financial empowerment", + "description": "Direct cash transfers are the fastest and most effective way to reduce recipients’ poverty levels.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "A review of more than 200 studies (", + "text-blue": "Overseas Development Institute 2016", + "link": "https://drive.google.com/file/d/18SN24gxbdUxLnx1m35T5I5NqXWh5Fj7q/view?usp=sharing" + }, + "part-2": { + "text": ") shows that direct cash transfers increase recipients' expenditures (particularly on food) and make it easier for them to pay for healthcare services (see ", + "text-blue": "Kabeer et al 2012", + "link": "https://drive.google.com/file/d/1Q-0qm8j9vePagynE0HDiLT50h8s605i4/view?usp=sharing" + }, + "part-3": { + "text": " for an overview, as well as ", + "text-blue": "Attanasio et al 2006", + "link": "https://drive.google.com/file/d/1Fbszsu2T2mcoMV2GAuHdtavh-il7bqDF/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Gitter and Caldes 2010", + "link": "https://drive.google.com/file/d/1Wcf0QM1NSGyLQSrFQU1H89JpBoWgY0qz/view?usp=sharing" + }, + "part-5": { + "text": ", and ", + "text-blue": "Gertler et al 2012", + "link": "https://drive.google.com/file/d/1UtLpJcX8AJyitZhWW_KFSEuC7sCJhyXs/view?usp=sharing" + }, + "part-6": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "In addition, studies agree that direct cash transfers increase school attendance and raise the savings as well as livestock ownership of recipients (see similar findings in ", + "text-blue": "Hagen-Zanker et al 2011", + "link": "https://drive.google.com/file/d/176YeOEO49o55eQPuPVBFQ-uTRbBtfuiY/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Sodokin 2021, World Bank Group 2016", + "link": "https://drive.google.com/file/d/1uEWLlGNcu0K92FXMAyTg1HFqI4N10AaC/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Haushofer and Shapiro 2016", + "link": "https://drive.google.com/file/d/1Soek9GEAJJ7sLj7TxnKumZwcA_ICAGpJ/view?usp=sharing" + }, + "part-4": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-3": { + "part-1": { + "text": "Finally, direct cash transfers have been particularly effective in moments of unexpected crises (e.g., during the Covid-19 pandemic or when facing climate disasters, see ", + "text-blue": "Pople et al 2021", + "link": "https://drive.google.com/file/d/1xa3wWkn9aZKAAqwxoQeL2HkePyvGsN8Y/view?usp=sharing" + }, + "part-2": { + "text": "). They’ve also been especially impactful in helping young people make their financial futures more secure (see ", + "text-blue": "Owusu-Addo et al 2018", + "link": "https://drive.google.com/file/d/1_uThMOcVf2vYCSvQJRMCVo94wZk-YL1n/view?usp=sharing" + }, + "part-3": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-2": { + "title": "Boost to local markets", + "description": "Direct cash transfers create both direct and indirect beneficiaries by stimulating local markets.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Several studies show that the circulation of recipients’ money benefits local farmers and traders, who (re)invest this additional income in productive assets. Investments by these indirect beneficiaries increase and diversify their levels of production, thereby significantly improving the cost and quality of the goods they supply their communities with (see Several studies show that the circulation of recipients’ money benefits local farmers and traders, who (re)invest this additional income in productive assets. Investments by these indirect beneficiaries increase and diversify their levels of production, thereby significantly improving the cost and quality of the goods they supply their communities with (see ", + "text-blue": "Creti 2010", + "link": "https://drive.google.com/file/d/1-S_tRJZYlXLI-oIi3hdLmsyyuY-N4bja/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Holmes and Bhuvanendra 2013", + "link": "https://drive.google.com/file/d/188-yul_Lg1iUUX6kFhHDLVFL171cnuBQ/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Handa et al 2018", + "link": "https://drive.google.com/file/d/1c_p1BH09NmgKT8SNCRly9Mykbp9ahaXW/view?usp=sharing" + }, + "part-4": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "Direct cash transfers are therefore a more far-ranging and effective anti-poverty tool than simply donating goods, as the money involved stimulates entire communities (see ", + "text-blue": "Soares et al 2010", + "link": "https://drive.google.com/file/d/1KTsAwaWPH0NaiD2SLVQmJZHn2bxeWFHz/view?usp=sharing" + }, + "part-2": { + "text":", ", + "text-blue": "Covarrubias 2012", + "link": "https://drive.google.com/file/d/1OEFeYCgxnbbrFVNFoYYQsSrnmVxZdz9v/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Gertler et al 2012", + "link": "https://drive.google.com/file/d/1UtLpJcX8AJyitZhWW_KFSEuC7sCJhyXs/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Haushofer and Shapiro 2016", + "link": "https://drive.google.com/file/d/1Soek9GEAJJ7sLj7TxnKumZwcA_ICAGpJ/view?usp=sharing" + }, + "part-5": { + "text": ", ", + "text-blue": "Tirivayi et al 2013", + "link": "https://drive.google.com/file/d/1SXVjb7hU7I3JOrE39tE6LZG4uicNB_Ro/view?usp=sharing" + }, + "part-6": { + "text": ", ", + "text-blue": "Daidone et al 2019", + "link": "https://drive.google.com/file/d/1bsI8iyC54V0Yx2nETsRlnPKkO1ntASrv/view?usp=sharing" + }, + "part-7": { + "text": ", ", + "text-blue": "Schwab 2019", + "link": "https://drive.google.com/file/d/19mK5JaO5UsiTUXzHx1Pzkm4jxqSn7_Py/view?usp=sharing" + }, + "part-8": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + } + } + }, + "section-3": { + "topic": "Empowerment", + "title-black": "How does Social Income ", + "title-red": "empower people?", + "evidence": "Studies of direct cash transfer programs like Social Income have measured a range of beneficial effects on recipients’ lives.", + "cards": { + "card-1": { + "title": "Self-determination", + "description": "Direct cash transfers let recipients decide how best to use the money they receive.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Direct cash transfers serve as a foundation for responsible decision-making and increased well-being. Many studies show that the autonomy recipients are given over the money they receive helps build self-confidence and a sense of control over their lives (see ", + "text-blue": "Molyneux et al 2016", + "link": "https://drive.google.com/file/d/1HdrtpZj91cUcQQbzfdaiUKTJzDNk7P1j/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "McGuire et al 2020", + "link": "https://drive.google.com/file/d/1O5Tg0vsc2E_6HbP7a3YW9yKc70f9Twz4/view?usp=sharing" + }, + "part-3": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "This can be both empowering and motivating, giving someone the means to strive for something they had always dreamed of but never thought possible (see ", + "text-blue": "Garcia et al 2016", + "link": "https://drive.google.com/file/d/1iJDEjcqEN-OD0unY7f1Q-JZMgjT6krxz/view?usp=sharing" + }, + "part-2": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-2": { + "title": "Better Education", + "description": "Direct cash transfers help recipients reach higher levels of education and access better employment opportunities.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Many studies, including a recent paper by the World Bank (", + "text-blue": "Behrman et al 2019", + "link": "https://drive.google.com/file/d/1q5NUyaSbti33yjoz4fivNopJ8q3yJqxd/view?usp=sharing" + }, + "part-2": { + "text": "), have demonstrated that recipients of direct cash transfers are more likely to attend better schools and achieve better results than those who don’t receive such benefits (see ", + "text-blue": "Schultz 2001", + "link": "https://drive.google.com/file/d/1uOHu9JOPz6ffVB6EIAuXKBHQKd1-eO2V/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Attanasio et al 2006", + "link": "https://drive.google.com/file/d/1Fbszsu2T2mcoMV2GAuHdtavh-il7bqDF/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Covarrubias 2012", + "link": "https://drive.google.com/file/d/1OEFeYCgxnbbrFVNFoYYQsSrnmVxZdz9v/view?usp=sharing" + }, + "part-5": { + "text": ", ", + "text-blue": "Garcia et al 2016", + "link": "https://drive.google.com/file/d/1iJDEjcqEN-OD0unY7f1Q-JZMgjT6krxz/view?usp=sharing" + }, + "part-6": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "Furthermore, better education and greater financial security allow recipients to more easily refuse exploitative labor practices. Finally, doing work that they enjoy increases recipients’ motivation and success (see ", + "text-blue": "Sutrisno and Sunarsi 2019", + "link": "https://drive.google.com/file/d/1b_IV9XvT12jNAP2QhLm0H-95HcrnScBY/view?usp=sharing" + }, + "part-2": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-3": { + "title": "Protection against unforeseen shocks", + "description": "Direct cash transfers allow recipients to better deal with unforeseen shocks like extreme climatic events or public health crises.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Studies carried out by the World Bank have shown that direct cash transfers foster people's resilience to the adverse effects of external shocks by lowering income risks and facilitating savings. Direct cash transfers also contribute to helping children stay in class in times of crisis, which often lead to a drop in attendance (see ", + "text-blue": "Finan et al 2004", + "link": "https://drive.google.com/file/d/1qlAzeM-R_xH4zT92HxT1M0eq3O8MShDt/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Premand and Stoeffler 2020", + "link": "https://drive.google.com/file/d/1_wjxwljgd65Y-ptxahaWxcsdJwC5SBHH/view?usp=sharing" + }, + "part-3": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "During the recent Covid-19 pandemic, researchers also found that direct cash transfers both reduced poverty as well as enabled unemployed recipients to look for work. Those who received payments could be more active and engaged in society, which ultimately aids labor market recovery (see ", + "text-blue": "Köhler and Bhorat 2021", + "link": "https://drive.google.com/file/d/1qwtorYiGsHG3n4i6cxFIbU8H4DHNmUAR/view?usp=sharing" + }, + "part-2": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-3": { + "part-1": { + "text": "In addition, a recent study suggests that direct cash transfers may even reduce deforestation because recipients do not have any need to insure themselves by earning money through forest clearing work (", + "text-blue": "Ferraro and Simorangkir 2020", + "link": "https://drive.google.com/file/d/1PTjFxP39mtjSutkup-wXBL_JGUbqVmq_/view?usp=sharing" + }, + "part-2": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-4": { + "title" : "Empowerment of women", + "description": "By enabling them to make freer decisions, direct cash transfers help women become more resilient, self-reliant, and involved in society.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Evidence suggests that especially from a long-term perspective, direct cash transfers help women make freer decisions in contexts where social or familial structures would otherwise limit their financial independence (see ", + "text-blue": "Plagerson and Ulriksen 2015", + "link": "https://drive.google.com/file/d/1IgycTY0sID-jxZ7Sw3-UYqQZa3ORzvuW/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Iqbal et al 2021", + "link": "https://drive.google.com/file/d/1-7WWiwGYDXRYddq3B2IGSnTvkCnmxzje/view?usp=sharing" + }, + "part-3": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "A large body of research further suggests that cash transfer programs help decrease physical and emotional violence against women in domestic partnerships (see ", + "text-blue": "Perova and Vakis 2013", + "link": "https://drive.google.com/file/d/1fEM834PcOLC5qvOLvw1-mnhKgWHA4wPX/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Buller et al 2018", + "link": "https://drive.google.com/file/d/14Ga66Oj-8L7JFxAANlptZJCkzu1uOs4Y/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Haushofer et al 2019", + "link": "https://drive.google.com/file/d/1J3Np833YeKa0GyQQLXAWR8WP3RZt6YQv/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Heath et al 2020", + "link": "https://drive.google.com/file/d/1y-KSIJZaDpLGYcIAVmxWOxeqdDMa6y02/view?usp=sharing" + }, + "part-5": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-5": { + "title": "Empowerment of children", + "description": "Direct cash transfers empower children by reducing child labor and increasing the inter-generational income.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Evidence shows that cash transfers have a positive effect on families, too. They increase the chances of recipients’ children staying healthy (especially girls), receiving an education, and enjoying a safer transition into adulthood, which, as several studies have demonstrated, leads to a higher income as an adult (", + "text-blue": "Save the children report 2009", + "link": "https://drive.google.com/file/d/1dpDPU_O2gCfssbJ3pmIItu3TnT908Tn-/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Covarrubias 2012", + "link": "https://drive.google.com/file/d/1OEFeYCgxnbbrFVNFoYYQsSrnmVxZdz9v/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Akresh et al 2016", + "link": "https://drive.google.com/file/d/1Iwkads4Sr3-MiBi3_hzHnF1BYaxYDr8J/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Boo and Creamer 2019", + "link": "https://drive.google.com/file/d/1lzLamggvPgL_7xF2EIlxm7qShAFdVFJU/view?usp=sharing" + }, + "part-5": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-6": { + "title": "Reduction of crime", + "description": "Direct cash transfers reduce the risk of turning to crime as a way to acquire essential goods.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Research on the Bolsa Familia program in Brazil, for example, found that an expansion of cash transfers to young people caused a 6.5% reduction in crime in neighborhoods with schools, increasing attendance and allowing young people to worry less about paying for essential goods. In the long run, this also contributed to helping recipients live their lives more freely and with less fear (see ", + "text-blue": "Chioda et al 2016", + "link": "https://drive.google.com/file/d/1zrmIYftuzNZe-Lx-0OFs7IEn2E_0R0Jq/view?usp=sharing" + }, + "part-2": { + "text": ", see also ", + "text-blue": "Machado et al 2018", + "link": "https://drive.google.com/file/d/15Jz2IAb5_8EL45Q24SlsqQaOXuzYonfD/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Breckin 2019", + "link": "https://drive.google.com/file/d/1-ESV8byS_qgd2ye4ZeZsAq7svnb0_RF-/view?usp=sharing" + }, + "part-4": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-7": { + "title": "Fostering of creativity and innovation", + "description": "Direct cash transfers stimulate the arts and culture by allowing artists and young entrepreneurs to worry less about basic needs.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Direct cash transfers enable entrepreneurs and artists to dedicate themselves to their craft without having to worry about food or basic necessities. In fact, the very first recipients of Social Income were a small cohort of artists in Freetown, Sierra Leone. The group reported that Social Income helped them above all to be more creative in their art practice (see ", + "text-blue": "Thomas 2016", + "link": "https://drive.google.com/file/d/1tJOjneX3fZau_ZYm3DnCtaIGy9V6L1m2/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Teer 2020", + "link": "https://books.google.com/books/about/COMING_AGE_OF_IMAGINATION.html?id=33-5wgEACAAJ&redir_esc=y" + }, + "part-3": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + } + } + }, + "section-4": { + "topic": "Well-being", + "title-black": "How does Social Income contribute to ", + "title-red": "greater well-being?", + "evidence": "Research shows that direct cash transfers programs like Social Income contribute to recipients’ well-being in three important ways.", + "cards": { + "card-1": { + "title": "Improvement and protection of health", + "description": "Direct cash transfers allow recipients to buy medicine and hygiene products that they otherwise couldn’t afford.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "One study has shown that a direct cash transfer program led to significantly better health for participants in the short term (18 months) and even more so in the long term (7 to 10 years) (see ", + "text-blue": "Banerjee et at 2021", + "link": "https://drive.google.com/file/d/1cmOQi1z3DlQaEmvFEBfIHmXgMN4if3Tx/view?usp=sharing" + }, + "part-2": { + "text": "). Another study (", + "text-blue": "Baird et al 2016", + "link": "https://drive.google.com/file/d/1d8f-DixZ1YOE7nsbFtlBG7dETXFbnUAd/view?usp=sharing" + }, + "part-3": { + "text": ") further showed that cash transfer programs reduced HIV prevalence and the rate of teen pregnancy (see also ", + "text-blue": "Nery et al 2017", + "link": "https://drive.google.com/file/d/1wjoTvq_XHoMg5q1gelpCufm9qWBWrKUx/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Okeke and Abubakar 2020", + "link": "https://drive.google.com/file/d/1QYAF2ocBzQKjewye69WYy2MDLN80ClWW/view?usp=sharing" + }, + "part-5": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-2": { + "title": "Emotional well-being", + "description": "Direct cash transfers can break the vicious circle of poverty-induced mental health problems.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Many studies have shown that poverty leads to stress, which over time can cause severe mental illness (see ", + "text-blue": "Hammen 2005", + "link": "https://drive.google.com/file/d/1-CIQdKuc96fO9rIjU-pPYhjdTxssuHEi/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Haushofer and Fehr 2014", + "link": "https://drive.google.com/file/d/1eVKh2KA_xqAckBaYMg6Rp9ws9OeiEWo4/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Haushofer and Shapiro 2016", + "link": "https://drive.google.com/file/d/11NkzvnwyGKi3EEJRx3pGHoOwsEftmXUJ/view?usp=sharing" + }, + "part-4": { + "text": "). In parallel, poor mental health may affect labor market participation and productivity, and thus exacerbate someone's experienced level of poverty (", + "text-blue": "Biasi et al 2019", + "link": "https://drive.google.com/file/d/1fcYgy2H66VNpIRpqPPKynB5aIpDKgyEX/view?usp=sharing" + }, + "part-5": { + "text": ").", + "text-blue": "", + "link": "" + } + }, + "paragraph-2": { + "part-1": { + "text": "Researchers at Princeton University provide evidence that direct cash transfers can break this vicious circle: they help alleviate the stress and depression that often come with living in poverty (", + "text-blue": "Haushofer et al 2020", + "link": "https://drive.google.com/file/d/1efsdQk4tY4_g7bbpVZcMvEbwIDOv7IjP/view?usp=sharing" + }, + "part-2": { + "text": ", see also ", + "text-blue": "Samuels and Stavropoulou 2016", + "link": "https://drive.google.com/file/d/1ImB0ADXWXKyR31B-AYOMiCyKRCU1Bht1/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Kilburn et al 2016", + "link": "https://drive.google.com/file/d/1mtUBaD6vMC4_n5pR-ygwZHI3N1B52eg8/view?usp=sharing" + }, + "part-4": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + }, + "card-3": { + "title": "Food Security", + "description": "Direct cash transfers significantly improve recipients’ diets and nutrition.", + "paragraphs": { + "paragraph-1": { + "part-1": { + "text": "Many studies have found that direct cash transfers have two important effects on recipients’ food security. First, it increases access to better quality food. Second, it indirectly helps improve people's knowledge about a healthy diet, cooking methods, and the safe handling of food. These two aspects combined improve recipients’ diets and nutrition in a significant way (see ", + "text-blue": "Gitter and Caldes 2010", + "link": "https://drive.google.com/file/d/1Wcf0QM1NSGyLQSrFQU1H89JpBoWgY0qz/view?usp=sharing" + }, + "part-2": { + "text": ", ", + "text-blue": "Miller et al 2011", + "link": "https://drive.google.com/file/d/1QPRopxSVxciuC3waoExX5rzEzv5ArTkx/view?usp=sharing" + }, + "part-3": { + "text": ", ", + "text-blue": "Burchi et al 2018", + "link": "https://drive.google.com/file/d/1P-7ajyyh-7p5l5QtrP6R0jC2nOfQxkWR/view?usp=sharing" + }, + "part-4": { + "text": ", ", + "text-blue": "Hidrobo et al 2018", + "link": "https://drive.google.com/file/d/1ckppauMz4yPe_XF_NMW-qOo2Cv77MNGp/view?usp=sharing" + }, + "part-5": { + "text": ", ", + "text-blue": "Haushofer et al 2020", + "link": "https://drive.google.com/file/d/1efsdQk4tY4_g7bbpVZcMvEbwIDOv7IjP/view?usp=sharing" + }, + "part-6": { + "text": ").", + "text-blue": "", + "link": "" + } + } + } + } + } } } diff --git a/shared/src/utils/i18n.ts b/shared/src/utils/i18n.ts index 54a626068..977b538bc 100644 --- a/shared/src/utils/i18n.ts +++ b/shared/src/utils/i18n.ts @@ -8,6 +8,7 @@ interface TranslateProps { namespace?: string; language?: string; context?: object; + returnObjects?: boolean; } interface TranslatorProps { @@ -15,7 +16,7 @@ interface TranslatorProps { namespaces: string[] | string; } -export type TranslateFunction = (key: string, translateProps?: TranslateProps) => string; +export type TranslateFunction = (key: string, translateProps?: TranslateProps) => any; export class Translator { language: LanguageCode; @@ -40,6 +41,7 @@ export class Translator { lng: language, ns: namespaces, fallbackLng: FALLBACK_LANGUAGE, + returnObjects: false, interpolation: { escapeValue: false, }, @@ -51,6 +53,7 @@ export class Translator { return this.instance.t(key, { ns: translateProps?.namespace || this.namespaces, lng: translateProps?.language || this.language, + returnObjects: translateProps?.returnObjects || false, ...translateProps?.context, }); }; diff --git a/website/src/app/[lang]/[country]/(website)/evidence/page.tsx b/website/src/app/[lang]/[country]/(website)/evidence/page.tsx index 656f189ca..f60a66d25 100644 --- a/website/src/app/[lang]/[country]/(website)/evidence/page.tsx +++ b/website/src/app/[lang]/[country]/(website)/evidence/page.tsx @@ -1,10 +1,16 @@ import { DefaultPageProps } from '@/app/[lang]/[country]'; import Section1 from './section-1'; +import Section2 from './section-2'; +import Section3 from './section-3'; +import Section4 from './section-4'; export default async function Page(props: DefaultPageProps) { return ( <> + + + ); } diff --git a/website/src/app/[lang]/[country]/(website)/evidence/section-1.tsx b/website/src/app/[lang]/[country]/(website)/evidence/section-1.tsx index d653abd41..f829a87c7 100644 --- a/website/src/app/[lang]/[country]/(website)/evidence/section-1.tsx +++ b/website/src/app/[lang]/[country]/(website)/evidence/section-1.tsx @@ -1,8 +1,6 @@ import { DefaultPageProps } from '@/app/[lang]/[country]'; -import { ClockIcon } from '@heroicons/react/24/solid'; import { Translator } from '@socialincome/shared/src/utils/i18n'; import { BaseContainer, Typography } from '@socialincome/ui'; -import Link from 'next/link'; export default async function Section1({ params }: DefaultPageProps) { const translator = await Translator.getInstance({ diff --git a/website/src/app/[lang]/[country]/(website)/evidence/section-2.tsx b/website/src/app/[lang]/[country]/(website)/evidence/section-2.tsx new file mode 100644 index 000000000..9c7aea7c2 --- /dev/null +++ b/website/src/app/[lang]/[country]/(website)/evidence/section-2.tsx @@ -0,0 +1,35 @@ +import { DefaultPageProps } from '@/app/[lang]/[country]'; +import { Translator } from '@socialincome/shared/src/utils/i18n'; +import { BaseContainer,Typography } from '@socialincome/ui'; +import { SectionCard } from './section-card'; + +export default async function Section2({ params }: DefaultPageProps) { + const section = 2; + const translator = await Translator.getInstance({ + language: params.lang, + namespaces: ['website-evidence'], + }); + + const c = translator.t(`section-${section}.cards`, {returnObjects: true}); + let cards: Object[] = []; + for(const card in c){cards.push(card);} + let i = 0; + + return ( + + {translator.t(`section-${section}.topic`)} +
+ {translator.t(`section-${section}.title-black`)} + {translator.t(`section-${section}.title-red`)} +
+
+ {translator.t(`section-${section}.evidence`)} +
+ { + cards.map((card, key)=> {i++;return ()}) + } +
+
+
+ ); +} diff --git a/website/src/app/[lang]/[country]/(website)/evidence/section-3.tsx b/website/src/app/[lang]/[country]/(website)/evidence/section-3.tsx new file mode 100644 index 000000000..94067ca83 --- /dev/null +++ b/website/src/app/[lang]/[country]/(website)/evidence/section-3.tsx @@ -0,0 +1,35 @@ +import { DefaultPageProps } from '@/app/[lang]/[country]'; +import { Translator } from '@socialincome/shared/src/utils/i18n'; +import { BaseContainer,Typography } from '@socialincome/ui'; +import { SectionCard } from './section-card'; + +export default async function Section3({ params }: DefaultPageProps) { + const section = 3; + const translator = await Translator.getInstance({ + language: params.lang, + namespaces: ['website-evidence'], + }); + + const c = translator.t(`section-${section}.cards`, {returnObjects: true}); + let cards: Object[] = []; + for(const card in c){cards.push(card);} + let i = 0; + + return ( + + {translator.t(`section-${section}.topic`)} +
+ {translator.t(`section-${section}.title-black`)} + {translator.t(`section-${section}.title-red`)} +
+
+ {translator.t(`section-${section}.evidence`)} +
+ { + cards.map((card, key)=> {i++;return ()}) + } +
+
+
+ ); +} diff --git a/website/src/app/[lang]/[country]/(website)/evidence/section-4.tsx b/website/src/app/[lang]/[country]/(website)/evidence/section-4.tsx new file mode 100644 index 000000000..f862e1b5c --- /dev/null +++ b/website/src/app/[lang]/[country]/(website)/evidence/section-4.tsx @@ -0,0 +1,35 @@ +import { DefaultPageProps } from '@/app/[lang]/[country]'; +import { Translator } from '@socialincome/shared/src/utils/i18n'; +import { BaseContainer,Typography } from '@socialincome/ui'; +import { SectionCard } from './section-card'; + +export default async function Section4({ params }: DefaultPageProps) { + const section = 4; + const translator = await Translator.getInstance({ + language: params.lang, + namespaces: ['website-evidence'], + }); + + const c = translator.t(`section-${section}.cards`, {returnObjects: true}); + let cards: Object[] = []; + for(const card in c){cards.push(card);} + let i = 0; + + return ( + + {translator.t(`section-${section}.topic`)} +
+ {translator.t(`section-${section}.title-black`)} + {translator.t(`section-${section}.title-red`)} +
+
+ {translator.t(`section-${section}.evidence`)} +
+ { + cards.map((card, key)=> {i++;return ()}) + } +
+
+
+ ); +} diff --git a/website/src/app/[lang]/[country]/(website)/evidence/section-card.tsx b/website/src/app/[lang]/[country]/(website)/evidence/section-card.tsx new file mode 100644 index 000000000..f6bf0956b --- /dev/null +++ b/website/src/app/[lang]/[country]/(website)/evidence/section-card.tsx @@ -0,0 +1,62 @@ +import { Translator } from '@socialincome/shared/src/utils/i18n'; +import {Card, CardTitle, Typography, Dialog, DialogTitle, DialogTrigger, DialogContent, DialogHeader, DialogDescription, DialogFooter, Button, } from '@socialincome/ui'; +import Link from 'next/link'; +import { DefaultParams } from '@/app/[lang]/[country]'; +import { SectionParagraph } from './section-paragraph'; + +type SectionCardProps = { + section: number; + cardNumber: number; + params: DefaultParams; +} + + +export async function SectionCard({ section, cardNumber, params}: SectionCardProps){ + + const translator = await Translator.getInstance({ + language: params.lang, + namespaces: ['website-evidence'], + }); + + const p = translator.t(`section-${section}.cards.card-${cardNumber}.paragraphs`, {returnObjects: true}); + let paragraphs: Object[] = []; + for(const paragraph in p){paragraphs.push(paragraph);} + let i = 0; + + + return ( + + + + {translator.t(`section-${section}.cards.card-${cardNumber}.title`)} + {translator.t(`section-${section}.cards.card-${cardNumber}.description`)} + + + + + + {translator.t(`section-${section}.cards.card-${cardNumber}.title`)} + + + + { + paragraphs.map((paragraph, key)=>{ + i++; return( +
+ +
+ ) + }) + } +
+
+ + + + + + +
+
+ ); +} diff --git a/website/src/app/[lang]/[country]/(website)/evidence/section-paragraph.tsx b/website/src/app/[lang]/[country]/(website)/evidence/section-paragraph.tsx new file mode 100644 index 000000000..6d1f19845 --- /dev/null +++ b/website/src/app/[lang]/[country]/(website)/evidence/section-paragraph.tsx @@ -0,0 +1,38 @@ +import { Translator } from "@socialincome/shared/src/utils/i18n"; +import { DefaultParams } from "../.."; +import { Typography } from "@socialincome/ui"; +import Link from "next/link"; + +type SectionParagraphProps = { + section: number; + cardNumber: number; + paragraphNumber: number; + params: DefaultParams +} + +export async function SectionParagraph({section, cardNumber, paragraphNumber, params}: SectionParagraphProps){ + const translator = await Translator.getInstance({ + language: params.lang, + namespaces: ['website-evidence'], + }); + const pt = translator.t(`section-${section}.cards.card-${cardNumber}.paragraphs.paragraph-${paragraphNumber}`, {returnObjects: true}); + let parts: Object[] = []; + for(const part in pt){parts.push(part);} + let i = 0; + return( +
+ { + parts.map((part, key)=> { + i++; + return ( + + {translator.t(`section-${section}.cards.card-${cardNumber}.paragraphs.paragraph-${paragraphNumber}.part-${i}.text`)} + + {translator.t(`section-${section}.cards.card-${cardNumber}.paragraphs.paragraph-${paragraphNumber}.part-${i}.text-blue`) } + + + );} + )} +
+ ) +} \ No newline at end of file