Skip to content

Commit

Permalink
Format Code
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkMenacer committed Nov 12, 2023
1 parent 2340119 commit 8ad816e
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 165 deletions.
2 changes: 1 addition & 1 deletion shared/locales/de/website-bank-details.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bankIBANPrompt": "IBAN",
"bankIBAN1": "CH19 0900 0000 1511 2638 6",
"bankIBAN2": "CH57 0900 0000 1548 6088 1",
"bankBICPrompt" : "BIC",
"bankBICPrompt": "BIC",
"bankBIC": "POFICHBEXXX"
}
}
2 changes: 1 addition & 1 deletion shared/locales/en/website-bank-details.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bankIBANPrompt": "IBAN",
"bankIBAN1": "CH19 0900 0000 1511 2638 6",
"bankIBAN2": "CH57 0900 0000 1548 6088 1",
"bankBICPrompt" : "BIC",
"bankBICPrompt": "BIC",
"bankBIC": "POFICHBEXXX"
}
}
12 changes: 6 additions & 6 deletions shared/locales/en/website-evidence.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"link": "https://drive.google.com/file/d/1KTsAwaWPH0NaiD2SLVQmJZHn2bxeWFHz/view?usp=sharing"
},
"part-2": {
"text":", ",
"text": ", ",
"text-blue": "Covarrubias 2012",
"link": "https://drive.google.com/file/d/1OEFeYCgxnbbrFVNFoYYQsSrnmVxZdz9v/view?usp=sharing"
},
Expand Down Expand Up @@ -160,9 +160,9 @@
}
}
},
"section-3": {
"topic": "Empowerment",
"title-black": "How does Social Income ",
"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": {
Expand Down Expand Up @@ -299,7 +299,7 @@
}
},
"card-4": {
"title" : "Empowerment of women",
"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": {
Expand Down Expand Up @@ -433,7 +433,7 @@
}
}
}
},
},
"section-4": {
"topic": "Well-being",
"title-black": "How does Social Income contribute to ",
Expand Down
2 changes: 1 addition & 1 deletion shared/locales/it/website-bank-details.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bankIBANPrompt": "IBAN",
"bankIBAN1": "CH19 0900 0000 1511 2638 6",
"bankIBAN2": "CH57 0900 0000 1548 6088 1",
"bankBICPrompt" : "BIC",
"bankBICPrompt": "BIC",
"bankBIC": "POFICHBEXXX"
}
}
6 changes: 3 additions & 3 deletions shared/src/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface TranslateProps {
namespace?: string;
language?: string;
context?: object;
returnObjects?: boolean;
returnObjects?: boolean;
}

