Skip to content

Commit

Permalink
feature(website): finish about us page
Browse files Browse the repository at this point in the history
  • Loading branch information
mkue committed Nov 15, 2023
1 parent 5728978 commit 0c0ab1d
Show file tree
Hide file tree
Showing 47 changed files with 668 additions and 242 deletions.
35 changes: 35 additions & 0 deletions shared/locales/de/website-about-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,40 @@
"section-1": {
"title-1": "Etwas bewegen, nicht nur darüber sprechen. ",
"title-2": "Dies war der Anfang von Social Income."
},
"team": {
"header": "Unser Team",
"title-1": "Wir verhelfen Social Income ",
"title-2": "zur Realität.",
"roles": {
"finance": "Finanzen",
"operations": "Betrieb",
"marketing": "Marketing",
"communications": "Kommunikation",
"co-president": "Co-Präsident:in",
"founder": "Gründer",
"board-member": "Vorstandsmitglied",
"software-development": "Softwareentwicklung",
"app-development": "App-Entwicklung",
"impact-measurement": "Impact Measurement"
},
"groups": {
"staff": {
"name": "Mitarbeiter:innen",
"description": "Unsere Mitarbeiter:innen vor Ort in Sierra Leone."
},
"volunteers": {
"name": "Freiwillige",
"description": "Die Menschen, die alles möglich machen."
},
"board": {
"name": "Vorstand",
"description": "Die Aufsichtspersonen der Organisation."
},
"special-thanks": {
"name": "Besonderer Dank",
"description": "Diese Personen haben sich großzügig ehrenamtlich eingesetzt und zu Social Income beigetragen."
}
}
}
}
1 change: 1 addition & 0 deletions shared/locales/de/website-home.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"video-button": "Schau dir das Video an",
"vimeo-video-id": "488184818"
},
"section-3": {},
"section-4": {
"title-1": "Soziale Gerechtigkeit fängt ",
"title-2": " bei uns an.",
Expand Down
35 changes: 0 additions & 35 deletions shared/locales/de/website-team.json

This file was deleted.

131 changes: 127 additions & 4 deletions shared/locales/en/website-about-us.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,129 @@
{
"section-1": {
"title-1": "We wanted to act. We found a way to do it. ",
"title-2": "Social Income was born."
}
"landing-page": {
"title": [
{
"text": "We wanted to act. We found a way to do it. "
},
{
"text": "Social Income was born.",
"color": "secondary"
}
]
},
"our-mission": {
"header": "Our Mission",
"title": [
{
"text": "Fighting global poverty with the "
},
{
"text": "help of everyday people.",
"color": "secondary"
}
],
"subtitle": "Many people in wealthier countries are committed to addressing inequality, but don’t know how or where to start.",
"paragraphs": [
"Thanks to the widespread use of mobile phone-based money transfer services in developing countries, it is easier than ever to send money directly to people in need, at almost no cost.",
"Social Income wants to harness this potential by combining two approaches to wealth redistribution. The first is the concept of Universal Basic Income, which is a promising path towards a more equal and inclusive society.",
"The second is the use of direct and anticipatory cash transfers to people living in poverty. Research has shown that those who receive direct aid greatly benefit from the money and that they reinvest it locally, responsibly, and successfully.",
"We make an impact by sending regular long-term cash transfers directly to recipients: from person to person, because many of the world's poorest countries lack solid social infrastructure.",
"And we do so in a radically transparent way that allows us to avoid the high administrative costs normally associated with such projects."
]
},
"100-percent-model": {
"header": "100% Model",
"title": [
{
"text": "Zero overhead costs. "
},
{
"text": "Our pledge to you.",
"color": "secondary"
}
],
"paragraphs": [
"We believe that 100% of our contributors’ donations should go to our recipients. To maintain this promise, all our operating costs and financial expenses are covered by philanthropic grants and institutional donations.",
"Thanks to this support, we can guarantee that 100% of the money from our individual contributors reaches our recipients.",
"Additionally, we receive various in-kind support from organizations, such as <a href='https://www.google.com/nonprofits/' class='underline' target='_blank'>Google Non-profit</a> or <a href='https://lineto.com/' class='underline' target='_blank'>Lineto</a> (Unica77 font). Thank you!"
]
},
"flow-of-funds": {
"header": "Flow of Funds",
"title": [
{
"text": "Social Income payments are sent directly to "
},
{
"text": "recipients’ mobile phones.",
"color": "secondary"
}
],
"paragraphs": [
"We receive contributions from all over the world. They are safely stored in our bank account, in the most stable currency in the world: Swiss Francs. Every month we transfer just enough money to local banks in the countries where we are active. We then distribute Social Incomes with the help of mobile money directly to the phones of beneficiaries."
],
"vimeo-video-id": "840215695"
},
"team": {
"header": "Our Team",
"title": [
{
"text": "We're making Social Income "
},
{
"text": "a reality.",
"color": "secondary"
}
],
"roles": {
"finance": "Finances",
"operations": "Operations",
"marketing": "Marketing",
"communications": "Communications",
"co-president": "Co-President",
"founder": "Founder",
"board-member": "Board Member",
"software-development": "Software Development",
"app-development": "App Development",
"impact-measurement": "Impact Measurement",
"strategy": "Strategy"
},
"groups": {
"staff": {
"name": "Staff",
"description": "Our local staff in Sierra Leone."
},
"volunteers": {
"name": "Volunteers",
"description": "The people who make it all happen."
},
"board": {
"name": "Board of Association",
"description": "The overseers of the organization."
},
"special-thanks": {
"name": "Special Thanks",
"description": "These individuals have volunteered and made generous contributions towards Social Income."
}
}
},
"contact": {
"header": "Contact",
"title": [
{
"text": "We're a Swiss "
},
{
"text": "non-profit organization.",
"color": "secondary"
}
],
"paragraph": "Social Income was founded as a non-profit association in Zurich, Switzerland. An independent board oversees the organization.",
"legal-status": "Legal Status",
"legal-status-paragraphs": [
"Non-profit organization founded under Swiss law in 2019 with tax exempt status.",
"UID: CHE-289.611.695",
"DUNS: 48-045-6376"
],
"find-us": "Find us on"
}
}
12 changes: 12 additions & 0 deletions shared/locales/en/website-home.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
"video-button": "Watch the video",
"vimeo-video-id": "433937157"
},
"section-3": {
"title": [{ "text": "Who should, if not us " }, { "text": "here in Switzerland?", "color": "secondary" }],
"jackpot-title": "Life in Switzerland is like winning the jackpot.",
"jackpot-text": "People in Switzerland have systematically more opportunities and higher chances of leading a life worth living than anywhere else in the world.",
"jackpot-button": "Share the love",
"helping-others-title": "Helping others makes us happier.",
"helping-others-text": "Let’s start by helping those who don’t have the privilege of leading a life without financial difficulties. If not now, when?",
"helping-others-button": "Take Action",
"together-title": "Together we can make a major difference.",
"together-text": "If every fourth person in Switzerland contributed 1% of their income, every citizen of Sierra Leone could receive universal basic income and make poverty a thing of the past.",
"together-button": "Lead the Way"
},
"section-4": {
"title-1": "How can we address inequality? ",
"title-2": " Ourselves.",
Expand Down
36 changes: 0 additions & 36 deletions shared/locales/en/website-team.json

This file was deleted.

22 changes: 10 additions & 12 deletions shared/src/firebase/client/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ interface InitializeFirebaseClientProps {
functionsEmulatorPort?: number;
}

export const initializeFirebaseClient = (
{
firebaseConfig,
authEmulatorUrl,
firestoreEmulatorHost,
firestoreEmulatorPort,
storageEmulatorHost,
storageEmulatorPort,
functionsEmulatorHost,
functionsEmulatorPort,
}: InitializeFirebaseClientProps,
) => {
export const initializeFirebaseClient = ({
firebaseConfig,
authEmulatorUrl,
firestoreEmulatorHost,
firestoreEmulatorPort,
storageEmulatorHost,
storageEmulatorPort,
functionsEmulatorHost,
functionsEmulatorPort,
}: InitializeFirebaseClientProps) => {
const app = getOrInitializeFirebaseClientApp(firebaseConfig);
const auth = getAuth(app);
const functions = getFunctions(app, DEFAULT_REGION);
Expand Down
7 changes: 4 additions & 3 deletions shared/src/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface TranslatorProps {
namespaces: string[] | string;
}

export type TranslateFunction = (key: string, translateProps?: TranslateProps) => string;
export type TranslateFunction = <T = string>(key: string, translateProps?: TranslateProps) => T;

export class Translator {
language: LanguageCode;
Expand All @@ -40,18 +40,19 @@ export class Translator {
lng: language,
ns: namespaces,
fallbackLng: FALLBACK_LANGUAGE,
returnObjects: true,
interpolation: {
escapeValue: false,
},
});
return translator;
}

public t: TranslateFunction = (key: string, translateProps?: TranslateProps) => {
public t: TranslateFunction = <T = string>(key: string, translateProps?: TranslateProps): T => {
return this.instance.t(key, {
ns: translateProps?.namespace || this.namespaces,
lng: translateProps?.language || this.language,
...translateProps?.context,
});
}) as T;
};
}
12 changes: 9 additions & 3 deletions shared/src/utils/messaging/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ interface SendEmailProps {
password: string;
}

