Skip to content

Commit

Permalink
Website: Fetch recipient details on partners page and transparency/fi…
Browse files Browse the repository at this point in the history
…nance page from firestore (#1020)

* Fetch recipient details on partners page and transparency page from firestore

* Prettified Code!

* Solve rounding issue in the countries section of finance page

* Remove firestore-id from shared/locales

* Add test cases for RecipientStatsCalculator

* Resolve Gavril's comments

* Resolve Rabbit's comments

* Enrich test cases

---------

Co-authored-by: DarkMenacer <[email protected]>
Co-authored-by: Michael Kündig <[email protected]>
Co-authored-by: Michael Kündig <[email protected]>
  • Loading branch information
4 people authored Feb 12, 2025
1 parent 37a90a2 commit 47c133d
Show file tree
Hide file tree
Showing 15 changed files with 377 additions and 208 deletions.
3 changes: 2 additions & 1 deletion shared/locales/de/website-finances.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"since-march-2020": "Seit März 2020",
"totalContributions": "{{ contributorCount }} Spender:innen spendeten insgesamt {{value, currency}}",
"totalPayments": "{{ value }} Auszahlungen direkt aufs Mobiltelefon",
"totalRecipients": "{{ value }} Empfänger:innen wurden aufgenommen in unserem 3-Jahresprogramm"
"totalRecipients": "{{ value }} Empfänger:innen durch ein 3-Jahresprogramm unterstützt",
"activeRecipients": "{{ value }} Aktive Empfänger:innen"
},
"section-2": {
"title": "Wie wird Social Income finanziert?",
Expand Down
44 changes: 6 additions & 38 deletions shared/locales/de/website-partners.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@
"fundraiser": "Spendenaktion",
"permalink": "Permalink"
},
"ngos": [
"aurora-foundation",
"jamil-&-nyanga-jaward-foundation",
"reachout-salone",
"equal-rights-alliance",
"united-polio-brothers-and-sisters",
"sierra-leone-association-of-ebola-survivors"
],
"aurora-foundation": {
"aurora": {
"org-slug": "aurora-foundation",
"org-short-name": "Aurora Stiftung",
"org-long-name": "Aurora Stiftung",
Expand All @@ -51,10 +43,6 @@
"org-category": "International NGO",
"org-focus-sdg-numbers": [1, 8],
"partnership-start": "2020",
"recipients-total": "42",
"recipients-active": "20",
"recipients-former": "22",
"recipients-suspended": "0",
"org-mission": "Die NGO fördert Kreativität und hilft Menschen, ihr Leben und ihre Gemeinschaften durch Entwicklungs- und Kulturprojekte zu verbessern.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -98,7 +86,7 @@
"org-instagram": "https://www.instagram.com/aurorafoundation_official/?hl=en",
"org-facebook": "https://www.facebook.com/aurorafoundationofficial/"
},
"jamil-&-nyanga-jaward-foundation": {
"jamil": {
"org-slug": "jamil-&-nyanga-jaward-foundation",
"org-short-name": "JNJF",
"org-long-name": "Jamil & Nyanga Jaward Stiftung",
Expand All @@ -109,10 +97,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [1, 5],
"partnership-start": "2021",
"recipients-total": "35",
"recipients-active": "28",
"recipients-former": "7",
"recipients-suspended": "0",
"org-mission": "Die NGO bietet bedürftigen Witwen und Kindern Bildung, Unterstützung und Möglichkeiten, um bessere Zukunftsperspektiven aufzubauen.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -145,7 +129,7 @@
"org-facebook": "https://www.facebook.com/JNJFoundation",
"org-linkedin": "https://www.linkedin.com/company/the-jamil-nyanga-jaward-foundation/"
},
"reachout-salone": {
"reachout": {
"org-slug": "reachout-salone",
"org-short-name": "Reachout Salone",
"org-long-name": "Reachout Salone",
Expand All @@ -156,10 +140,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [1, 5],
"partnership-start": "2021",
"recipients-total": "36",
"recipients-active": "12",
"recipients-former": "24",
"recipients-suspended": "0",
"org-mission": "Die NGO stärkt Communities und bietet jungen Menschen die Unterstützung und Chancen, die sie brauchen, um den Kreislauf der Armut zu durchbrechen und eine bessere Zukunft aufzubauen.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -195,7 +175,7 @@
"org-facebook": "https://www.facebook.com/profile.php?id=100070050743284&sk=about_details",
"org-youtube": "https://www.youtube.com/@reachoutsalone8395"
},
"equal-rights-alliance": {
"equal-rights": {
"org-slug": "equal-rights-alliance",
"org-short-name": "Equal Rights Alliance",
"org-long-name": "Equal Rights Alliance",
Expand All @@ -206,10 +186,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [3, 10],
"partnership-start": "2022",
"recipients-total": "13",
"recipients-active": "13",
"recipients-former": "0",
"recipients-suspended": "0",
"org-mission": "Die NGO fördert Menschenrechte, indem sie das Bewusstsein und Verständnis für Gleichberechtigung, Inklusion und soziale Gerechtigkeit in den Gemeinschaften stärkt.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -239,7 +215,7 @@
"org-photo": "",
"org-facebook": "https://www.facebook.com/groups/693921621002955/"
},
"united-polio-brothers-and-sisters": {
"united-polio": {
"org-slug": "united-polio-brothers-and-sisters",
"org-short-name": "United Polio Brothers and Sisters",
"org-long-name": "United Polio Brothers and Sisters",
Expand All @@ -250,10 +226,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [1, 8],
"partnership-start": "2022",
"recipients-total": "10",
"recipients-active": "10",
"recipients-former": "0",
"recipients-suspended": "0",
"org-mission": "Die NGO unterstützt Menschen mit Behinderungen und Schutzbedürftige, indem sie Wohnraum, Schulungen und Ressourcen bereitstellt, um ihr Leben zu verbessern und ihre Würde zu wahren.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -282,7 +254,7 @@
"org-quote-author": "Paul Osman Kabia",
"org-photo": ""
},
"sierra-leone-association-of-ebola-survivors": {
"slaes": {
"org-slug": "sierra-leone-association-of-ebola-survivors",
"org-short-name": "SLAES",
"org-long-name": "Sierra Leone Association of Ebola Survivors",
Expand All @@ -293,10 +265,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [4, 5],
"partnership-start": "2024",
"recipients-total": "20",
"recipients-active": "17",
"recipients-former": "2",
"recipients-suspended": "1",
"org-mission": "Die gemeinschaftlich geführte NGO unterstützt Menschen, die das Ebola-Virus überlebt haben, mit einem besonderen Fokus auf die Betroffenen des verheerenden Ausbruchs von 2014 in Sierra Leone.",
"org-description-paragraphs": [
[
Expand Down
3 changes: 2 additions & 1 deletion shared/locales/en/website-finances.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"since-march-2020": "Since March 2020",
"totalContributions": "{{ contributorCount }} contributors donated a total of {{ value, currency }}",
"totalPayments": "{{ value }} mobile money payments made",
"totalRecipients": "{{ value }} recipients enrolled for a 3-year program"
"totalRecipients": "{{ value }} recipients empowered by a 3-year program",
"activeRecipients": "{{ value }} Active Recipients"
},
"section-2": {
"title": "How is Social Income funded?",
Expand Down
44 changes: 6 additions & 38 deletions shared/locales/en/website-partners.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@
"fundraiser": "Fundraiser",
"permalink": "Permalink"
},
"ngos": [
"aurora-foundation",
"jamil-&-nyanga-jaward-foundation",
"reachout-salone",
"equal-rights-alliance",
"united-polio-brothers-and-sisters",
"sierra-leone-association-of-ebola-survivors"
],
"aurora-foundation": {
"aurora": {
"org-slug": "aurora-foundation",
"org-short-name": "Aurora Foundation",
"org-long-name": "Aurora Foundation",
Expand All @@ -51,10 +43,6 @@
"org-category": "International NGO",
"org-focus-sdg-numbers": [1, 8],
"partnership-start": "2020",
"recipients-total": "42",
"recipients-active": "20",
"recipients-former": "22",
"recipients-suspended": "0",
"org-mission": "The NGO encourages creativity and helps people improve their lives and communities through development and cultural projects.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -99,7 +87,7 @@
"org-instagram": "https://www.instagram.com/aurorafoundation_official/?hl=en",
"org-facebook": "https://www.facebook.com/aurorafoundationofficial/"
},
"jamil-&-nyanga-jaward-foundation": {
"jamil": {
"org-slug": "jamil-&-nyanga-jaward-foundation",
"org-short-name": "JNJF",
"org-long-name": "Jamil & Nyanga Jaward Foundation",
Expand All @@ -110,10 +98,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [1, 5],
"partnership-start": "2021",
"recipients-total": "35",
"recipients-active": "28",
"recipients-former": "7",
"recipients-suspended": "0",
"org-mission": "The NGO provides widows and children in need with education, support, and opportunities to build better futures.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -146,7 +130,7 @@
"org-facebook": "https://www.facebook.com/JNJFoundation",
"org-linkedin": "https://www.linkedin.com/company/the-jamil-nyanga-jaward-foundation/"
},
"reachout-salone": {
"reachout": {
"org-slug": "reachout-salone",
"org-short-name": "Reachout Salone",
"org-long-name": "Reachout Salone",
Expand All @@ -157,10 +141,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [1, 5],
"partnership-start": "2021",
"recipients-total": "36",
"recipients-active": "12",
"recipients-former": "24",
"recipients-suspended": "0",
"org-mission": "The NGO empowers coastal communities, providing young people with the support and opportunities needed to break the cycle of poverty and build brighter futures.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -191,7 +171,7 @@
"org-facebook": "https://www.facebook.com/profile.php?id=100070050743284&sk=about_details",
"org-youtube": "https://www.youtube.com/@reachoutsalone8395"
},
"equal-rights-alliance": {
"equal-rights": {
"org-slug": "equal-rights-alliance",
"org-short-name": "Equal Rights Alliance",
"org-long-name": "Equal Rights Alliance",
Expand All @@ -202,10 +182,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [3, 10],
"partnership-start": "2022",
"recipients-total": "13",
"recipients-active": "13",
"recipients-former": "0",
"recipients-suspended": "0",
"org-mission": "The NGO advances human rights by increasing awareness and understanding of equal rights, inclusion, and social justice within communities.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -235,7 +211,7 @@
"org-photo": "",
"org-facebook": "https://www.facebook.com/groups/693921621002955/"
},
"united-polio-brothers-and-sisters": {
"united-polio": {
"org-slug": "united-polio-brothers-and-sisters",
"org-short-name": "United Polio Brothers and Sisters",
"org-long-name": "United Polio Brothers and Sisters",
Expand All @@ -246,10 +222,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [1, 8],
"partnership-start": "2022",
"recipients-total": "10",
"recipients-active": "10",
"recipients-former": "0",
"recipients-suspended": "0",
"org-mission": "The NGO supports disabled and vulnerable individuals by providing housing, training, and resources to improve their lives and uphold their dignity.",
"org-description-paragraphs": [
[
Expand Down Expand Up @@ -278,7 +250,7 @@
"org-quote-author": "Paul Osman Kabia",
"org-photo": ""
},
"sierra-leone-association-of-ebola-survivors": {
"slaes": {
"org-slug": "sierra-leone-association-of-ebola-survivors",
"org-short-name": "SLAES",
"org-long-name": "Sierra Leone Association of Ebola Survivors",
Expand All @@ -289,10 +261,6 @@
"org-category": "Local NGO",
"org-focus-sdg-numbers": [4, 5],
"partnership-start": "2024",
"recipients-total": "20",
"recipients-active": "17",
"recipients-former": "2",
"recipients-suspended": "1",
"org-mission": "The community-based NGO supports individuals who have survived the Ebola virus, focusing on those affected by the devastating 2014 outbreak in Sierra Leone.",
"org-description-paragraphs": [
[
Expand Down
3 changes: 2 additions & 1 deletion shared/locales/fr/website-finances.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"since-march-2020": "Depuis mars 2020",
"totalContributions": "{{ contributorCount }} donateurs pour un montant total de {{value, currency}}",
"totalPayments": "{{ value }} paiements par téléphonie mobile effectués",
"totalRecipients": "{{ value }} bénéficiaires engagés dans un programme de 3 ans"
"totalRecipients": "{{ value }} bénéficiaires soutenus par un programme de 3 ans",
"activeRecipients": "{{ value }} bénéficiaires actifs"
},
"section-2": {
"title": "Comment Social Income est-il financé?",
Expand Down
Loading

0 comments on commit 47c133d

Please sign in to comment.