Add english translations #165

This commit is contained in:
Daniel Grams 2021-04-30 15:44:08 +02:00
parent 3d3611a65f
commit bb79d80441
21 changed files with 3712 additions and 270 deletions

3
.gitignore vendored
View File

@ -53,9 +53,6 @@ coverage.xml
.hypothesis/
.pytest_cache/
# Translations
*.pot
# Flask stuff:
instance/
.webassets-cache

View File

@ -45,7 +45,13 @@ flask db upgrade
pybabel extract -F babel.cfg -o messages.pot . && pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot . && pybabel init -i messages.pot -d project/translations -l de
```
### Extract new msgid's and merge into *.po files
### Add locale
```sh
pybabel init -i messages.pot -d project/translations -l en
```
### Extract new msgid's and merge into \*.po files
```sh
pybabel extract -F babel.cfg -o messages.pot . && pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot . && pybabel update -N -i messages.pot -d project/translations

1824
messages.pot Normal file

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,8 @@ class UpdateAdminUnitForm(FlaskForm):
incoming_reference_requests_allowed = BooleanField(
lazy_gettext("Incoming reference requests allowed"),
description=lazy_gettext(
"If set, other admin units can ask this admin unit to reference their event."
"If set, other organizations can ask this organization to reference their event."
),
validators=[Optional()],
)
submit = SubmitField(lazy_gettext("Update admin unit"))
submit = SubmitField(lazy_gettext("Update organization"))

View File

@ -56,7 +56,7 @@ class BaseAdminUnitForm(FlaskForm):
class CreateAdminUnitForm(BaseAdminUnitForm):
submit = SubmitField(lazy_gettext("Create admin unit"))
submit = SubmitField(lazy_gettext("Create organization"))
class UpdateAdminUnitForm(BaseAdminUnitForm):

View File

