Skip to content

Commit

Permalink
Make all strings translateable, translate to German
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed May 19, 2024
1 parent f4bf8da commit 6ffaba2
Show file tree
Hide file tree
Showing 21 changed files with 666 additions and 257 deletions.
78 changes: 61 additions & 17 deletions frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,67 @@
</div>
<div id="navbar-contents" class="navbar-menu" class:is-active={menuOpened}>
<div class="navbar-start">
<NavbarItem text="Home" href="/" {closeMenu} />
<NavbarItem text={$i18n.t('navigation.home', 'Home')} href="/" {closeMenu} />
{#if $loginState?.username}
<NavbarItem text="My Gliders" href="/gliders/" {closeMenu} />
<NavbarItem text="My Locations" href="/locations/" {closeMenu} />
<NavbarItem text="My Flights" href="/flights/" {closeMenu} />
<NavbarItem text="Stats" href="/stats/" {closeMenu} />
<NavbarItem text="Submit flight" href="/flights/add/" {closeMenu} />
<NavbarItem
text={$i18n.t('navigation.gliders', 'My Gliders')}
href="/gliders/"
{closeMenu}
/>
<NavbarItem
text={$i18n.t('navigation.locations', 'My Locations')}
href="/locations/"
{closeMenu}
/>
<NavbarItem
text={$i18n.t('navigation.flights', 'My Flights')}
href="/flights/"
{closeMenu}
/>
<NavbarItem text={$i18n.t('navigation.stats', 'Stats')} href="/stats/" {closeMenu} />
<NavbarItem
text={$i18n.t('navigation.submit', 'Submit flight')}
href="/flights/add/"
{closeMenu}
/>
{:else}
<NavbarItem text="Screenshots" href="/screenshots/" {closeMenu} />
<NavbarItem
text={$i18n.t('navigation.screenshots', 'Screenshots')}
href="/screenshots/"
{closeMenu}
/>
{/if}
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
{#if $loginState?.username}
<NavbarItem text="Profile" href="/profile/" type="button" {closeMenu} />
<NavbarItem
text="Logout"
text={$i18n.t('navigation.profile', 'Profile')}
href="/profile/"
type="button"
{closeMenu}
/>
<NavbarItem
text={$i18n.t('navigation.logout', 'Logout')}
href="/auth/logout/"
type="button"
reload={true}
{closeMenu}
/>
{:else}
<NavbarItem text="Login" href="/auth/login/" type="button" {closeMenu} />
<NavbarItem text="Register" href="/auth/registration/" type="button" {closeMenu} />
<NavbarItem
text={$i18n.t('navigation.login', 'Login')}
href="/auth/login/"
type="button"
{closeMenu}
/>
<NavbarItem
text={$i18n.t('navigation.register', 'Register')}
href="/auth/registration/"
type="button"
{closeMenu}
/>
{/if}
</div>
</div>
Expand Down Expand Up @@ -112,12 +147,21 @@
<!-- Footer -->
<footer class="section">
<div class="container">
&copy; 2019&ndash;2024 Danilo Bargen | <a href="https://github.com/dbrgn/flugbuech"
>Source Code</a
>
| <a href="https://github.com/dbrgn/flugbuech/issues">Bug reports and feature requests</a> |
<a href="/privacy-policy/">Privacy Policy</a>
| <a href="mailto:flugbuech@bargen.dev">Contact</a>
&copy; 2019&ndash;2024 Danilo Bargen | <a href="https://github.com/dbrgn/flugbuech">
{$i18n.t('layout.sourcecode', 'Source Code')}
</a>
|
<a href="https://github.com/dbrgn/flugbuech/issues">
{$i18n.t('layout.issue-tracker', 'Issue Tracker')}
</a>
|
<a href="/privacy-policy/">
{$i18n.t('layout.privacy-policy', 'Privacy Policy')}
</a>
|
<a href="mailto:flugbuech@bargen.dev">
{$i18n.t('layout.contact', 'Contact')}
</a>
</div>
</footer>

Expand Down
168 changes: 79 additions & 89 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,162 +20,152 @@

<article class="message is-primary">
<div class="message-header">
<p>Update March 2024</p>
<p>{$i18n.t('home.title--update-march-2024')}</p>
</div>
<div class="message-body">
After a longer development break, the complete Flugbuech UI has been rewritten from scratch! It
should still look (mostly) the same, but it should react faster for you and be easier to
maintain and extend for me. If you have any feedback (positive or negative), contact me at
<a href="mailto:flugbuech@bargen.dev">flugbuech@bargen.dev</a> (German or English)!
<SubstitutableText text={$i18n.t('home.news.2024-03-13')}>
<a slot="1" href="mailto:flugbuech@bargen.dev" let:text>{text}</a>
</SubstitutableText>
</div>
</article>

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

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

<div class="content">
<p>What is <em>Flugbuech</em> exactly?</p>
<SubstitutableText text={$i18n.t('home.prose--what-is')}>
<em slot="1" let:text>{text}</em>
</SubstitutableText>
<ul>
<li>
It's a simple, clean and modern <strong>web based flight log</strong> for paragliding and hang
gliding pilots.
<SubstitutableText text={$i18n.t('home.prose--what-is-summary')}>
<strong slot="1" let:text>{text}</strong>
</SubstitutableText>
</li>
<li>
The goal: Logging flights should be <strong>as effortless as possible</strong>. I achieve that
by parsing everything I can get from an IGC file (generated by your variometer). By uploading
an IGC file, the tool can extract launch site, landing site, flight distance, flight duration,
etc. (But of course you can also log flights manually without an IGC file.)
<SubstitutableText text={$i18n.t('home.prose--what-is-goal')}>
<strong slot="1" let:text>{text}</strong>
</SubstitutableText>
</li>
<li>
Additionally, you can <strong>record useful information about the flight</strong>: Comment,
XContest URL, whether or not it was hike&fly, links to YouTube videos from that flight, etc.
<SubstitutableText text={$i18n.t('home.prose--what-is-additional-information')}>
<strong slot="1" let:text>{text}</strong>
</SubstitutableText>
</li>
<li>
It also provides some <strong>nice statistics</strong>: How many flights and flight hours do
you have per year? What are your most frequented flying sites? How many flight hours do you
have on a specific glider? etc.
<SubstitutableText text={$i18n.t('home.prose--what-is-stats')}>
<strong slot="1" let:text>{text}</strong>
</SubstitutableText>
</li>
<li>
I'm developing the tool primarily for myself, and for the free flight community. There are
<strong>no ads, and no tracking</strong>.
<SubstitutableText text={$i18n.t('home.prose--what-is-no-ads')}>
<strong slot="1" let:text>{text}</strong>
</SubstitutableText>
</li>
</ul>
</div>

<p class="content">
To see what it looks like, check out <a href="/screenshots/">the screenshtos</a>. You can find the
list of features and the current project status
<a href="https://github.com/dbrgn/flugbuech#status">on the project GitHub page</a>.
<SubstitutableText text={$i18n.t('home.prose--screenshots')}>
<a slot="1" href="/screenshots/" let:text>{text}</a>
<a slot="2" href="https://github.com/dbrgn/flugbuech#status" let:text>{text}</a>
</SubstitutableText>
</p>

<h3 class="title is-size-3">FAQ</h3>
<h3 class="title is-size-3">{$i18n.t('home.title--faq')}</h3>

<h4 class="title is-size-5">Is it free?</h4>
<h4 class="title is-size-5">{$i18n.t('home.faq.is-it-free')}</h4>
<p class="content">
Yes, and there are no ads and no user tracking! Usually free things have a catch, but in this case
I'm developing the flight log for my own needs, and others may use it too.
{$i18n.t('home.faq.is-it-free-answer-1')}
</p>

<h4 class="title is-size-5">Can I sign up?</h4>
<h4 class="title is-size-5">{$i18n.t('home.faq.signup')}</h4>
<p class="content">
Sure thing! Feel free to <a href="/auth/registration"> create an account</a>.
<SubstitutableText text={$i18n.t('home.faq.signup--answer-1')}>
<a slot="1" href="/auth/registration/" let:text>{text}</a>
</SubstitutableText>
</p>
<p class="content">
Keep in mind that this is still beta software and that there may be bugs. If you notice any
problems or have ideas for new features, please let me know at
<a href="mailto:flugbuech@bargen.dev">flugbuech@bargen.dev</a>.
<SubstitutableText text={$i18n.t('home.faq.signup--answer-2')}>
<a slot="1" href="mailto:flugbuech@bargen.dev" let:text>{text}</a>
</SubstitutableText>
</p>

<h4 class="title is-size-5">Can I import or export flights?</h4>
<h4 class="title is-size-5">{$i18n.t('home.faq.import')}</h4>
<p class="content">
Data import from CSV <a href="/flights/import/csv/">is possible</a>. Export is not yet
implemented.
<SubstitutableText text={$i18n.t('home.faq.import--answer-1')}>
<a slot="1" href="/flights/import/csv/" let:text>{text}</a>
</SubstitutableText>
</p>

<h4 class="title is-size-5">Where can I find the source code or report bugs?</h4>
<h4 class="title is-size-5">
{$i18n.t('home.faq.source')}
</h4>
<p class="content">
On <a href="https://github.com/dbrgn/flugbuech">GitHub</a>. If you don't have a GitHub account,
you can also <a href="mailto:flugbuech@bargen.dev">e-mail me</a>.
<SubstitutableText text={$i18n.t('home.faq.source-answer-1')}>
<a slot="1" href="https://github.com/dbrgn/flugbuech" let:text>{text}</a>
<a slot="2" href="mailto:flugbuech@bargen.dev" let:text>{text}</a>
</SubstitutableText>
</p>

<h4 class="title is-size-5">What does &laquo;Flugbuech&raquo; mean?</h4>
<h4 class="title is-size-5">{$i18n.t('home.faq.name')}</h4>
<p class="content">
It's <a href="https://en.wikipedia.org/wiki/Swiss_German">Swiss German</a> for &laquo;Flight Log&raquo;.
Sorry for not being more creative 🙃
<SubstitutableText text={$i18n.t('home.faq.name-answer-1')}>
<a slot="1" href="https://en.wikipedia.org/wiki/Swiss_German" let:text>{text}</a>
</SubstitutableText>
</p>

<h3 class="title is-size-3">News</h3>
<h3 class="title is-size-3">{$i18n.t('home.title--news')}</h3>
<h4 class="title is-size-5">2024</h4>
<ul class="content">
<li>
<strong>14.5.</strong> The <a href="/locations">location list</a> now shows an overview map of all
locations you've been to (launch or landing locations).
</li>
<li>
<strong>1.4.</strong> Do you have a lot of old flights logged in a spreadsheet application (like
Excel or Google Sheets), and don't want to type all this information into Flugbuech by hand? In
that case, try the new <a href="/flights/import/csv/">CSV import</a>!
<strong>14.5.</strong>
<SubstitutableText text={$i18n.t('home.news.2024-05-14')}>
<a slot="1" href="/locations/" let:text>{text}</a>
</SubstitutableText>
</li>
<li>
<strong>19.3.</strong> You can now opt-in to an occasional newsletter
<a href="/profile/">in your user profile</a>.
<strong>1.4.</strong>
<SubstitutableText text={$i18n.t('home.news.2024-04-01')}>
<a slot="1" href="/flights/import/csv/" let:text>{text}</a>
</SubstitutableText>
</li>
<li>
<strong>13.3.</strong> After a longer development break, the complete Flugbuech UI has been
rewritten from scratch! It should still look (mostly) the same, but it should react faster for
you and be easier to maintain and extend for me. If you have any feedback (positive or
negative), contact me at <a href="mailto:flugbuech@bargen.dev">flugbuech@bargen.dev</a> (German or
English)!
<strong>19.3.</strong>
<SubstitutableText text={$i18n.t('home.news.2024-03-19')}>
<a slot="1" href="/profile/" let:text>{text}</a>
</SubstitutableText>
</li>
</ul>
<h4 class="title is-size-5">2023</h4>
<ul class="content">
<li>
<strong>21.12.</strong> There is now a <a href="/privacy-policy/">privacy policy</a>
<strong>13.3.</strong>
<SubstitutableText text={$i18n.t('home.news.2024-03-13')}>
<a slot="1" href="mailto:flugbuech@bargen.dev" let:text>{text}</a>
</SubstitutableText>
</li>
</ul>
<h4 class="title is-size-5">2021</h4>
<h4 class="title is-size-5">2019­–2023</h4>
<ul class="content">
<li><strong>20.9.</strong> User registration is implemented</li>
<li>
<strong>20.4.</strong> Locations can now be viewed and deleted, number of associated flights is listed
<strong>2023</strong>
{$i18n.t('home.news.2023')}
</li>
<li>
<strong>19.4.</strong> Location editing now supports
<a href="https://www.swisstopo.admin.ch/de/karten-daten-online/karten-geodaten-online.html"
>Swisstopo</a
> maps
<strong>2021</strong>
{$i18n.t('home.news.2021')}
</li>
</ul>
<h4 class="title is-size-5">2020</h4>
<ul class="content">
<li><strong>25.9.</strong> Show stats (flights, flight hours) for gliders</li>
<li>
<strong>11.7.</strong> Allow marking flights as hike&amp;fly, allow deleting flights, enhance stats
<strong>2020</strong>
{$i18n.t('home.news.2020')}
</li>
<li>
<strong>10.7.</strong> Your own password
<a href="/auth/password/change/">can now be changed</a>
<strong>2019</strong>
{$i18n.t('home.news.2019')}
</li>
<li><strong>14.6.</strong> Allow editing your gliders</li>
<li>
<strong>12.6.</strong> Statistics about your flights have been added! Check out
<a href="/stats/">/stats/</a>.
</li>
</ul>
<h4 class="title is-size-5">2019</h4>
<ul class="content">
<li><strong>18.12.</strong> IGC files from XContest can now be parsed properly</li>
</ul>

<h3 class="title is-size-3">Stats</h3>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/routes/auth/password/change/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Flashes from '$lib/components/Flashes.svelte';
import MessageModal from '$lib/components/MessageModal.svelte';
import {MIN_PASSWORD_LENGTH} from '$lib/constants';
import {i18n} from '$lib/i18n';
import {addFlash, loginState} from '$lib/stores';
import {reactive} from '$lib/svelte';
Expand Down Expand Up @@ -127,8 +128,8 @@

<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/profile/">Profile</a></li>
<li><a href="/">{$i18n.t('navigation.home')}</a></li>
<li><a href="/profile/">{$i18n.t('navigation.profile')}</a></li>
<li class="is-active"><a href="./" aria-current="page">Change Password</a></li>
</ul>
</nav>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/routes/flights/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import MessageModal from '$lib/components/MessageModal.svelte';
import XContestSummary from '$lib/components/XContestSummary.svelte';
import {formatDate, formatDistance, formatDuration} from '$lib/formatters';
import {i18n} from '$lib/i18n';
import {addFlash} from '$lib/stores';
import {goto, invalidateAll} from '$app/navigation';
Expand Down Expand Up @@ -121,8 +122,8 @@

<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li><a href="/">Home</a></li>
<li class="is-active"><a href="./" aria-current="page">Flights</a></li>
<li><a href="/">{$i18n.t('navigation.home')}</a></li>
<li class="is-active"><a href="./" aria-current="page">{$i18n.t('navigation.flights')}</a></li>
</ul>
</nav>

Expand Down
Loading

0 comments on commit 6ffaba2

Please sign in to comment.