Skip to content

Commit

Permalink
Translate some strings on home page
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed May 18, 2024
1 parent aad11f6 commit 534a4ae
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<div class="container">
<h1 class="title">Flugbuech</h1>
<p class="subtitle">
{$i18n.t('welcome', 'Welcome, {name}!', {name: $loginState?.username || 'Guest'})}
{$i18n.t('layout.welcome', 'Welcome, {name}!', {name: $loginState?.username || 'Guest'})}
</p>
</div>
</header>
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import {onMount} from 'svelte';
import Flashes from '$lib/components/Flashes.svelte';
import {i18n} from '$lib/i18n';
import {ResolvablePromise} from '$lib/resolvable-promise';
import {_loadApiStats, type GlobalStats} from './+page';
Expand All @@ -28,11 +29,13 @@
</div>
</article>

<h2 class="title is-size-2">Overview</h2>
<h2 class="title is-size-2">{$i18n.t('home.title--overview', 'Overview')}</h2>

<p class="content">
Welcome to <em>Flugbuech</em>! This is a free, open source and ad-free platform for keeping track
of your free flights (paragliding or hang gliding).
{$i18n.t(
'home.intro',
'Welcome to Flugbuech! This is a free, open source and ad-free platform for keeping track of your free flights (paragliding or hang gliding).',
)}
</p>

<div class="content">
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/translations/de/translation.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"welcome": "Willkommen, {name}!"
"layout": {
"welcome": "Willkommen, {name}!"
},
"home": {
"intro": "Willkommen zu Flugbuech! Dies ist eine kostenlose, quelloffene und werbefreie Plattform zur Eintragung deiner Gleitschirm- und Drachenflüge.",
"title--overview": "Überblick"
}
}
8 changes: 7 additions & 1 deletion frontend/src/translations/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"welcome": "Welcome, {name}!"
"layout": {
"welcome": "Welcome, {name}!"
},
"home": {
"intro": "Welcome to Flugbuech! This is a free, open source and ad-free platform for keeping track of your free flights (paragliding or hang gliding).",
"title--overview": "Overview"
}
}

0 comments on commit 534a4ae

Please sign in to comment.