export const sendEmail = async (
{ from = '[email protected]', to, subject, content, attachments = [], user, password }: SendEmailProps,
) => {
export const sendEmail = async ({
from = '[email protected]',
to,
subject,
content,
attachments = [],
user,
password,
}: SendEmailProps) => {
let transporter: Transporter;
if (!user) {
const testAccount = await nodemailer.createTestAccount();
Expand Down
9 changes: 6 additions & 3 deletions shared/src/utils/messaging/whatsapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export interface SendWhatsappProps {
templateProps: RenderTemplateProps;
}

export const sendWhatsapp = async (
{ to, from, twilioConfig, templateProps }: SendWhatsappProps,
): Promise<MessageInstance> => {
export const sendWhatsapp = async ({
to,
from,
twilioConfig,
templateProps,
}: SendWhatsappProps): Promise<MessageInstance> => {
const client = new Twilio(twilioConfig.sid, twilioConfig.token);
const body = await renderTemplate(templateProps);
return client.messages.create({ body: body, from: `whatsapp:${from}`, to: `whatsapp:${to}` });
Expand Down
9 changes: 6 additions & 3 deletions shared/src/utils/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ const partials = [
];
partials.forEach((partial) => Handlebars.registerPartial(partial.name, readHbs(partial.path)));

export const renderTemplate = async (
{ language, translationNamespace = [], hbsTemplatePath, context }: RenderTemplateProps,
) => {
export const renderTemplate = async ({
language,
translationNamespace = [],
hbsTemplatePath,
context,
}: RenderTemplateProps) => {
const i18n = i18next.createInstance();
await i18n
.use(
Expand Down
Loading

0 comments on commit 0c0ab1d

Please sign in to comment.