@ -8,7 +8,7 @@ from project.forms.common import event_rating_choices
class CreateEventReferenceForm(FlaskForm):
admin_unit_id = SelectField(
lazy_gettext("Admin unit"), validators=[DataRequired()], coerce=int
lazy_gettext("Organization"), validators=[DataRequired()], coerce=int
)
rating = SelectField(
lazy_gettext("Rating"),

View File

@ -12,7 +12,7 @@ from project.models import (
class CreateEventReferenceRequestForm(FlaskForm):
admin_unit_id = SelectField(
lazy_gettext("Admin unit"), validators=[DataRequired()], coerce=int
lazy_gettext("Organization"), validators=[DataRequired()], coerce=int
)
submit = SubmitField(lazy_gettext("Save request"))

View File

@ -481,7 +481,7 @@
{% if show_admin_unit %}
<div class="card mb-3">
<div class="card-header">
{{ _('Admin unit') }}
{{ _('Organization') }}
</div>
<div class="card-body">
@ -620,7 +620,7 @@
{% if show_admin_unit %}
<div class="card mb-3">
<div class="card-body">
<h2 class="mt-0">{{ _('Admin unit') }}</h2>
<h2 class="mt-0">{{ _('Organization') }}</h2>
{% if event.admin_unit.logo_id %}
<div class="mr-4 float-sm-left">{{ render_logo(event.admin_unit.logo) }}</div>

View File

@ -16,7 +16,7 @@
<i class="fa fa-caret-right"></i>
</a>
<a href="{{ url_for('admin_admin_units') }}" class="list-group-item">
{{ _('Admin Units') }}
{{ _('Organizations') }}
<i class="fa fa-caret-right"></i>
</a>
<a href="{{ url_for('admin_users') }}" class="list-group-item">

View File

@ -1,14 +1,14 @@
{% extends "layout.html" %}
{% from "_macros.html" import render_pagination %}
{% block title %}
{{ _('Admin Units') }}
{{ _('Organizations') }}
{% endblock %}
{% block content %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('admin') }}">{{ _('Admin') }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ _('Admin Units') }}</li>
<li class="breadcrumb-item active" aria-current="page">{{ _('Organizations') }}</li>
</ol>
</nav>

View File

@ -1,11 +1,11 @@
{% extends "layout.html" %}
{% from "_macros.html" import render_field_with_errors, render_field %}
{% block title %}
{{ _('Update admin unit') }}
{{ _('Update organization') }}
{% endblock %}
{% block content %}
<h1>{{ _('Update admin unit') }}</h1>
<h1>{{ _('Update organization') }}</h1>
<form action="" method="POST">
{{ form.hidden_tag() }}

View File

@ -8,13 +8,13 @@
{% block content %}
<h1>{{ _('Create admin unit') }}</h1>
<h1>{{ _('Create organization') }}</h1>
<form action="{{ url_for('admin_unit_create') }}" method="POST" enctype="multipart/form-data">
{{ form.hidden_tag() }}
<div class="card mb-4">
<div class="card-header">
{{ _('Admin unit') }}
{{ _('Organization') }}
</div>
<div class="card-body">
{{ render_field_with_errors(form.name) }}

View File

@ -15,7 +15,7 @@
<div class="card mb-4">
<div class="card-header">
{{ _('Admin unit') }}
{{ _('Organization') }}
</div>
<div class="card-body">
{{ render_field_with_errors(form.name) }}

View File

@ -1,6 +1,6 @@
{% extends "layout.html" %}
{% block title %}
{{ _('Admin Units') }}
{{ _('Organizations') }}
{% endblock %}
{% block content %}
@ -13,9 +13,9 @@
</div>
{% endif %}
<h1>{{ _('Admin Units') }}</h1>
<h1>{{ _('Organizations') }}</h1>
<div class="my-4">
<a class="btn btn-outline-secondary my-1" href="{{ url_for('admin_unit_create') }}" role="button"><i class="fa fa-plus"></i> {{ _('Create admin unit') }}</a>
<a class="btn btn-outline-secondary my-1" href="{{ url_for('admin_unit_create') }}" role="button"><i class="fa fa-plus"></i> {{ _('Create organization') }}</a>
</div>
<div class="list-group">

View File

@ -57,7 +57,7 @@
{% endif %}
{% if admin_unit_members %}
<h2>{{ _('Admin Units') }}</h2>
<h2>{{ _('Organizations') }}</h2>
<div class="table-responsive">
<table class="table table-sm table-bordered table-hover table-striped">
<thead>

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-04-20 16:47+0200\n"
"POT-Creation-Date: 2021-04-30 15:34+0200\n"
"PO-Revision-Date: 2020-06-07 18:51+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@ -158,11 +158,11 @@ msgstr "Orte anlegen, ändern und löschen"
msgid "Scope_event:write"
msgstr "Veranstaltungen anlegen, ändern und löschen"
#: project/utils.py:10
#: project/utils.py:11
msgid "Event_"
msgstr "Event_"
#: project/utils.py:14
#: project/utils.py:15
msgid "."
msgstr "."
@ -208,7 +208,7 @@ msgstr "Eingehende Empfehlungsanfragen erlauben"
#: project/forms/admin.py:26
msgid ""
"If set, other admin units can ask this admin unit to reference their "
"If set, other organizations can ask this organization to reference their "
"event."
msgstr ""
"Wenn gesetzt, können andere Organisationen diese Organisation bitten, "
@ -216,7 +216,7 @@ msgstr ""
#: project/forms/admin.py:31 project/templates/admin/update_admin_unit.html:4
#: project/templates/admin/update_admin_unit.html:8
msgid "Update admin unit"
msgid "Update organization"
msgstr "Organisation aktualisieren"
#: project/forms/admin_unit.py:13 project/forms/event.py:33
@ -250,7 +250,7 @@ msgid "Longitude"
msgstr "Längengrad"
#: project/forms/admin_unit.py:26 project/forms/event.py:40
#: project/forms/event.py:69 project/forms/event.py:359
#: project/forms/event.py:69 project/forms/event.py:363
#: project/forms/event_place.py:25 project/forms/event_place.py:50
#: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66
#: project/forms/organizer.py:25 project/forms/organizer.py:52
@ -309,7 +309,7 @@ msgstr "Logo"
#: project/forms/admin_unit.py:59 project/templates/admin_unit/create.html:11
#: project/templates/manage/admin_units.html:18
msgid "Create admin unit"
msgid "Create organization"
msgstr "Organisation erstellen"
#: project/forms/admin_unit.py:63 project/forms/admin_unit.py:86
@ -701,7 +701,7 @@ msgid "Enter new place"
msgstr "Neuen Ort eingeben"
#: project/forms/event.py:266 project/forms/event.py:275
#: project/forms/event.py:327 project/forms/event.py:373
#: project/forms/event.py:327 project/forms/event.py:377
#: project/forms/event_suggestion.py:57 project/templates/_macros.html:463
#: project/templates/_macros.html:601 project/templates/event/create.html:83
#: project/templates/event/update.html:49
@ -788,32 +788,32 @@ msgstr "Wähle den Status der Veranstaltung."
msgid "Update event"
msgstr "Veranstaltung aktualisieren"
#: project/forms/event.py:358 project/templates/_macros.html:1115
#: project/forms/event.py:362 project/templates/_macros.html:1115
#: project/templates/event/actions.html:41
#: project/templates/event/delete.html:6
msgid "Delete event"
msgstr "Veranstaltung löschen"
#: project/forms/event.py:366 project/forms/event_date.py:15
#: project/forms/event.py:370 project/forms/event_date.py:15
#: project/forms/planing.py:14
msgid "From"
msgstr "Von"
#: project/forms/event.py:367 project/forms/event_date.py:16
#: project/forms/event.py:371 project/forms/event_date.py:16
#: project/forms/planing.py:15
msgid "to"
msgstr "bis"
#: project/forms/event.py:368 project/forms/event_date.py:17
#: project/forms/event.py:372 project/forms/event_date.py:17
msgid "Keyword"
msgstr "Stichwort"
#: project/forms/event.py:370 project/forms/event_date.py:19
#: project/forms/event.py:374 project/forms/event_date.py:19
#: project/forms/planing.py:17 project/templates/_macros.html:362
msgid "Category"
msgstr "Kategorie"
#: project/forms/event.py:376
#: project/forms/event.py:380
msgid "Find events"
msgstr "Veranstaltungen finden"
@ -959,7 +959,7 @@ msgstr "Wochentage"
#: project/templates/_macros.html:484 project/templates/_macros.html:623
#: project/templates/admin_unit/create.html:17
#: project/templates/admin_unit/update.html:18
msgid "Admin unit"
msgid "Organization"
msgstr "Organisation"
#: project/forms/reference.py:22
@ -1314,7 +1314,7 @@ msgstr "Einladungen"
#: project/templates/manage/admin_units.html:3
#: project/templates/manage/admin_units.html:16
#: project/templates/profile.html:60
msgid "Admin Units"
msgid "Organizations"
msgstr "Organisationen"
#: project/templates/admin/admin.html:23 project/templates/admin/users.html:4
@ -1660,7 +1660,7 @@ msgid "Preview"
msgstr "Vorschau"
#: project/views/admin.py:44
msgid "Admin unit successfully updated"
msgid "Organization successfully updated"
msgstr "Organisation erfolgreich aktualisiert"
#: project/views/admin.py:68 project/views/manage.py:240
@ -1672,7 +1672,7 @@ msgid "User successfully updated"
msgstr "Nutzer erfolgreich aktualisiert"
#: project/views/admin_unit.py:30
msgid "Admin unit successfully created"
msgid "Organization successfully created"
msgstr "Organisation erfolgreich erstellt"
#: project/views/admin_unit.py:56
@ -1715,23 +1715,23 @@ msgstr "Die eingegebene Email passt nicht zur Email der Einladung"
msgid "Invitation successfully deleted"
msgstr "Einladung erfolgreich gelöscht"
#: project/views/event.py:149
#: project/views/event.py:152
msgid "Event successfully created"
msgstr "Veranstaltung erfolgreich erstellt"
#: project/views/event.py:182
#: project/views/event.py:189
msgid "Event successfully updated"
msgstr "Veranstaltung erfolgreich aktualisiert"
#: project/views/event.py:204 project/views/reference.py:159
#: project/views/event.py:212 project/views/reference.py:162
msgid "Entered name does not match event name"
msgstr "Der eingegebene Name entspricht nicht dem Namen der Veranstaltung"
#: project/views/event.py:210
#: project/views/event.py:218
msgid "Event successfully deleted"
msgstr "Veranstaltung erfolgreich gelöscht"
#: project/views/event.py:342
#: project/views/event.py:352
msgid "Referenced event changed"
msgstr "Empfohlene Veranstaltung wurde geändert"
@ -1751,12 +1751,12 @@ msgstr "Der eingegebene Name entspricht nicht dem Namen des Ortes"
msgid "Place successfully deleted"
msgstr "Ort erfolgreich gelöscht"
#: project/views/event_suggestion.py:48
#: project/views/event_suggestion.py:50
msgid "Event suggestion successfully rejected"
msgstr "Veranstaltungsvorschlag erfolgreich abgelehnt"
#: project/views/event_suggestion.py:81
#: project/views/reference_request_review.py:112
#: project/views/event_suggestion.py:83
#: project/views/reference_request_review.py:114
msgid "Event review status updated"
msgstr "Prüfungsstatus aktualisiert"
@ -1776,7 +1776,7 @@ msgstr "Der eingegebene Name entspricht nicht dem Namen des OAuth2 Clients"
msgid "OAuth2 client successfully deleted"
msgstr "OAuth2 Client erfolgreich gelöscht\""
#: project/views/oauth2_token.py:27
#: project/views/oauth2_token.py:28
msgid "OAuth2 token successfully revoked"
msgstr "OAuth2 token erfolgreich widerrufen"
@ -1796,19 +1796,19 @@ msgstr "Der eingegebene Name entspricht nicht dem Namen des Veranstalters"
msgid "Organizer successfully deleted"
msgstr "Veranstalter erfolgreich gelöscht"
#: project/views/reference.py:76
#: project/views/reference.py:77
msgid "Event successfully referenced"
msgstr "Veranstaltung erfolgreich empfohlen"
#: project/views/reference.py:99
#: project/views/reference.py:101
msgid "Reference successfully updated"
msgstr "Empfehlung erfolgreich empfohlen"
#: project/views/reference.py:164
#: project/views/reference.py:167
msgid "Reference successfully deleted"
msgstr "Empfehlung erfolgreich gelöscht"
#: project/views/reference_request.py:93
#: project/views/reference_request.py:94
msgid ""
"Request successfully created. You will be notified after the other "
"organization reviews the event."
@ -1816,19 +1816,19 @@ msgstr ""
"Empfehlungsanfrage erfolgreich erstellt. Du wirst benachrichtigt, nachdem"
" die andere Organisation die Veranstaltung geprüft hat."
#: project/views/reference_request.py:125
#: project/views/reference_request.py:126
msgid "New reference request"
msgstr "Neue Empfehlungsanfrage"
#: project/views/reference_request_review.py:26
#: project/views/reference_request_review.py:28
msgid "Request already verified"
msgstr "Empfehlungsanfrage ist bereits verifiziert"
#: project/views/reference_request_review.py:49
#: project/views/reference_request_review.py:51
msgid "Reference successfully created"
msgstr "Empfehlung erfolgreich erstellt"
#: project/views/reference_request_review.py:51
#: project/views/reference_request_review.py:53
msgid "Request successfully updated"
msgstr "Empfehlungsanfrage erfolgreich aktualisiert"
@ -1865,213 +1865,3 @@ msgstr ""
msgid "New event review"
msgstr "Neue Veranstaltung zu prüfen"
#~ msgid "You"
#~ msgstr "Du"
#~ msgid "Event suggestion successfully created"
#~ msgstr "Veranstaltungsvorschlag erfolgreich erstellt"
#~ msgid "At least one of name and organization must be set"
#~ msgstr "Name oder Organisation muss gesetzt sein"
#~ msgid "Hi there!"
#~ msgstr "Moin!"
#~ msgid "Your Admin Units"
#~ msgstr "Deine Organisationen"
#~ msgid "Your Organizations"
#~ msgstr "Deine Organisationen"
#~ msgid "Select existing host or enter organizer"
#~ msgstr "Existierenden Veranstalter wählen oder Veranstalter eingeben"
#~ msgid "Suggest event"
#~ msgstr "Veranstaltung vorschlagen"
#~ msgid "Event place"
#~ msgstr "Veranstaltungsort"
#~ msgid "Event host"
#~ msgstr "Veranstalter"
#~ msgid "Contact name"
#~ msgstr "Kontakt Name"
#~ msgid "Contact email"
#~ msgstr "Kontakt Email"
#~ msgid "Event suggestions"
#~ msgstr "Veranstaltungsvorschläge"
#~ msgid "Created at"
#~ msgstr "Erstellt am"
#~ msgid "Event name"
#~ msgstr "Name"
#~ msgid "Contact"
#~ msgstr "Kontakt"
#~ msgid "New place"
#~ msgstr "Neuer Ort"
#~ msgid "Existing place"
#~ msgstr "Existierender Ort"
#~ msgid "Mark event as unverified"
#~ msgstr "Diese Veranstaltung als nicht verifiziert markieren"
#~ msgid "Mark event as verified"
#~ msgstr "Diese Veranstaltung als verifiziert markieren"
#~ msgid "Admin unit successfully updated"
#~ msgstr "Organisation erfolgreich aktualisiert"
#~ msgid "You are a member of this organization."
#~ msgstr "Du bist Mitglied dieser Organisation"
#~ msgid "Review"
#~ msgstr "Prüfung"
#~ msgid "Organization successfully created"
#~ msgstr "Organisation erfolgreich erstellt"
#~ msgid "Organization successfully updated"
#~ msgstr "Organisation erfolgreich aktualisiert"
#~ msgid "Legal name"
#~ msgstr "Offizieller Name"
#~ msgid "Create organization"
#~ msgstr "Organisation hinzufügen"
#~ msgid "Update organization"
#~ msgstr "Organisation aktualisieren"
#~ msgid "Organizations"
#~ msgstr "Organisationen"
#~ msgid "You are a member of this admin unit."
#~ msgstr "Du bist Mitglied dieser Organisation"
#~ msgid "Organization"
#~ msgstr "Organisation"
#~ msgid "Update admin unit"
#~ msgstr "Organisation aktualisieren"
#~ msgid "Other organizers can use this location"
#~ msgstr "Andere Veranstalter können diesen Ort verwenden"
#~ msgid "Event successfully created"
#~ msgstr "Veranstaltung erfolgreich erstellt"
#~ msgid "EventReviewStatus.inbox"
#~ msgstr "Ungeprüft"
#~ msgid "EventReviewStatus.verified"
#~ msgstr "Verifiziert"
#~ msgid "EventReviewStatus.rejected"
#~ msgstr "Abgelehnt"
#~ msgid "Verified"
#~ msgstr "Verifiziert"
#~ msgid "Review event"
#~ msgstr "Veranstaltung prüfen"
#~ msgid "Click here to review the event"
#~ msgstr "Klicker hier, um die Veranstaltung zu prüfen."
#~ msgid "Register"
#~ msgstr ""
#~ msgid "Successfully signed in."
#~ msgstr "Erfolgreich eingeloggt."
#~ msgid "Sign in with Google"
#~ msgstr "Mit Google anmelden"
#~ msgid ""
#~ "I confirm that I have clarified "
#~ "all information (text, images, etc.) "
#~ "that I upload into the system with"
#~ " regard to their rights of use "
#~ "and declare that they may be "
#~ "passed on."
#~ msgstr ""
#~ "Ich bestätige dass ich alle "
#~ "Informationen (Text, Bild, etc.), die "
#~ "ich in das System hochlade, hinsichtlich"
#~ " ihrer Nutzungsrechte abgeklärt habe und"
#~ " erkläre, dass diese weitergegeben werden"
#~ " dürfen."
#~ msgid "Add an optional link."
#~ msgstr "Füge einen optionalen Link hinzu."
#~ msgid "Indicate when the event will take place."
#~ msgstr "Gib an, wann die Veranstaltung stattfindet."
#~ msgid "Indicate when the event will end."
#~ msgstr "Gib an, wann die Veranstaltung endet."
#~ msgid "File"
#~ msgstr "Datei"
#~ msgid "Images only!"
#~ msgstr "Nur Bilder!"
#~ msgid "Delete image"
#~ msgstr "Bild löschen"
#~ msgid "Client"
#~ msgstr "Client"
#~ msgid "read"
#~ msgstr "Lesen"
#~ msgid "write"
#~ msgstr "Schreiben"
#~ msgid "Grant types"
#~ msgstr "Grant types"
#~ msgid "Authorization Code"
#~ msgstr "Authorization Code"
#~ msgid "Refresh Token"
#~ msgstr "Refresh Token"
#~ msgid "Response types"
#~ msgstr "Response types"
#~ msgid "Token endpoint auth method"
#~ msgstr "Token endpoint auth method"
#~ msgid "Client secret post"
#~ msgstr "Client secret post"
#~ msgid "Client secret basic"
#~ msgstr "Client secret basic"
#~ msgid "Scope_"
#~ msgstr ""
#~ msgid "Scope_read"
#~ msgstr "Lesen"
#~ msgid "Scope_write"
#~ msgstr "Schreiben"
#~ msgid "Scope_event"
#~ msgstr "Veranstaltung"
#~ msgid "Scope_organizer"
#~ msgstr "Veranstalter"
#~ msgid "Scope_place"
#~ msgstr "Ort"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ def admin_admin_unit_update(id):
try:
db.session.commit()
flash(gettext("Admin unit successfully updated"), "success")
flash(gettext("Organization successfully updated"), "success")
return redirect(url_for("admin_admin_units"))
except SQLAlchemyError as e:
db.session.rollback()

View File

@ -27,7 +27,7 @@ def admin_unit_create():
try:
insert_admin_unit_for_user(admin_unit, current_user)
flash(gettext("Admin unit successfully created"), "success")
flash(gettext("Organization successfully created"), "success")
return redirect(url_for("manage_admin_unit", id=admin_unit.id))
except SQLAlchemyError as e:
db.session.rollback()