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 f2404c0 commit bb9d433
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 @@ -5,6 +5,7 @@
import {ResolvablePromise} from '$lib/resolvable-promise';
import {_loadApiStats, type GlobalStats} from './+page';

Check failure on line 7 in frontend/src/routes/+page.svelte

View workflow job for this annotation

GitHub Actions / Run eslint

There should be at least one empty line between import groups
import {i18n} from '$lib/i18n';

Check failure on line 8 in frontend/src/routes/+page.svelte

View workflow job for this annotation

GitHub Actions / Run eslint

`$lib/i18n` import should occur before import of `$lib/resolvable-promise`
let stats = new ResolvablePromise<GlobalStats>();
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 bb9d433

Please sign in to comment.