i18n: adds translation

* babel: adds a wildcard to extract txt files.
* refactor txt file
This commit is contained in:
Mojib Wali
2021-04-22 09:45:42 +02:00
committed by GitHub
parent 9af1beff88
commit 5e2a58c764
5 changed files with 98 additions and 31 deletions

View File

@@ -13,7 +13,7 @@ encoding = utf-8
# Extraction from Jinja2 templates # Extraction from Jinja2 templates
[jinja2: **/templates/**.html] [jinja2: **/templates/**.*]
encoding = utf-8 encoding = utf-8
extensions = jinja2.ext.autoescape, jinja2.ext.with_ extensions = jinja2.ext.autoescape, jinja2.ext.with_

View File

@@ -1,17 +1,11 @@
<p> <p>{{ _('Dear %(email)s!', email=user.email) }}</p>
{% trans salut=current_userprofile.full_name or user.email %}
Dear {{ salut }}! <p>{{ _('To help you get started, here are some useful links:') }}</p>
{% endtrans %}
</p>
<p> <p>
{{ _('To help you get started, here are some useful links:') }} <a href="https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.index') }}">{{ _('TU Graz Repository') }}</a> <br>
</p> <a href="https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.guide')">{{ _('Reference Guide') }}</a><br>
<a href="https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.terms')">{{ _('Terms and Conditions') }}</a> <br>
<p>
<a href="{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.index') }}"> {{ _('TU Graz Repository') }} </a> <br>
<a href="{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.guide')">{{ _('Reference Guide') }}</a><br>
<a href="{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.terms')"> {{ _('Terms and Conditions') }} </a> <br>
</p> </p>
{% if security.confirmable %} {% if security.confirmable %}

View File

@@ -1,9 +1,16 @@
{{ _('Dear %(email)s!', email=user.email) }} {{ _('Dear %(email)s!', email=user.email) }}
{{ _('To help you get started, here are some useful links:') }} {{ _('To help you get started, here are some useful links:') }}
{{ _('Repository')}}: https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.index') }} {{ _('Repository')}}
{{ _('Repository Guide')}}: https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.guide') }} https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.index') }}
{{ _('Terms And Conditions')}}: https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.terms') }}
{{ _('Repository Guide')}}
https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.guide') }}
{{ _('Terms And Conditions') }}
https://{{ config.SITE_HOSTNAME }}{{ url_for('invenio_theme_tugraz.terms') }}
{% if security.confirmable %} {% if security.confirmable %}
{{ _('You can confirm your email through the link below:') }} {{ _('You can confirm your email through the link below:') }}

View File

@@ -1,15 +1,15 @@
# German translations for invenio-config-tugraz. # German translations for invenio-config-tugraz.
# Copyright (C) 2020 Mojib Wali # Copyright (C) 2021 Mojib Wali
# This file is distributed under the same license as the # This file is distributed under the same license as the
# invenio-config-tugraz project. # invenio-config-tugraz project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020. # FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-config-tugraz 0.1.5\n" "Project-Id-Version: invenio-config-tugraz 0.5.4\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2020-10-06 09:28+0200\n" "POT-Creation-Date: 2021-04-22 09:24+0200\n"
"PO-Revision-Date: 2020-10-06 09:28+0200\n" "PO-Revision-Date: 2021-04-22 09:12+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n" "Language: de\n"
"Language-Team: de <LL@li.org>\n" "Language-Team: de <LL@li.org>\n"
@@ -17,9 +17,42 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n" "Generated-By: Babel 2.9.0\n"
#: invenio_config_tugraz/config.py:80 #: invenio_config_tugraz/config.py:87
msgid "Welcome to RDM!" msgid "Welcome to TU Graz Repository!"
msgstr "Willkommen im TU Graz Repository!"
#: invenio_config_tugraz/templates/security/email/welcome.txt:1
#, python-format
msgid "Dear %(email)s!"
msgstr "Lieber %(email)s!"
#: invenio_config_tugraz/templates/security/email/welcome.txt:3
msgid "To help you get started, here are some useful links:"
msgstr "Um Ihnen den Einstieg zu erleichtern, finden Sie hier einige nützliche Links:"
#: invenio_config_tugraz/templates/security/email/welcome.txt:5
msgid "Repository"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:8
msgid "Repository Guide"
msgstr "Handbuch"
#: invenio_config_tugraz/templates/security/email/welcome.txt:11
msgid "Terms And Conditions"
msgstr "Nutzungsbedingungen"
#: invenio_config_tugraz/templates/security/email/welcome.txt:16
msgid "You can confirm your email through the link below:"
msgstr "Sie können Ihre E-Mail über den folgenden Link bestätigen:"
#: invenio_config_tugraz/templates/security/email/welcome.txt:20
msgid "Best regards"
msgstr "Liebe grüße"
#: invenio_config_tugraz/templates/security/email/welcome.txt:21
msgid "TU Graz Repository Team"
msgstr "" msgstr ""

View File

@@ -1,24 +1,57 @@
# Translations template for invenio-config-tugraz. # Translations template for invenio-config-tugraz.
# Copyright (C) 2020 Mojib Wali # Copyright (C) 2021 Mojib Wali
# This file is distributed under the same license as the # This file is distributed under the same license as the
# invenio-config-tugraz project. # invenio-config-tugraz project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020. # FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-config-tugraz 0.1.5\n" "Project-Id-Version: invenio-config-tugraz 0.5.4\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2020-10-06 09:28+0200\n" "POT-Creation-Date: 2021-04-22 09:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n" "Generated-By: Babel 2.9.0\n"
#: invenio_config_tugraz/config.py:80 #: invenio_config_tugraz/config.py:87
msgid "Welcome to RDM!" msgid "Welcome to TU Graz Repository!"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:1
#, python-format
msgid "Dear %(email)s!"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:3
msgid "To help you get started, here are some useful links:"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:5
msgid "Repository"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:8
msgid "Repository Guide"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:11
msgid "Terms And Conditions"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:16
msgid "You can confirm your email through the link below:"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:20
msgid "Best regards"
msgstr ""
#: invenio_config_tugraz/templates/security/email/welcome.txt:21
msgid "TU Graz Repository Team"
msgstr "" msgstr ""