prayers: add English translations for all prayer components

Add official Catholic English translations to all prayer components
for /faith/* routes. Prayer names on /faith/prayers are now displayed
in English. Remove unused Angelus.svelte component.
This commit is contained in:
2026-02-02 16:36:34 +01:00
parent 1a5117e8d0
commit 69293c39f9
21 changed files with 584 additions and 243 deletions

View File

@@ -17,13 +17,45 @@
import JosephGebet from "$lib/components/prayers/JosephGebet.svelte";
import Confiteor from "$lib/components/prayers/Confiteor.svelte";
let { data } = $props();
// Create language context for prayer components
createLanguageContext();
const langContext = createLanguageContext({ urlLang: data.lang });
// Update lang store when data.lang changes (e.g., after navigation)
$effect(() => {
langContext.lang.set(data.lang);
});
// Reactive isEnglish based on data.lang
const isEnglish = $derived(data.lang === 'en');
const labels = $derived({
title: isEnglish ? 'Prayers' : 'Gebete',
description: isEnglish
? 'Catholic prayers in Latin and English.'
: 'Katholische Gebete auf Deutsch und Latein.',
signOfCross: isEnglish ? 'The Sign of the Cross' : 'Das heilige Kreuzzeichen',
gloriaPatri: 'Glória Patri',
paternoster: isEnglish ? 'Our Father' : 'Paternoster',
credo: isEnglish ? 'Nicene Creed' : 'Credo',
aveMaria: isEnglish ? 'Hail Mary' : 'Ave Maria',
salveRegina: 'Salve Regina',
fatima: isEnglish ? 'Fatima Prayer' : 'Das Fatimagebet',
gloria: 'Glória',
gloriaIntro: isEnglish
? 'This ancient hymn begins with the words the angels used to celebrate the newborn Savior. It first praises God the Father, then God the Son; it concludes with homage to the Most Holy Trinity, during which one makes the sign of the cross.'
: 'Der uralte Gesang beginnt mit den Worten, mit denen die Engelscharen den neugeborenen Welterlöser feierten. Er preist zunächst Gott Vater, dann Gott Sohn; er schliesst mit einer Huldigung an die Heiligste Dreifaltigkeit, wobei man sich mit dem grossen Kreuze bezeichnet.',
michael: isEnglish ? 'Prayer to St. Michael the Archangel' : 'Gebet zum hl. Erzengel Michael',
bruderKlaus: isEnglish ? 'Prayer of St. Nicholas of Flüe' : 'Bruder Klaus Gebet',
joseph: isEnglish ? 'Prayer to St. Joseph by Pope St. Pius X' : 'Josephgebet des hl. Papst Pius X',
confiteor: isEnglish ? 'The Confiteor' : 'Das Confiteor'
});
</script>
<svelte:head>
<title>Gebete - Bocken</title>
<meta name="description" content="Katholische Gebete auf Deutsch und Latein." />
<title>{labels.title} - Bocken</title>
<meta name="description" content={labels.description} />
</svelte:head>
<style>
.ccontainer{
@@ -55,7 +87,7 @@ h1{
margin-bottom: 2rem;
}
</style>
<h1>Gebete</h1>
<h1>{labels.title}</h1>
<div class="toggle-controls">
<LanguageToggle />
@@ -64,52 +96,52 @@ h1{
<div class="ccontainer">
<div class=container>
<Gebet name={"Das heilige Kreuzzeichen"} is_bilingue={true}>
<Gebet name={labels.signOfCross} is_bilingue={true}>
<Kreuzzeichen />
</Gebet>
<Gebet name={"Glória Patri"} is_bilingue={true}>
<Gebet name={labels.gloriaPatri} is_bilingue={true}>
<GloriaPatri />
</Gebet>
<Gebet name={"Paternoster"} is_bilingue={true}>
<Gebet name={labels.paternoster} is_bilingue={true}>
<Paternoster />
</Gebet>
<Gebet name={"Credo"} is_bilingue={true}>
<Gebet name={labels.credo} is_bilingue={true}>
<Credo />
</Gebet>
<Gebet name={"Ave Maria"} is_bilingue={true}>
<Gebet name={labels.aveMaria} is_bilingue={true}>
<AveMaria />
</Gebet>
<Gebet name={"Salve Regina"} is_bilingue={true}>
<Gebet name={labels.salveRegina} is_bilingue={true}>
<SalveRegina />
</Gebet>
<Gebet name={"Das Fatimagebet"} is_bilingue={true}>
<Gebet name={labels.fatima} is_bilingue={true}>
<FatimaGebet />
</Gebet>
<Gebet name={"Glória"} is_bilingue={true}>
<p slot="intro">Der uralte Gesang beginnt mit den Worten, mit denen die Engelscharen den neugeborenen Welterlöser feierten. Er preist zunächst Gott Vater, dann Gott Sohn; er schliesst mit einer Huldigung an die Heiligste Dreifaltigkeit, wobei man sich mit dem grossen Kreuze bezeichnet.</p>
<Gebet name={labels.gloria} is_bilingue={true}>
<p slot="intro">{labels.gloriaIntro}</p>
<Gloria />
</Gebet>
<Gebet name={"Gebet zum hl. Erzengel Michael"} is_bilingue={true}>
<Gebet name={labels.michael} is_bilingue={true}>
<MichaelGebet />
</Gebet>
<Gebet name={"Bruder Klaus Gebet"} is_bilingue={false}>
<Gebet name={labels.bruderKlaus} is_bilingue={false}>
<BruderKlausGebet />
</Gebet>
<Gebet name={"Josephgebet des hl. Papst Pius X"} is_bilingue={false}>
<Gebet name={labels.joseph} is_bilingue={false}>
<JosephGebet />
</Gebet>
<Gebet name={"Das Confiteor"} is_bilingue={true}>
<Gebet name={labels.confiteor} is_bilingue={true}>
<Confiteor />
</Gebet>
</div>