interface TranslatorProps {
Expand Down Expand Up @@ -41,7 +41,7 @@ export class Translator {
lng: language,
ns: namespaces,
fallbackLng: FALLBACK_LANGUAGE,
returnObjects: false,
returnObjects: false,
interpolation: {
escapeValue: false,
},
Expand All @@ -53,7 +53,7 @@ export class Translator {
return this.instance.t(key, {
ns: translateProps?.namespace || this.namespaces,
lng: translateProps?.language || this.language,
returnObjects: translateProps?.returnObjects || false,
returnObjects: translateProps?.returnObjects || false,
...translateProps?.context,
});
};
Expand Down
65 changes: 32 additions & 33 deletions website/src/app/[lang]/[country]/(website)/bank/section-1.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Translator } from "@socialincome/shared/src/utils/i18n";
import { DefaultPageProps } from "../..";
import { BaseContainer, Typography } from "@socialincome/ui";

import { Translator } from '@socialincome/shared/src/utils/i18n';
import { BaseContainer, Typography } from '@socialincome/ui';
import { DefaultPageProps } from '../..';

export default async function Section1({ params }: DefaultPageProps) {
const translator = await Translator.getInstance({
Expand All @@ -10,84 +9,84 @@ export default async function Section1({ params }: DefaultPageProps) {
});

return (
<BaseContainer className="my-28 flex flex-col items-left space-y-8 pl-8">
<BaseContainer className="items-left my-28 flex flex-col space-y-8 pl-8">
<Typography size="3xl" weight="bold">
{translator.t('section-1.bankIntroText') + ": "}
</Typography>
{translator.t('section-1.bankIntroText') + ': '}
</Typography>

<div className="flex flex-col space-y-4">
<Typography size="xl" weight="bold">
{translator.t('section-1.bankInfoTextRecurring')}
</Typography>
</Typography>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankPrompt') + ": "}
</Typography>
{translator.t('section-1.bankPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankPostFinance')}
</Typography>
</Typography>
</div>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankAccountHolderPrompt') + ": "}
</Typography>
{translator.t('section-1.bankAccountHolderPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankAccountHolder')}
</Typography>
</Typography>
</div>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankIBANPrompt') + ": "}
</Typography>
{translator.t('section-1.bankIBANPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankIBAN1')}
</Typography>
</Typography>
</div>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankBICPrompt') + ": "}
</Typography>
{translator.t('section-1.bankBICPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankBIC')}
</Typography>
</Typography>
</div>
</div>

<div className="flex flex-col space-y-4">
<Typography size="xl" weight="bold">
{translator.t('section-1.bankOneTime')}
</Typography>
</Typography>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankPrompt') + ": "}
</Typography>
{translator.t('section-1.bankPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankPostFinance')}
</Typography>
</Typography>
</div>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankAccountHolderPrompt') + ": "}
</Typography>
{translator.t('section-1.bankAccountHolderPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankAccountHolder')}
</Typography>
</Typography>
</div>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankIBANPrompt') + ": "}
</Typography>
{translator.t('section-1.bankIBANPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankIBAN2')}
</Typography>
</Typography>
</div>
<div>
<Typography as="span" size="xl" weight="medium" color="muted-foreground">
{translator.t('section-1.bankBICPrompt') + ": "}
</Typography>
{translator.t('section-1.bankBICPrompt') + ': '}
</Typography>
<Typography as="span" size="xl">
{translator.t('section-1.bankBIC')}
</Typography>
</Typography>
</div>
</div>
</BaseContainer>
Expand Down
4 changes: 2 additions & 2 deletions website/src/app/[lang]/[country]/(website)/evidence/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default async function Page(props: DefaultPageProps) {
<>
<Section1 {...props} />
<Section2 {...props} />
<Section3 {...props} />
<Section4 {...props} />
<Section3 {...props} />
<Section4 {...props} />
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ export default async function Section1({ params }: DefaultPageProps) {

return (
<BaseContainer className="mt-12 flex flex-col items-center space-y-4">
<Typography as="h1" size="4xl" weight="bold" className="text-center w-2/3">
<Typography as="h1" size="4xl" weight="bold" className="w-2/3 text-center">
{translator.t('section-1.title')}
<div className="text-red-400">
{translator.t('section-1.red-title')}
</div>
<div className="text-red-400">{translator.t('section-1.red-title')}</div>
</Typography>
<Typography as="h2" size="xl" className="max-w-2xl text-center">
{translator.t('section-1.subtitle')}
Expand Down
45 changes: 28 additions & 17 deletions website/src/app/[lang]/[country]/(website)/evidence/section-2.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
import { DefaultPageProps } from '@/app/[lang]/[country]';
import { Translator } from '@socialincome/shared/src/utils/i18n';
import { BaseContainer,Typography } from '@socialincome/ui';
import { BaseContainer, Typography } from '@socialincome/ui';
import { SectionCard } from './section-card';

export default async function Section2({ params }: DefaultPageProps) {
const section = 2;
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;
const c = translator.t(`section-${section}.cards`, { returnObjects: true });
let cards: Object[] = [];
for (const card in c) {
cards.push(card);
}
let i = 0;

return (
<BaseContainer backgroundColor='bg-blue-50' className="mt-12 p-10 rounded-sm flex flex-col items-start space-y-1">
<Typography size='xl' weight='medium' color='muted-foreground'>{translator.t(`section-${section}.topic`)}</Typography>
<div className='pb-10' >
<Typography as='span' size='4xl' weight='bold'>{translator.t(`section-${section}.title-black`)}</Typography>
<Typography as='span' size='4xl' weight='bold' className='text-red-400'>{translator.t(`section-${section}.title-red`)}</Typography>
<BaseContainer backgroundColor="bg-blue-50" className="mt-12 flex flex-col items-start space-y-1 rounded-sm p-10">
<Typography size="xl" weight="medium" color="muted-foreground">
{translator.t(`section-${section}.topic`)}
</Typography>
<div className="pb-10">
<Typography as="span" size="4xl" weight="bold">
{translator.t(`section-${section}.title-black`)}
</Typography>
<Typography as="span" size="4xl" weight="bold" className="text-red-400">
{translator.t(`section-${section}.title-red`)}
</Typography>
</div>
<div className='my-32 flex space-x-20'>
<Typography size='2xl' weight='semibold' className='w-1/4'>{translator.t(`section-${section}.evidence`)}</Typography>
<div className='w-2/5 h-fit text-left space-y-10'>
{
cards.map((card, key)=> {i++;return (<SectionCard section={section} cardNumber={i} params={params} key={key}/>)})
}
<div className="my-32 flex space-x-20">
<Typography size="2xl" weight="semibold" className="w-1/4">
{translator.t(`section-${section}.evidence`)}
</Typography>
<div className="h-fit w-2/5 space-y-10 text-left">
{cards.map((card, key) => {
i++;
return <SectionCard section={section} cardNumber={i} params={params} key={key} />;
})}
</div>
</div>
</BaseContainer>
Expand Down
45 changes: 28 additions & 17 deletions website/src/app/[lang]/[country]/(website)/evidence/section-3.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
import { DefaultPageProps } from '@/app/[lang]/[country]';
import { Translator } from '@socialincome/shared/src/utils/i18n';
import { BaseContainer,Typography } from '@socialincome/ui';
import { BaseContainer, Typography } from '@socialincome/ui';
import { SectionCard } from './section-card';

export default async function Section3({ params }: DefaultPageProps) {
const section = 3;
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;
const c = translator.t(`section-${section}.cards`, { returnObjects: true });
let cards: Object[] = [];
for (const card in c) {
cards.push(card);
}
let i = 0;

return (
<BaseContainer backgroundColor='bg-pink-50' className="p-10 rounded-sm flex flex-col items-start space-y-1">
<Typography size='xl' weight='medium' color='muted-foreground'>{translator.t(`section-${section}.topic`)}</Typography>
<div className='pb-10' >
<Typography as='span' size='4xl' weight='bold'>{translator.t(`section-${section}.title-black`)}</Typography>
<Typography as='span' size='4xl' weight='bold' className='text-red-400'>{translator.t(`section-${section}.title-red`)}</Typography>
<BaseContainer backgroundColor="bg-pink-50" className="flex flex-col items-start space-y-1 rounded-sm p-10">
<Typography size="xl" weight="medium" color="muted-foreground">
{translator.t(`section-${section}.topic`)}
</Typography>
<div className="pb-10">
<Typography as="span" size="4xl" weight="bold">
{translator.t(`section-${section}.title-black`)}
</Typography>
<Typography as="span" size="4xl" weight="bold" className="text-red-400">
{translator.t(`section-${section}.title-red`)}
</Typography>
</div>
<div className='my-32 flex space-x-20'>
<Typography size='2xl' weight='semibold' className='w-1/4'>{translator.t(`section-${section}.evidence`)}</Typography>
<div className='w-2/5 h-fit text-left space-y-10'>
{
cards.map((card, key)=> {i++;return (<SectionCard section={section} cardNumber={i} params={params} key={key}/>)})
}
<div className="my-32 flex space-x-20">
<Typography size="2xl" weight="semibold" className="w-1/4">
{translator.t(`section-${section}.evidence`)}
</Typography>
<div className="h-fit w-2/5 space-y-10 text-left">
{cards.map((card, key) => {
i++;
return <SectionCard section={section} cardNumber={i} params={params} key={key} />;
})}
</div>
</div>
</BaseContainer>
Expand Down
Loading

0 comments on commit 8ad816e

Please sign in to comment.