summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-07-18 19:53:56 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-07-18 19:53:56 +0200
commit67d756f3bd167003907c8357126630dd7c1a3cfa (patch)
treeb296b90a1f9d478596552fe469b5c5b833cc288f
parent8cb0d65e70e42180419a5dd7634d332e65488dd4 (diff)
more translationslocalization
-rwxr-xr-xlib/Travelynx.pm2
-rw-r--r--share/locales/de_DE.po118
-rw-r--r--share/locales/en_GB.po102
-rw-r--r--templates/_checked_in.html.ep8
-rw-r--r--templates/landingpage.html.ep4
-rw-r--r--templates/language.html.ep36
-rw-r--r--templates/login.html.ep10
-rw-r--r--templates/register.html.ep18
8 files changed, 203 insertions, 95 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 3b7c89c..33a8328 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -433,7 +433,7 @@ sub startup {
elsif ( my $languages = $self->req->headers->accept_language ) {
for my $lang ( split( qr{ \s* , \s* }x, $languages ) ) {
if ( $lang =~ m{ ^ de }x ) {
- push( @languages, 'en-GB' );
+ push( @languages, 'de-DE' );
}
elsif ( $lang =~ m{ ^ en }x ) {
push( @languages, 'en-GB' );
diff --git a/share/locales/de_DE.po b/share/locales/de_DE.po
index 2d34c45..7d86a42 100644
--- a/share/locales/de_DE.po
+++ b/share/locales/de_DE.po
@@ -5,7 +5,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-# Global
+#
+# Global Strings
+#
+
+msgid "button.register"
+msgstr "Registrieren"
+
+msgid "button.login"
+msgstr "Anmelden"
msgid "button.logout"
msgstr "Abmelden"
@@ -31,6 +39,10 @@ msgstr "dunkel"
msgid "footer.colour-scheme.auto"
msgstr "automatisch"
+#
+# Templates
+#
+
# account.html.ep
msgid "account.account"
@@ -81,6 +93,67 @@ msgstr "offene Anfragen"
msgid "account.interaction.disabled"
msgstr "Accounts können dir nicht folgen"
+# login.html.ep
+
+msgid "login.accept-tos-pre"
+msgstr "Mit der Anmeldung stimmst du den"
+
+msgid "login.tos"
+msgstr "Nutzungsbedingungen"
+
+msgid "login.accept-tos-post"
+msgstr "zu."
+
+msgid "login.forgot-password"
+msgstr "Passwort vergessen"
+
+msgid "login.registration-disabled"
+msgstr "Diese Instanz erlaubt derzeit keine Registrierung neuer Accounts"
+
+# register.html.ep
+
+msgid "register.name"
+msgstr "Name (alphanumerisch)"
+
+msgid "register.mail"
+msgstr "E-Mail-Adresse"
+
+msgid "register.password"
+msgstr "Passwort"
+
+msgid "register.repeat-password"
+msgstr "Passwort wiederholen"
+
+msgid "register.accept-tos-pre"
+msgstr "Mit deiner Registrierung stimmst du den"
+
+msgid "register.tos"
+msgstr "Nutzungsbedingungen"
+
+msgid "register.accept-tos-post"
+msgstr "zu."
+
+msgid "register.expect-confirmation-link"
+msgstr "Nach der Registrierung wird ein für 48 Stunden gültiger Bestätigungslink an die angegebene Mail-Adresse geschickt. Eine Anmeldung ist erst nach Bestätigung der Mail-Adresse möglich."
+
+msgid "register.why-mail"
+msgstr "Die Mail-Adresse wird ausschließlich zur Bestätigung der Anmeldung, für die „Passwort vergessen“-Funktionalität und für wichtige Informationen über den Account verwendet und nicht an Dritte weitergegeben."
+
+msgid "register.privacy-pre"
+msgstr "Die"
+
+msgid "register.privacy"
+msgstr "Datenschutzerklärung"
+
+msgid "register.privacy-post"
+msgstr "beschreibt weitere erhobene Daten sowie deren Zweck und Speicherfristen."
+
+msgid "register.account-deletion"
+msgstr "Accounts werden nach einem Jahr ohne Aktivität per E-Mail über die bevorstehende Löschung informiert und nach vier weiteren Wochen ohne Aktivität automatisch gelöscht."
+
+msgid "register.disclaimer"
+msgstr "Bitte beachten: Travelynx ist ein privat betriebenes Projekt ohne Verfügbarkeitsgarantie. Unangekündigte Downtimes oder eine kurzfristige Einstellung dieser Seite sind nicht vorgesehen, aber möglich."
+
# _public_status_card.html.ep
msgid "status.is-checked-in"
@@ -89,6 +162,9 @@ msgstr "ist unterwegs"
msgid "status.is-not-checked-in"
msgstr "ist gerade nicht eingecheckt"
+msgid "status.share"
+msgstr "Teilen"
+
msgid "status.arrival-in"
msgstr "Ankunft in"
@@ -96,7 +172,10 @@ msgid "status.arrival-soon"
msgstr "Ankunft in weniger als einer Minute"
msgid "status.arrival-unknown"
-msgstr "Arrival unbekannt"
+msgstr "Ankunft unbekannt"
+
+msgid "status.arrived"
+msgstr "Ziel erreicht"
msgid "status.carriages"
msgstr "Wagen"
@@ -117,38 +196,3 @@ msgstr "nach"
msgid "wagons.carriage"
msgstr "Wagen"
-
-# Journeys.pm#min_to_human
-
-msgid "countdown.n-weeks"
-msgstr "%d Wochen"
-
-msgid "countdown.1-week"
-msgstr "1 Woche"
-
-msgid "countdown.n-days"
-msgstr "%d Tage"
-
-msgid "countdown.1-day"
-msgstr "1 Tag"
-
-msgid "countdown.n-hours"
-msgstr "%d Stunden"
-
-msgid "countdown.1-hour"
-msgstr "1 Stunde"
-
-msgid "countdown.n-minutes"
-msgstr "%d Minuten"
-
-msgid "countdown.1-minute"
-msgstr "1 Minute"
-
-msgid "countdown.0-minutes"
-msgstr "0 Minuten"
-
-msgid "countdown.concat"
-msgstr ", "
-
-msgid "countdown.concat-last"
-msgstr " und "
diff --git a/share/locales/en_GB.po b/share/locales/en_GB.po
index 362af52..47983a3 100644
--- a/share/locales/en_GB.po
+++ b/share/locales/en_GB.po
@@ -1,11 +1,19 @@
msgid ""
msgstr ""
-"Language: de-DE\n"
+"Language: en-GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-# Global
+#
+# Global Strings
+#
+
+msgid "button.register"
+msgstr "Register"
+
+msgid "button.login"
+msgstr "Login"
msgid "button.logout"
msgstr "Logout"
@@ -31,6 +39,10 @@ msgstr "dark"
msgid "footer.colour-scheme.auto"
msgstr "auto"
+#
+# Templates
+#
+
# account.html.ep
msgid "account.account"
@@ -81,7 +93,50 @@ msgstr "open requests"
msgid "account.interaction.disabled"
msgstr "Accounts cannot follow you"
-# _public_status_card.html.ep
+# login.html.ep
+
+msgid "login.tos"
+msgstr "terms of use"
+
+msgid "login.accept-tos-pre"
+msgstr "By logging in, you accept the"
+
+msgid "login.accept-tos-post"
+msgstr " "
+
+msgid "login.forgot-password"
+msgstr "Forgot password"
+
+msgid "login.registration-disabled"
+msgstr "This instance does not allow registration of new accounts at the moment"
+
+# register.html.ep
+
+msgid "register.name"
+msgstr "Name (alphanumeric)"
+
+msgid "register.mail"
+msgstr "E-Mail address"
+
+msgid "register.password"
+msgstr "Password"
+
+msgid "register.repeat-password"
+msgstr "Repeat password"
+
+msgid "register.tos"
+msgstr "terms of use"
+
+msgid "register.accept-tos-pre"
+msgstr "By submitting this registration form, you accept the"
+
+msgid "register.accept-tos-post"
+msgstr " "
+
+msgid "register.expect-confirmation-link"
+msgstr "After submitting the registration, a confirmation link will be sent to the provided E-Mail address. Logging into the new travelynx account is only possible after following that link. The link is valid for 48 hours."
+
+# _checked_in, _public_status_card.html.ep
msgid "status.is-checked-in"
msgstr "is in transit"
@@ -89,6 +144,9 @@ msgstr "is in transit"
msgid "status.is-not-checked-in"
msgstr "ist not in transit right now"
+msgid "status.share"
+msgstr "Share"
+
msgid "status.arrival-in"
msgstr "Arrival in"
@@ -98,6 +156,9 @@ msgstr "Arrival in less than one minute"
msgid "status.arrival-unknown"
msgstr "Arrival unknown"
+msgid "status.arrived"
+msgstr "Arrived"
+
msgid "status.carriages"
msgstr "Carriages"
@@ -117,38 +178,3 @@ msgstr "towards"
msgid "wagons.carriage"
msgstr "Carriage"
-
-# Journeys.pm#min_to_human
-
-msgid "countdown.n-weeks"
-msgstr "%d Wochen"
-
-msgid "countdown.1-week"
-msgstr "1 Woche"
-
-msgid "countdown.n-days"
-msgstr "%d Tage"
-
-msgid "countdown.1-day"
-msgstr "1 Tag"
-
-msgid "countdown.n-hours"
-msgstr "%d Stunden"
-
-msgid "countdown.1-hour"
-msgstr "1 Stunde"
-
-msgid "countdown.n-minutes"
-msgstr "%d Minuten"
-
-msgid "countdown.1-minute"
-msgstr "1 Minute"
-
-msgid "countdown.0-minutes"
-msgstr "0 Minuten"
-
-msgid "countdown.concat"
-msgstr ", "
-
-msgid "countdown.concat-last"
-msgstr " und "
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index e1cefe6..c798393 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -32,13 +32,13 @@
% }
% elsif (defined $journey->{arrival_countdown}) {
% if ($journey->{arrival_countdown} > 60) {
- Ankunft in <%= journeys->min_to_human(int($journey->{arrival_countdown} / 60)) %>
+ <%= L('status.arrival-in') %> <%= journeys->min_to_human(int($journey->{arrival_countdown} / 60)) %>
% }
% elsif ($journey->{arrival_countdown} > 0) {
- Ankunft in weniger als einer Minute
+ %= L('status.arrival-soon')
% }
% else {
- Ziel erreicht
+ %= L('status.arrived')
% }
% if ($journey->{arrival_countdown} < (60 * 15) and $journey->{arr_platform}) {
% if ($journey->{arr_direction} and $journey->{arr_direction} eq 'r') {
@@ -311,7 +311,7 @@
data-url="<%= url_for('/status')->to_abs->scheme('https') %>/<%= $user->{name} %>/<%= $journey->{sched_departure}->epoch %>?token=<%= $journey->{dep_eva} %>-<%= $journey->{timestamp}->epoch % 337 %>"
% }
>
- <i class="material-icons left" aria-hidden="true">share</i> Teilen
+ <i class="material-icons left" aria-hidden="true">share</i> <%= L('status.share') %>
</a>
% }
% else {
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index 5ca0e9e..9c2ccde 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -144,9 +144,9 @@
</div>
<div class="col s10 m10 l6 center-align">
% if (not app->config->{registration}{disabled}) {
- <a href="/register" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">add</i>Registrieren</a>
+ <a href="/register" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">add</i><%= L('button.register') %></a>
% }
- <a href="/login" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">account_circle</i>Anmelden</a>
+ <a href="/login" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">account_circle</i><%= L('button.login') %></a>
</div>
<div class="col s1 m1 l3">
</div>
diff --git a/templates/language.html.ep b/templates/language.html.ep
new file mode 100644
index 0000000..75df054
--- /dev/null
+++ b/templates/language.html.ep
@@ -0,0 +1,36 @@
+<h1>Sprache</h1>
+%= form_for '/account/language' => (method => 'POST') => begin
+ %= csrf_field
+ <div class="row">
+ <div class="input-field col s12">
+ <div>
+ <label>
+ %= radio_button language => 'de-DE'
+ <span>de-DE: Deutsch (hochdeutsch)</span>
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <div>
+ <label>
+ %= radio_button language => 'en-GB'
+ <span>en-GB: English (Great Britain)</span>
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s3 m3 l3">
+ </div>
+ <div class="col s6 m6 l6 center-align">
+ <button class="btn waves-effect waves-light" type="submit" name="action" value="save">
+ Speichern
+ <i class="material-icons right">send</i>
+ </button>
+ </div>
+ <div class="col s3 m3 l3">
+ </div>
+ </div>
+%= end
diff --git a/templates/login.html.ep b/templates/login.html.ep
index 3a9cc1f..21f14d3 100644
--- a/templates/login.html.ep
+++ b/templates/login.html.ep
@@ -75,7 +75,9 @@
</div>
<div class="row">
<div class="col s12 m12 l12">
- Mit der Anmeldung stimmst du den <a href="/tos">Nutzungsbedingungen</a> zu.
+ %= L('login.accept-tos-pre')
+ <a href="/tos"><%= L('login.tos') %></a>
+ %= L('login.accept-tos-post')
</div>
</div>
<div class="row">
@@ -83,7 +85,7 @@
</div>
<div class="col s6 m6 l6 center-align">
<button class="btn waves-effect waves-light" type="submit" name="action" value="login">
- Anmelden
+ %= L('button.login')
<i class="material-icons right">send</i>
</button>
</div>
@@ -95,7 +97,7 @@
</div>
<div class="col s6 m6 l6 center-align">
<a href="/recover">
- Passwort vergessen
+ %= L('login.forgot-password')
</a>
</div>
<div class="col s3 m3 l3">
@@ -104,7 +106,7 @@
% if (app->config->{registration}{disabled}) {
<div class="row" style="margin-top: 2em;">
<div class="col s12 center-align">
- <em>Diese Instanz erlaubt derzeit keine Registrierung neuer Accounts</em>
+ <em><%= L('login.registration-disabled') %></em>
</div>
</div>
% }
diff --git a/templates/register.html.ep b/templates/register.html.ep
index f9a486a..e7064da 100644
--- a/templates/register.html.ep
+++ b/templates/register.html.ep
@@ -8,27 +8,29 @@
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">account_circle</i>
%= text_field 'user', id => 'account', class => 'validate', required => undef, pattern => '[0-9a-zA-Z_-]+', maxlength => 60, autocomplete => 'username'
- <label for="account">Name (alphanumerisch)</label>
+ <label for="account"><%= L('register.name') %></label>
</div>
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">email</i>
%= email_field 'email', id => 'email', class => 'validate', required => undef, maxlength => 250
- <label for="email">Mail-Adresse</label>
+ <label for="email"><%= L('register.mail') %></label>
</div>
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">lock</i>
%= password_field 'password', id => 'password', class => 'validate', required => undef, minlength => 8, maxlength => 10000, autocomplete => 'new-password'
- <label for="password">Passwort</label>
+ <label for="password"><%= L('register.password') %></label>
</div>
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">lock</i>
%= password_field 'password2', id => 'password2', class => 'validate', required => undef, minlength => 8, maxlength => 10000, autocomplete => 'new-password'
- <label for="password2">Passwort wiederholen</label>
+ <label for="password2"><%= L('register.repeat-password') %></label>
</div>
</div>
<div class="row">
<div class="col s12 m12 l12">
- Mit deiner Registrierung stimmst du den <a href="/tos">Nutzungsbedingungen</a> zu.
+ %= L('register.accept-tos-pre')
+ <a href="/tos"><%= L('register.tos') %></a>
+ %= L('register.accept-tos-post')
</div>
</div>
<div class="row">
@@ -36,7 +38,7 @@
</div>
<div class="col s6 m6 l6 center-align">
<button class="btn waves-effect waves-light" type="submit" name="action" value="register">
- Registrieren
+ %= L('button.register')
<i class="material-icons right">send</i>
</button>
</div>
@@ -47,9 +49,7 @@
<div class="row">
<div class="col s12">
<p>
- Nach der Registrierung wird ein für 48 Stunden gültiger
- Bestätigungslink an die angegebene Mail-Adresse geschickt. Eine
- Anmeldung ist erst nach Bestätigung der Mail-Adresse möglich.
+ %= L('register.expect-confirmation-link')
</p>
<p>
Die Mail-Adresse wird ausschließlich zur Bestätigung der Anmeldung,