Add letter translations
This commit is contained in:
parent
cdae8d82a3
commit
b6f763f40a
19 changed files with 391 additions and 157 deletions
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"printWidth": 100
|
||||
"printWidth": 100,
|
||||
"quoteProps": "consistent"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@ import { z, defineCollection } from "astro:content";
|
|||
|
||||
const intro = defineCollection({
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
}),
|
||||
});
|
||||
|
||||
const confirmEmail = defineCollection({
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Tell your local branch of Vienna Insurance Group to stop supporting fossil fuel
|
||||
---
|
||||
|
||||
**Vienna Insurance Group is the biggest insurer in Central and Eastern Europe and still considers supporting the fossil fuel industry**. With its zero restriction on giving insurance to oil and gas companies and light restriction on coal, VIG continues to fund fossil fuels and therefore accelerating climate change. So far. Right now, we hold the power to pressure VIG and insurers all around the world to adopt stricter policies and make a major move in helping the burning planet! Together, we have the power to call out Vienna Insurance Group with its 50 branches in 20 CEE countries, and demand change.
|
||||
|
||||
And now is the good time! Because this week is the Week of Action against insuring fossil fuels, by the Insure our Future network – tens of actions are happening worldwide. Join us to make voices from the CEE heard, and send an email to your local branch of Vienna Insurance Group in just a few clicks!
|
||||
|
|
149
src/i18n.ts
149
src/i18n.ts
|
@ -1,65 +1,112 @@
|
|||
import type { RenderTemplateResult } from "astro/runtime/server/render/astro/render-template.js";
|
||||
import { DEFAULT_LANG } from "./config";
|
||||
import type { Lang } from "./lang";
|
||||
import noopTag, { type TagFn } from "./lib/noop-tag";
|
||||
|
||||
type AnyString = string & {};
|
||||
export default function a(
|
||||
strings: TemplateStringsArray,
|
||||
...expressions: RenderTemplateResult[]
|
||||
): Array<string | RenderTemplateResult> {
|
||||
let result: Array<string | RenderTemplateResult> = [strings[0]];
|
||||
|
||||
// Reference
|
||||
const en = {
|
||||
website_name: "Let's stop dirty money",
|
||||
website_description: undefined,
|
||||
switch_country: "Switch country",
|
||||
for (let i = 1, l = strings.length; i < l; i++) {
|
||||
result.push(expressions[i - 1]);
|
||||
result.push(strings[i]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
const reference = {
|
||||
"website_name": "Let’s stop dirty money",
|
||||
"website_description":
|
||||
"Send an email to your local branch of the Vienna Insurance Group, the biggest insurer in Central and Eastern Europe, to push them to adopt serious fossil fuel policies.",
|
||||
|
||||
"switch_country": "Switch country",
|
||||
"form.first_name": "First name",
|
||||
"form.last_name": "Last name",
|
||||
"form.variant": "I'm most concerned that",
|
||||
"form.variant.1": "EPH destroys global climate",
|
||||
"form.variant.2": "EPH fuels energy crisis",
|
||||
"form.variant.3": "EPH undermines democracy",
|
||||
"form.gender": undefined,
|
||||
"form.gender.f": undefined,
|
||||
"form.gender.m": undefined,
|
||||
"form.branch": "I'm client of",
|
||||
"form.letter": "Letter body",
|
||||
|
||||
"form.variant": "I'm most concerned about",
|
||||
"form.variant.1": "lack of oil and gas policy",
|
||||
"form.variant.2": "weak coal policy",
|
||||
"form.variant.3": "Neptune Deep",
|
||||
|
||||
"form.gender": "I wish to be referred to in",
|
||||
"form.gender.f": "Feminine gender",
|
||||
"form.gender.m": "Masculine gender",
|
||||
"form.gender.n": "Neither/I'd rather not say",
|
||||
|
||||
"form.branch": "I want to contact the responsible person of",
|
||||
"form.is_client": "I’m a client of this branch",
|
||||
|
||||
"form.message": "Message text",
|
||||
"form.fill_the_options": "Fill the options",
|
||||
"form.send_letter": "Send the letter",
|
||||
|
||||
"form.few_more_details": "A few more details...",
|
||||
"form.email": "E-mail",
|
||||
"form.phone": "Phone number",
|
||||
"form.send": "Send",
|
||||
"confirm_email.title": "Confirm your e-mail",
|
||||
"confirm_email.body": "Click the link below to verify your e-mail address.",
|
||||
"confirm_email.link": "Confirm",
|
||||
"form.phone": "Phone (optional)",
|
||||
"form.privacy_policy": "privacy policy",
|
||||
"form.agree_with_privacy_policy": (privacyPolicy: any) => a`I agree with ${privacyPolicy}.`,
|
||||
"form.subscribe": "I want to stay updated about this campaign.",
|
||||
|
||||
"form_response.verification_required": "We need to verify your e-mail.",
|
||||
"form_response.verification_follow_link": "Follow the link we have sent to your email address.",
|
||||
|
||||
"form_response.already_sent.title": "You have already sent a message from this e-mail.",
|
||||
"form_response.already_sent.body": "You can send only one message per branch.",
|
||||
} as const;
|
||||
|
||||
type TranslationKey = keyof typeof en;
|
||||
type Translation = Partial<Record<TranslationKey | AnyString, string | undefined>>;
|
||||
type TranslationKey = keyof typeof reference;
|
||||
type Translation = Partial<Record<TranslationKey, (...stuff: Array<any>) => string>>;
|
||||
|
||||
const cs: Translation = {
|
||||
website_name: "Zastavme špinavé prachy",
|
||||
switch_country: "Změnit zemi",
|
||||
"form.first_name": "Jméno",
|
||||
"form.last_name": "Příjmení",
|
||||
"form.variant": "Nejvíc mi vadí, že",
|
||||
"form.variant.1": "EPH ničí klima",
|
||||
"form.variant.2": "EPH způsobuje energetickou krizi",
|
||||
"form.variant.3": "EPH ohrožuje demokracii",
|
||||
"form.gender": "Preferuju být oslován/a v",
|
||||
"form.gender.f": "ženském rodě",
|
||||
"form.gender.m": "mužském rodě",
|
||||
"form.branch": "Jsem klient/ka pobočky",
|
||||
"form.letter": "Text dopisu",
|
||||
"form.email": "E-mail",
|
||||
"form.phone": "Telefonní číslo",
|
||||
"form.send": "Odeslat",
|
||||
"confirm_email.title": "Potvrď svůj e-mail",
|
||||
"confirm_email.body": "Kliknutím na následující odkaz potvrdíš svou e-mailovou adresu.",
|
||||
"confirm_email.link": "Potvrdit e-mail",
|
||||
const translations: Record<Lang, Translation> = {
|
||||
en: reference,
|
||||
cs: {
|
||||
"website_name": "Zastavme špinavé prachy",
|
||||
"switch_country": "Změnit zemi",
|
||||
"form.first_name": "Jméno",
|
||||
"form.last_name": "Příjmení",
|
||||
"form.variant": "Nejvíc mi vadí, že",
|
||||
"form.variant.1": "EPH ničí klima",
|
||||
"form.variant.2": "EPH způsobuje energetickou krizi",
|
||||
"form.variant.3": "EPH ohrožuje demokracii",
|
||||
"form.gender": "Preferuju být oslován/a v",
|
||||
"form.gender.f": "ženském rodě",
|
||||
"form.gender.m": "mužském rodě",
|
||||
"form.branch": "Jsem klient/ka pobočky",
|
||||
"form.letter": "Text dopisu",
|
||||
"form.email": "E-mail",
|
||||
"form.phone": "Telefonní číslo",
|
||||
"form.send": "Odeslat",
|
||||
"confirm_email.title": "Potvrď svůj e-mail",
|
||||
"confirm_email.body": "Kliknutím na následující odkaz potvrdíš svou e-mailovou adresu.",
|
||||
"confirm_email.link": "Potvrdit e-mail",
|
||||
},
|
||||
sk: {},
|
||||
pl: {},
|
||||
hu: {},
|
||||
ro: {},
|
||||
lt: {},
|
||||
de: {},
|
||||
};
|
||||
|
||||
const de: Translation = {};
|
||||
|
||||
const translations: Record<Lang, Translation> = { en, cs, de };
|
||||
|
||||
export type TTag = TagFn;
|
||||
|
||||
export function makeT(lang: Lang = DEFAULT_LANG) {
|
||||
// TODO
|
||||
return noopTag;
|
||||
return {
|
||||
t(key: TranslationKey): string {
|
||||
const translationDict = translations[lang];
|
||||
const value = translationDict[key] ?? reference[key];
|
||||
if (typeof value === "string") {
|
||||
return value;
|
||||
}
|
||||
return key;
|
||||
},
|
||||
jt(key: TranslationKey, params: any) {
|
||||
const translationDict = translations[lang];
|
||||
const value = translationDict[key] ?? reference[key];
|
||||
if (typeof value === "function") {
|
||||
return value(params);
|
||||
}
|
||||
return key;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,12 +9,10 @@ interface Props {
|
|||
}
|
||||
|
||||
const { lang = DEFAULT_LANG } = Astro.props;
|
||||
const t = makeT(lang);
|
||||
const { t } = makeT(lang);
|
||||
|
||||
// translator: website title – this will display in browser tab and also in search engine results.
|
||||
const title = t`Let’s stop dirty money`;
|
||||
// translator: website description – it will display in search engine results
|
||||
const description = t`Send an email to your local branch of the Vienna Insurance Group, the biggest insurer in Central and Eastern Europe, to push them to adopt serious fossil fuel policies.`;
|
||||
const title = t("website_name");
|
||||
const description = t("website_description");
|
||||
---
|
||||
|
||||
<html lang={lang}>
|
||||
|
|
|
@ -14,7 +14,7 @@ interface Props {
|
|||
}
|
||||
|
||||
const { lang, options = {} } = Astro.props;
|
||||
const t = makeT(lang);
|
||||
const { t, jt } = makeT(lang);
|
||||
const result = letterOptionsSchema.safeParse(options);
|
||||
---
|
||||
|
||||
|
@ -26,7 +26,7 @@ const result = letterOptionsSchema.safeParse(options);
|
|||
>
|
||||
<div class="mb-6">
|
||||
<label class="block text-base mb-2" for="letter-input">
|
||||
{t`Message text`}
|
||||
{t("form.message")}
|
||||
</label>
|
||||
<div class="relative overflow-hidden rounded-[3px]">
|
||||
<textarea
|
||||
|
@ -49,7 +49,7 @@ const result = letterOptionsSchema.safeParse(options);
|
|||
>
|
||||
<path d="M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" />
|
||||
</svg>
|
||||
<p class="text-2xl">{t`Fill the options`}</p>
|
||||
<p class="text-2xl">{t("form.fill_the_options")}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -63,7 +63,7 @@ const result = letterOptionsSchema.safeParse(options);
|
|||
disabled={!result.success}
|
||||
onclick="document.querySelector('#contact-details-dialog')?.showModal()"
|
||||
>
|
||||
{t`Send the letter`}
|
||||
{t("form.send_letter")}
|
||||
<svg class="w-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z"
|
||||
|
@ -71,21 +71,24 @@ const result = letterOptionsSchema.safeParse(options);
|
|||
</svg>
|
||||
</Button>
|
||||
</div>
|
||||
<Dialog id="contact-details-dialog" heading={t`A few more details…`}>
|
||||
<Dialog id="contact-details-dialog" heading={t("form.few_more_details")}>
|
||||
<div class="grid gap-6">
|
||||
<Field required name="email" type="email" label={t`E-mail`} class="flex-1" />
|
||||
<Field name="phone" type="tel" label={t`Phone (optional)`} class="flex-1" />
|
||||
<Field required name="email" type="email" label={t("form.email")} class="flex-1" />
|
||||
<Field name="phone" type="tel" label={t("form.phone")} class="flex-1" />
|
||||
<Checkbox name="dataProcessingConsent" required>
|
||||
{t`I agree with`}
|
||||
<a href="https://spinaveprachy.cz/gdpr/" target="_blank" class="link">
|
||||
{t`privacy policy`}
|
||||
</a>.
|
||||
{
|
||||
jt(
|
||||
"form.agree_with_privacy_policy",
|
||||
// prettier-ignore
|
||||
<a href="https://spinaveprachy.cz/gdpr/" target="_blank" class="link">{t("form.privacy_policy")}</a>,
|
||||
)
|
||||
}
|
||||
</Checkbox>
|
||||
<Checkbox name="subscribed">
|
||||
{t`I want to stay updated about this campaign.`}
|
||||
{t("form.subscribe")}
|
||||
</Checkbox>
|
||||
<Button type="submit">
|
||||
{t`Send the letter`}
|
||||
{t("form.send_letter")}
|
||||
<svg class="w-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z"
|
||||
|
|
|
@ -13,8 +13,18 @@ interface Props {
|
|||
branches: Array<{ id: number; name: string }>;
|
||||
}
|
||||
|
||||
const { lang, branches } = Astro.props;
|
||||
const t = makeT(lang);
|
||||
const branches = [{ id: 1, name: "Branch 1" }];
|
||||
|
||||
const { lang } = Astro.props;
|
||||
const { t } = makeT(lang);
|
||||
|
||||
const genderOptions: Partial<Record<Lang, Array<"f" | "n" | "m">>> = {
|
||||
en: [],
|
||||
cs: ["f", "m", "m"],
|
||||
sk: ["m", "f"],
|
||||
};
|
||||
|
||||
const genders = genderOptions[lang];
|
||||
---
|
||||
|
||||
<form
|
||||
|
@ -25,32 +35,36 @@ const t = makeT(lang);
|
|||
class="grid gap-8"
|
||||
novalidate
|
||||
>
|
||||
<Field required label={t`First name`} name="firstName" />
|
||||
<Field required label={t`Last name`} name="lastName" />
|
||||
<RadioGroup required label={t`I’m most concerned that`}>
|
||||
<Radio name="variant" value="1" label={t`oil and gas policy`} checked />
|
||||
<Radio name="variant" value="2" label={t`coal policy`} />
|
||||
<Radio name="variant" value="3" label={t`neptun deep`} />
|
||||
<Field required label={t("form.first_name")} name="firstName" />
|
||||
<Field required label={t("form.last_name")} name="lastName" />
|
||||
<RadioGroup required label={t("form.variant")}>
|
||||
<Radio name="variant" value="1" label={t("form.variant.1")} checked />
|
||||
<Radio name="variant" value="2" label={t("form.variant.2")} />
|
||||
<Radio name="variant" value="3" label={t("form.variant.3")} />
|
||||
</RadioGroup>
|
||||
{
|
||||
lang !== "en" && (
|
||||
// translator: this make sense only in gendered languages like Czech;
|
||||
// in non-gendered languages this will be ignored.
|
||||
<RadioGroup required label={t`I wish to be referred to in`}>
|
||||
<Radio name="gender" value="f" label={t`Feminine gender`} checked />
|
||||
<Radio name="gender" value="m" label={t`Masculine gender`} />
|
||||
genders && genders.length > 0 && (
|
||||
<RadioGroup required label={t("form.gender")}>
|
||||
{genders.map((gender, index) => (
|
||||
<Radio
|
||||
name="gender"
|
||||
value={gender}
|
||||
label={t(`form.gender.${gender}`)}
|
||||
checked={index === 0}
|
||||
/>
|
||||
))}
|
||||
</RadioGroup>
|
||||
)
|
||||
}
|
||||
<div>
|
||||
<Label required class="mb-2" for="branch-input">
|
||||
{t`I want contact the responsible person of`}
|
||||
{t("form.branch")}
|
||||
</Label>
|
||||
<Select name="branch" id="branch-input">
|
||||
{branches.map((branch) => <option value={branch.id}>{branch.name}</option>)}
|
||||
</Select>
|
||||
</div>
|
||||
<Checkbox name="isClient">
|
||||
{t`I’m client of this branch`}
|
||||
{t("form.is_client")}
|
||||
</Checkbox>
|
||||
</form>
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
import type { LetterOptions } from "./schema";
|
||||
import type { Lang } from "../lang";
|
||||
import { makeT, type TTag } from "../i18n";
|
||||
|
||||
type Variant = (branch: string) => {
|
||||
exposure: string;
|
||||
demands: string;
|
||||
};
|
||||
|
||||
const variants = (t: TTag): Record<string, Variant> => ({
|
||||
1: (branch: string) => ({
|
||||
exposure: t`I recently learned that the Vienna Insurance Group, which ${branch} belongs to, does not have any policies against insuring oil and gas businesses. I believe you are well aware that continuing with oil and gas accelerates climate change, and keeps our economy dependent on dirty fuels that won’t be useful for long. It is unclear to me why ${branch} still considers working with oil and gas companies, when this industry threatens our health, homes, businesses - everything you, as an insurer, try to keep safe.`,
|
||||
demands: t`Therefore, I ask you, ${branch}, to publicly commit to stop insuring oil and gas projects or companies, and to persuade your group to do so.`,
|
||||
}),
|
||||
|
||||
2: (branch: string) => ({
|
||||
exposure: t`I am contacting you to raise my concerns about the coal policy of the Vienna Insurance Group, to which ${branch} belongs. As of today, your policy (thresholds 30%/20Mt/10GWh in countries with a coal exit strategy, no threshold in the others) still allows you to give insurance to coal companies. I am sure you perfectly know that burning coal emits greenhouse gases that contribute to the unprecedented current climate crisis, so I don’t understand why you still support this industry that threatens our health, homes, businesses - everything you, as an insurer, try to keep safe.`,
|
||||
demands: t`I am consequently urging you ${branch} and your group to improve your coal insurance policy (thresholds 20%/10Mt /5GWh for all countries).`,
|
||||
}),
|
||||
|
||||
3: (branch: string) => ({
|
||||
exposure: t`I am writing to you because I am deeply concerned about the Neptun Deep project, a gas extraction plan in the Romanian Black Sea scheduled to start drilling this year. This project would have devastating consequences for the climate, biodiversity, landscape, and local communities. ${branch}, as an insurer and as part of the Vienna Insurance Group, has important power in helping to stop this project: by refusing to insure it and by publicly speaking out against it.`,
|
||||
demands: t`This is why I would like you, ${branch}, to make a public statement declaring that you do not insure the Neptun Deep project, and to urge your group to do the same.`,
|
||||
}),
|
||||
});
|
||||
|
||||
function getName({ firstName, lastName }: { firstName?: string; lastName?: string }) {
|
||||
return [firstName, lastName].filter(Boolean).join(" ");
|
||||
}
|
||||
|
||||
export function renderText(
|
||||
lang: Lang,
|
||||
{ firstName, lastName, variant = "1", branch = "", isClient = false }: Partial<LetterOptions>
|
||||
) {
|
||||
const t = makeT(lang);
|
||||
const { exposure, demands } = variants(t)[variant]?.(branch);
|
||||
const name = getName({ firstName, lastName });
|
||||
const responsability = t`According to the values you defend as a company, it seems that you should be taking environmental and social concerns seriously. As the top insurer in Central and Eastern Europe, your group has the responsibility to set a positive example and truly “protect what matters” as you promise to do.`;
|
||||
const client = t`As a client of your company, I’ll have to reconsider staying with you if you do not take on more responsibility.`;
|
||||
const closing = t`I would appreciate it if you could respond as soon as possible.
|
||||
|
||||
Sincerely,
|
||||
${name}
|
||||
`;
|
||||
|
||||
const letter = [exposure, responsability, demands, isClient ? client : undefined, closing]
|
||||
.filter(Boolean)
|
||||
.join("\n\n");
|
||||
|
||||
return letter;
|
||||
}
|
46
src/letter/templates/cs.ts
Normal file
46
src/letter/templates/cs.ts
Normal file
|
@ -0,0 +1,46 @@
|
|||
import type { TemplateFn } from "./types";
|
||||
|
||||
/**
|
||||
* @status done
|
||||
*/
|
||||
export const cs: TemplateFn = (c) => {
|
||||
// prettier-ignore
|
||||
return (
|
||||
`${{
|
||||
1: `${{m: `Nedávno jsem se dozvěděl`, f: `Nedávno jsem se dozvěděla`, n: `Dostalo se ke mě`}[c.gender]}, že Vienna Insurance Group, pod kterou ${c.branch} spadá, nemá žádnou politiku pojištování podniků založených na těžbě a přepravě ropy a fosilního plynu.
|
||||
|
||||
Jak jistě víte, pokračování v těžbě ropy a plynu posiluje a urychluje klimatickou krizi. Navíc urdžuje naší ekonomiku závislou na palivech, která nevyhnutelně jednou přestanou být dostupná.
|
||||
|
||||
Těžko se mi chápe, proč ${c.branch} stále umožňuje spolupráci s fosilními společnostmi. Toto odvětví ohrožuje naše zdraví, naše blízké, ale i stabilitu naší ekonomiky - vše, co se jako pojišťovna snažíte udržovat v bezpečí.
|
||||
|
||||
Není mi jasné, proč ${c.branch} stále uvažuje o spolupráci s ropnými a plynárenskými společnostmi, když toto odvětví ohrožuje naše zdraví, domovy, stabilitu naší ekonomiky - tedy vše, co se jako pojišťovna snažíte udržet v bezpečí.`,
|
||||
|
||||
2: `Obracím se na vás, ${{m: `abych vyjádřil`, f: `abych vyjádřila`, n: `protože chci vyjádřit`}[c.gender]} svůj nesouhlas s uhelnou politikou skupiny Vienna Insurance Group, pod kterou ${c.branch} spadá.
|
||||
|
||||
V tuto chvíli vaše politika (tedy limit 0 %/20 milionů tun/10 GWh v zemích se strategií odchodu od uhlí, žádné limity v zemích bez strategie odchodu) stále umožňuje pojišťování uhelného byznysu.
|
||||
|
||||
Jak jistě víte, spalování uhlí posiluje a urychluje klimatickou krizi. Navíc urdžuje naší ekonomiku závislou na palivech, která nevyhnutelně jednou přestanou být dostupná. Těžko se mi chápe, jak může vaše společnost stále podporovat odvětví, které ohrožuje naše zdraví, naše blízké, ale i stabilitu naší ekonomiky - vše, co se jako pojišťovna snažíte udržovat v bezpečí.`,
|
||||
|
||||
3: `Píši vám, protože ${{m: `jsem hluboce znepokojený projektem`, f: `jsem hluboce znepokojená`, n: `mám velké obavy z projektu`}[c.gender]} Neptun Deep. Jde o plán na těžbu fosilního plynu v rumunském Černém moři, který se má začít realizovat už letos.
|
||||
|
||||
Projekt Neptun Deep by měl zničující důsledky pro místní krajinu, biodiverzitu, klima, i pro místní lidi.
|
||||
|
||||
Jako pojišťovna, která je součástí Vienna Insurance Group má ${c.branch} moc tenhle projekt zastavit tím, že jej veřejně odmítne pojistit.`,
|
||||
}[c.variant]}
|
||||
|
||||
Vzhledem k hodnotám, ke kterým se vaše organizace hlásí, ${{m: `bych předpokládal`, f:`bych předpokládala`, n: `lze předpokládat`}[c.gender]}, že budete brát ekologické a sociální otázky vážně. Jakožto součást největší pojišťovny ve střední a východní Evropě by vaše skupina mohla a měla jít příkladem a být skutečně “pojišťovnou pro život jaký je, a pro svět, jaký by mohl být”.
|
||||
|
||||
${{
|
||||
1: `Proto žádám vaši společnost ${c.branch}, aby se veřejně zavázala k tomu, že přestane pojišťovat projekty a společnosti těžící a přepravující ropu a fosilní plyn a přesvědčila k tomu i ostatní pobočky skupiny Vienna Insurance Group.`,
|
||||
2: `Proto vaši společnost ${c.branch} vyzývám k tomu, aby zpřísnila svou klimatickou politiku (například formou zvýšení limitů na 0%/10Mt /5GWh pro všechny země, v nichž Vienna Insurance Group působí).`,
|
||||
3: `Proto vaši společnost ${c.branch} žádám, aby vydala veřejné prohlášení, že nebude pojišťovat projekt Neptun Deep a aby k tomu vyzvala i ostatní pobočky Vienna Insurance Group.`,
|
||||
}[c.variant]}${c.isClient ? `
|
||||
|
||||
${{m: `Jako váš klient`, f: `Jako vaše klientka`, n: `Patřím mezi vaše klienty a`}[c.gender]} beru tuto otázku velmi vážně. Pokud k ní nezaujmete zodpovědnější přístup, budu zvažovat, zda nezměnit pojišťovnu.` : ``}
|
||||
|
||||
Děkuji za váš čas a těším se na vaši odpověď.
|
||||
|
||||
S pozdravem
|
||||
${c.name}
|
||||
`);
|
||||
};
|
30
src/letter/templates/en.ts
Normal file
30
src/letter/templates/en.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import type { TemplateFn } from "./types";
|
||||
|
||||
/**
|
||||
* @status done
|
||||
*/
|
||||
export const en: TemplateFn = (c) => {
|
||||
// prettier-ignore
|
||||
return (
|
||||
`${{
|
||||
1: `I recently learned that the Vienna Insurance Group, which ${c.branch} belongs to, does not have any policies against insuring oil and gas businesses. I believe you are well aware that continuing with oil and gas accelerates climate change, and keeps our economy dependent on dirty fuels that won’t be useful for long. It is unclear to me why ${c.branch} still considers working with oil and gas companies, when this industry threatens our health, homes, businesses - everything you, as an insurer, try to keep safe.`,
|
||||
2: `I am contacting you to raise my concerns about the coal policy of the Vienna Insurance Group, to which ${c.branch} belongs. As of today, your policy (thresholds 30%/20Mt/10GWh in countries with a coal exit strategy, no threshold in the others) still allows you to give insurance to coal companies. I am sure you perfectly know that burning coal emits greenhouse gases that contribute to the unprecedented current climate crisis, so I don’t understand why you still support this industry that threatens our health, homes, businesses - everything you, as an insurer, try to keep safe.`,
|
||||
3: `I am writing to you because I am deeply concerned about the Neptun Deep project, a gas extraction plan in the Romanian Black Sea scheduled to start drilling this year. This project would have devastating consequences for the climate, biodiversity, landscape, and local communities. ${c.branch}, as an insurer and as part of the Vienna Insurance Group, has important power in helping to stop this project: by refusing to insure it and by publicly speaking out against it.`,
|
||||
}[c.variant]}
|
||||
|
||||
According to the values you defend as a company, it seems that you should be taking environmental and social concerns seriously. As the top insurer in Central and Eastern Europe, your group has the responsibility to set a positive example and truly “protect what matters” as you promise to do.
|
||||
|
||||
${{
|
||||
1: `Therefore, I ask you, ${c.branch}, to publicly commit to stop insuring oil and gas projects or companies, and to persuade your group to do so.`,
|
||||
2: `I am consequently urging you ${c.branch} and your group to improve your coal insurance policy (thresholds 20%/10Mt /5GWh for all countries).`,
|
||||
3: `This is why I would like you, ${c.branch}, to make a public statement declaring that you do not insure the Neptun Deep project, and to urge your group to do the same.`,
|
||||
}[c.variant]}${c.isClient ? `
|
||||
|
||||
As a client of your company, I’ll have to reconsider staying with you if you do not take on more responsibility.` : ``}
|
||||
|
||||
I would appreciate it if you could respond as soon as possible.
|
||||
|
||||
Sincerely,
|
||||
${c.name}
|
||||
`);
|
||||
};
|
34
src/letter/templates/hartwig.ts
Normal file
34
src/letter/templates/hartwig.ts
Normal file
|
@ -0,0 +1,34 @@
|
|||
import type { TemplateFn } from "./types";
|
||||
|
||||
/**
|
||||
* @status done
|
||||
*/
|
||||
export const en: TemplateFn = (c) => {
|
||||
// prettier-ignore
|
||||
return (
|
||||
`${{
|
||||
1: `"I recently learned that the Vienna Insurance Group does not have any policies against insuring oil and gas businesses.
|
||||
I believe you are well aware that continuing with oil and gas accelerates climate change, and keeps our economy dependent on dirty fuels that won’t be useful for long.
|
||||
It is unclear to me why VIG still considers working with oil and gas companies, when this industry threatens our health, homes, businesses - everything you, as an insurer, try to keep safe."`,
|
||||
2: `"I am contacting you to raise my concerns about the coal policy of the Vienna Insurance Group.
|
||||
As of today, your policy (thresholds 30%/20Mt/10GWh in countries with a coal exit strategy, no threshold in the others) still allows you to give insurance to coal companies.
|
||||
I am sure you perfectly know that burning coal emits greenhouse gases that contribute to the unprecedented current climate crisis, so I don’t understand why you still support this industry that threatens our health, homes, businesses - everything you, as an insurer, try to keep safe."`,
|
||||
3: `I am writing to you because I am deeply concerned about the Neptun Deep project, a gas extraction plan in the Romanian Black Sea scheduled to start drilling this year. This project would have devastating consequences for the climate, biodiversity, landscape, and local communities. Vienna Insurance Group has important power in helping to stop this project: by refusing to insure it and by publicly speaking out against it.`,
|
||||
}[c.variant]}
|
||||
|
||||
According to the values you defend as a company, it seems that you should be taking environmental and social concerns seriously. As the top insurer in Central and Eastern Europe, your group has the responsibility to set a positive example and truly “protect what matters” as you promise to do.
|
||||
|
||||
${{
|
||||
1: `Therefore, I ask you, VIG, and all of your branches, to publicly commit to stop insuring oil and gas projects or companies.`,
|
||||
2: `I am consequently urging you, VIG and all of your branches, to improve your coal insurance policy (thresholds 20%/10Mt /5GWh for all countries).`,
|
||||
3: `This is why I would like you, VIG, to make a public statement declaring that you do not insure the Neptun Deep project.`,
|
||||
}[c.variant]}${c.isClient ? `
|
||||
|
||||
As a client of your company, I’ll have to reconsider staying with you if you do not take on more responsibility. ` : ""}
|
||||
|
||||
I would appreciate it if you could respond as soon as possible.
|
||||
|
||||
Sincerely,
|
||||
${c.name}
|
||||
`);
|
||||
};
|
35
src/letter/templates/index.ts
Normal file
35
src/letter/templates/index.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
import type { Lang } from "../../lang";
|
||||
import type { LetterOptions } from "../schema";
|
||||
import type { TemplateFn } from "./types";
|
||||
|
||||
import { en } from "./en";
|
||||
import { cs } from "./cs";
|
||||
import { sk } from "./sk";
|
||||
import { lt } from "./lt";
|
||||
|
||||
const templates: Partial<Record<Lang, TemplateFn>> = {
|
||||
en,
|
||||
cs,
|
||||
sk,
|
||||
lt,
|
||||
};
|
||||
|
||||
function getName({ firstName, lastName }: { firstName?: string; lastName?: string }) {
|
||||
return [firstName, lastName].filter(Boolean).join(" ");
|
||||
}
|
||||
|
||||
export function renderText(
|
||||
lang: Lang,
|
||||
{
|
||||
firstName,
|
||||
lastName,
|
||||
variant = "1",
|
||||
gender = "f",
|
||||
branch = "",
|
||||
isClient = false,
|
||||
}: Partial<LetterOptions>
|
||||
) {
|
||||
const name = getName({ firstName, lastName });
|
||||
const template = templates[lang] ?? en;
|
||||
return template({ name, variant, branch, gender, isClient });
|
||||
}
|
36
src/letter/templates/lt.ts
Normal file
36
src/letter/templates/lt.ts
Normal file
|
@ -0,0 +1,36 @@
|
|||
import type { TemplateFn } from "./types";
|
||||
|
||||
/**
|
||||
* @status done
|
||||
*/
|
||||
export const lt: TemplateFn = (c) => {
|
||||
// prettier-ignore
|
||||
return (
|
||||
`${{
|
||||
1: `Neseniai sužinojau, kad „Vienna Insurance Group“, kuriai priklauso „Compensa“, neturi jokios politikos dėl naftos ir dujų verslų (ne)apdraudimo.
|
||||
Viliuosi, kad jūs puikiai suprantate, jog naftos ir dujų naudojimo tęsimas greitina klimato kaitą bei laiko mūsų ekonomiką priklausoma nuo taršių kurų, kurie ilgainiui nebepasiteisins.
|
||||
Sunku suprasti, kodėl „Compensa“ vistiek planuoja dirbti kartu su naftos ir dujų kompanijomis, atsižvelgiant į tai, kad ši industrija kelia pavojų mūsų sveikatai, būstams, verslams. Tai juk yra tie dalykai, kuriuos jūs, kaip draudėjas, bandote apsaugoti.`,
|
||||
|
||||
2: `Kreipiuosi į Jus, nes noriu išreikšti susirūpinimą dėl „Vienna Insurance Group“, kurios įmonių tinklui priklauso „Compensa“, anglies politikos.
|
||||
Šiai dienai jūsų politika (30%/20Mt/10GWh riba šalyse, turinčiose anglies atsisakymo strategiją, kitose šalyse ribos nėra) vis dar leidžia apdrausti anglies įmones.
|
||||
Mano įsitikinimu puikiai žinote, jog deginant anglis išmetamos šiltnamio efektą sukeliančios dujos, kurios prisideda prie precedento neturinčios dabartinės klimato krizės, todėl nesuprantu, kodėl vis dar remiate šią pramonės šaką, kuri kelia grėsmę mūsų sveikatai, namams, verslui - viskam, ką jūs, kaip draudikas, stengiatės apsaugoti.`,
|
||||
|
||||
3: `Rašau jums, nes esu labai ${{m: `susirūpinęs`, f: `susirūpinusi`}[c.gender]} dėl „Neptun Deep“ projekto - dujų gavybos plano Rumunijos Juodojoje jūroje, kurį numatyta pradėti jau šiais metais. Šis projektas turės pražūtingų padarinių klimatui, biologinei įvairovei, kraštovaizdžiui ir vietos bendruomenėms. „Compensa“, kaip draudimo kompanija ir „Viena Insurance Group“ dalis, turi galią padėti sustabdyti šį projektą, atsisakydama jį drausti ir viešai prieš jį pasisakydama.`,
|
||||
}[c.variant]}
|
||||
|
||||
Remiantis vertybėmis, kurias ginate kaip įmonė, atrodo, kad turėtumėte rimtai atsižvelgti į aplinkosaugos ir socialines problemas. Jūsų, kaip didžiausio draudiko Vidurio ir Rytų Europoje, grupei tenka atsakomybė rodyti teigiamą pavyzdį ir, kaip žadate, iš tiesų „saugoti tai, kas svarbu“.
|
||||
|
||||
${{
|
||||
1: `TODO`,
|
||||
2: `Todėl raginu „Compensa“ ir jūsų grupę patobulinti savo anglies draudimo politiką (taikyti 20%/10Mt/5GWh ribą visoms šalims).`,
|
||||
3: `TODO`,
|
||||
}[c.variant]}${c.isClient ? `
|
||||
|
||||
Būdamas jūsų įmonės ${{m: `klientas`, f: `klientė`}[c.gender]}, turėsiu gerai apsvarstyti, ar ${{m: `juo`, f: `ja`}[c.gender]} likti, jei neprisiimsite daugiau atsakomybės.` : ``}
|
||||
|
||||
Būčiau ${{m: `dėkingas`, f: `dėkinga`}[c.gender]}, jei atsakytumėte ilgai nedelsdami.
|
||||
|
||||
Pagarbiai,
|
||||
${c.name}
|
||||
`);
|
||||
};
|
30
src/letter/templates/sk.ts
Normal file
30
src/letter/templates/sk.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import type { TemplateFn } from "./types";
|
||||
|
||||
/**
|
||||
* @status done
|
||||
*/
|
||||
export const sk: TemplateFn = (c) => {
|
||||
// prettier-ignore
|
||||
return (
|
||||
`${{
|
||||
1: `Nedávno som sa ${{m: `dozvedel`, f: `dozvedela`}[c.gender]}, že Vienna Insurance Group, do ktorej patrí ${c.branch}, nemá žiadne politiky týkajúce sa poisťovania ropných a plynárenských spoločností. Verím, že dobre viete, že pokračovanie v ťažbe ropy a plynu zrýchľuje zmenu klímy a udržiava našu ekonomiku závislú od nečistých palív, ktoré nebudú dlho užitočné. Nie je mi jasné, prečo ${c.branch} stále zvažuje spoluprácu s ropnými a plynárenskými spoločnosťami, pokiaľ dané priemyselná odvetvie ohrozuje naše zdravie, domovy, podniky - všetko, čo sa ako poisťovateľ snažíte udržať v bezpečí.`,
|
||||
2: `Kontaktujem vás, aby som ${{m: `vyjadril`, f: `vyjadrila`}[c.gender]} svoje obavy ohľadom politiky týkajúcej sa uhlia skupiny Vienna Insurance Group, ku ktorej patrí i ${c.branch}. K dnešnému dňu vaša politika (prahové hodnoty 30%/20 Mt/10 GWh v krajinách so stratégiou na ukončenie tažby a spaľovania uhlia, a žiadny prah v krajinách bez stratégie ukončenia) stále umožňuje poskytovať poistenie uhoľným spoločnostiam. Som si ${{m: `istý`, f: `istá`}[c.gender]}, že úplne viete, že spaľovanie uhlia emituje skleníkové plyny, ktoré prispievajú k bezprecedentnej súčasnej klimatickej kríze, preto nechápem, prečo stále podporujete túto priemyselnú odvetvie, ktoré ohrozuje naše zdravie, domovy, podniky - všetko, čo sa ako poisťovateľ snažíte udržať v bezpečí.`,
|
||||
3: `Píšem vám, pretože som hlboko ${{m: `znepokojený`, f: `znepokojená`}[c.gender]} projektom Neptun Deep, projekt na ťažbu plynu v rumunskom Čiernom mori, s plánovaným začiatkom ťažby v tomto roku. Tento projekt by mal devastujúce dôsledky pre klímu, biodiverzitu, krajinu a miestne komunity. ${c.branch}, ako poisťovateľ a člen skupiny Vienna Insurance Group, má dôležitú moc v tom, ako pomôcť zastaviť tento projekt: odmietnutím jeho poistenia a verejne sa proti nemu vyhradiť.`,
|
||||
}[c.variant]}
|
||||
|
||||
Podľa hodnôt, ktoré ako spoločnosť obhajujete, sa zdá, že by ste mali vážne brať ohľad na environmentálne a sociálne obavy. Ako najväčší poisťovateľ v strednej a východnej Európe má váš koncern zodpovednosť nastaviť pozitívny príklad a skutočne "chrániť to, na čom záleží", ako sľubujete.
|
||||
|
||||
${{
|
||||
1: `Preto vás, ${c.branch}, žiadam, aby ste sa verejne zaviazali zastaviť poistenie ropných a plynárenských projektov alebo spoločností a presvedčili vašu skupinu, ktorej ste súčasťou, aby tak urobila tiež.`,
|
||||
2: `Preto dôrazne žiadam vás, ${c.branch}, a vašu skupinu, aby ste vylepšili svoju politiku týkajúcu sa poisťovania uhlia (tzn. zaviesť prahové hodnoty 20%/10 Mt/5 GWh pre všetky krajiny).`,
|
||||
3: `Preto by som ${{m: `chcel`, f: `chcela`}[c.gender]}, ${c.branch}, aby ste urobili verejné vyhlásenie, v ktorom potvrdíte, že neposkytujete poistenie projektu Neptun Deep, a aby ste svoju skupinu, ktorej ste súčasťou, vyzvali k rovnakému postupu.`,
|
||||
}[c.variant]}${c.isClient ? `
|
||||
|
||||
Pokiaľ neprevezmete viacej zodpovednosti, budem musieť ako ${{m: `klient`, f: `klientka`}[c.gender]} vašej spoločnosti zvážiť, či budem naďalej využívať vaše služby.` : ``}
|
||||
|
||||
${{m: `Ocenil`, f: `Ocenila`}[c.gender]} by som, ak by ste mohli zareagovať čo najskôr.
|
||||
|
||||
S pozdravom,
|
||||
${c.name}
|
||||
`);
|
||||
};
|
11
src/letter/templates/types.ts
Normal file
11
src/letter/templates/types.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import type { LetterOptions } from "../schema";
|
||||
|
||||
export type TemplateFn = (context: TemplateContext) => string;
|
||||
|
||||
export type TemplateContext = {
|
||||
gender: string;
|
||||
branch: string;
|
||||
name: string;
|
||||
variant: string;
|
||||
isClient: boolean;
|
||||
};
|
|
@ -4,16 +4,9 @@ import { isKnownLang } from "./lang";
|
|||
export const onRequest: MiddlewareHandler = async ({ params }, next) => {
|
||||
const lang = params.lang;
|
||||
|
||||
if (lang) {
|
||||
// Unknown language returns 404
|
||||
if (!isKnownLang(lang)) {
|
||||
return new Response(null, { status: 404, statusText: "Not found" });
|
||||
}
|
||||
|
||||
// Load translations if language is other than reference language (= english)
|
||||
if (lang !== "en") {
|
||||
// TODO: load translations
|
||||
}
|
||||
// Unknown language returns 404
|
||||
if (lang && !isKnownLang(lang)) {
|
||||
return new Response(null, { status: 404, statusText: "Not found" });
|
||||
}
|
||||
|
||||
return await next();
|
||||
|
|
|
@ -7,12 +7,12 @@ import LetterBodyForm from "../../letter/LetterBodyForm.astro";
|
|||
import LetterOptionsForm from "../../letter/LetterOptionsForm.astro";
|
||||
import imgLogoVig from "../../assets/images/vig-logo.webp";
|
||||
import imgBanknotes from "../../assets/images/banknotes.webp";
|
||||
import { getEntries, getEntry } from "astro:content";
|
||||
import { getEntry } from "astro:content";
|
||||
|
||||
export { getStaticPaths } from "../../static-paths";
|
||||
|
||||
const { lang } = Astro.params;
|
||||
const t = makeT(lang);
|
||||
const { t } = makeT(lang);
|
||||
|
||||
const entry = (await getEntry("intro", lang)) ?? (await getEntry("intro", "en"));
|
||||
const { Content } = await entry.render();
|
||||
|
@ -39,13 +39,13 @@ const branches = await db
|
|||
d="M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z"
|
||||
></path>
|
||||
</svg>
|
||||
<a href="/" class="link text-xl">{t`Switch country`}</a>
|
||||
<a href="/" class="link text-xl">{t("switch_country")}</a>
|
||||
</span>
|
||||
</p>
|
||||
<div class="grid md:grid-cols-3 gap-24">
|
||||
<div class="md:col-span-2">
|
||||
<h1 class="font-display font-bold text-5xl text-balance mb-8">
|
||||
{t`Tell your local branch of Vienna Insurance Group to stop supporting fossil fuel`}
|
||||
{entry.data.title}
|
||||
</h1>
|
||||
<div class="text-xl prose">
|
||||
<Content />
|
||||
|
|
|
@ -6,10 +6,10 @@ export { getStaticPaths } from "../../static-paths";
|
|||
export const partial = true;
|
||||
|
||||
const { lang } = Astro.props;
|
||||
const t = makeT(lang);
|
||||
const { t } = makeT(lang);
|
||||
---
|
||||
|
||||
<SubmitResponseLayout
|
||||
title={t`You have already sent a message from this e-mail.`}
|
||||
description={t`You can send only one message.`}
|
||||
title={t("form_response.already_sent.title")}
|
||||
description={t("form_response.already_sent.body")}
|
||||
/>
|
||||
|
|
|
@ -6,10 +6,10 @@ export { getStaticPaths } from "../../static-paths";
|
|||
export const partial = true;
|
||||
|
||||
const { lang } = Astro.props;
|
||||
const t = makeT(lang);
|
||||
const { t } = makeT(lang);
|
||||
---
|
||||
|
||||
<SubmitResponseLayout
|
||||
title={t`We need to verify your e-mail.`}
|
||||
description={t`Follow the link we have sent to your email address.`}
|
||||
title={t("form_response.verification_required")}
|
||||
description={t("form_response.verification_follow_link")}
|
||||
/>
|
||||
|
|
Reference in a new issue