Add empty translations for de and es
This commit is contained in:
parent
6d17603016
commit
d178664d0c
7 changed files with 222 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
|||
# (venv) $ pybabel compile -d snappass/translations
|
||||
# Add a new language:
|
||||
# (venv) $ pybabel extract -F babel.cfg -o messages.pot .
|
||||
# (venv) $ pybabel init -i messages.pot -d snapppass/translations -l <language_code>
|
||||
# (venv) $ pybabel init -i messages.pot -d snappass/translations -l <language_code>
|
||||
[python: snappass/**.py]
|
||||
[jinja2: snappass/templates/**.html]
|
||||
|
||||
|
|
|
@ -5,3 +5,4 @@ Jinja2==3.1.2
|
|||
MarkupSafe==2.1.1
|
||||
redis==5.0.1
|
||||
Werkzeug==3.0.1
|
||||
flask-babel
|
||||
|
|
|
@ -27,7 +27,7 @@ app.config.update(
|
|||
|
||||
# Set up Babel
|
||||
def get_locale():
|
||||
return request.accept_languages.best_match(['en', 'nl'])
|
||||
return request.accept_languages.best_match(['en', 'es', 'de', 'nl'])
|
||||
babel = Babel(app, locale_selector=get_locale)
|
||||
|
||||
# Initialize Redis
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ lang }}">
|
||||
<html lang="{{ _('en') }}">
|
||||
<head>
|
||||
<title>{{ _('Snappass - Share Secrets') }}</title>
|
||||
<meta charset="UTF-8">
|
||||
|
|
106
snappass/translations/de/LC_MESSAGES/messages.po
Normal file
106
snappass/translations/de/LC_MESSAGES/messages.po
Normal file
|
@ -0,0 +1,106 @@
|
|||
# German translations for PROJECT.
|
||||
# Copyright (C) 2024 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2024-02-16 10:38+0100\n"
|
||||
"PO-Revision-Date: 2024-02-16 09:29+0100\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: de\n"
|
||||
"Language-Team: de <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.14.0\n"
|
||||
|
||||
#: snappass/templates/base.html:2
|
||||
msgid "en"
|
||||
msgstr "de"
|
||||
|
||||
#: snappass/templates/base.html:4
|
||||
msgid "Snappass - Share Secrets"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/base.html:16
|
||||
msgid "Share Secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/confirm.html:6
|
||||
msgid "Share Secret Link"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/confirm.html:7
|
||||
msgid ""
|
||||
"The secret has been temporarily saved. Send the following URL to your "
|
||||
"intended recipient."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/confirm.html:14
|
||||
msgid "Copy to clipboard"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/expired.html:6
|
||||
msgid "Secret not found"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/expired.html:7
|
||||
msgid ""
|
||||
"The requested URL was not found on the server. This could be because this"
|
||||
" URL never contained a secret, or because it expired or was revealed "
|
||||
"earlier."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/expired.html:8
|
||||
msgid ""
|
||||
"If this URL was sent to you by someone, make sure to check your spelling "
|
||||
"or ask the person who sent it to you to send a new secret."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/preview.html:7
|
||||
msgid "Secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/preview.html:9
|
||||
msgid "You can only reveal the secret once!"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/preview.html:12
|
||||
msgid "Reveal secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:6
|
||||
msgid "Set Secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:12
|
||||
msgid ""
|
||||
"SnapPass allows you to share secrets in a secure, ephemeral way. Input a "
|
||||
"single or multi-line secret, its expiration time, and click Generate URL."
|
||||
" Share the one-time use URL with your intended recipient."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:18
|
||||
msgid "Two Weeks"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:19
|
||||
msgid "Week"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:20
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:21
|
||||
msgid "Hour"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:26
|
||||
msgid "Generate URL"
|
||||
msgstr ""
|
||||
|
106
snappass/translations/es/LC_MESSAGES/messages.po
Normal file
106
snappass/translations/es/LC_MESSAGES/messages.po
Normal file
|
@ -0,0 +1,106 @@
|
|||
# Spanish translations for PROJECT.
|
||||
# Copyright (C) 2024 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2024-02-16 10:38+0100\n"
|
||||
"PO-Revision-Date: 2024-02-16 09:29+0100\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: es\n"
|
||||
"Language-Team: es <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.14.0\n"
|
||||
|
||||
#: snappass/templates/base.html:2
|
||||
msgid "en"
|
||||
msgstr "es"
|
||||
|
||||
#: snappass/templates/base.html:4
|
||||
msgid "Snappass - Share Secrets"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/base.html:16
|
||||
msgid "Share Secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/confirm.html:6
|
||||
msgid "Share Secret Link"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/confirm.html:7
|
||||
msgid ""
|
||||
"The secret has been temporarily saved. Send the following URL to your "
|
||||
"intended recipient."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/confirm.html:14
|
||||
msgid "Copy to clipboard"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/expired.html:6
|
||||
msgid "Secret not found"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/expired.html:7
|
||||
msgid ""
|
||||
"The requested URL was not found on the server. This could be because this"
|
||||
" URL never contained a secret, or because it expired or was revealed "
|
||||
"earlier."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/expired.html:8
|
||||
msgid ""
|
||||
"If this URL was sent to you by someone, make sure to check your spelling "
|
||||
"or ask the person who sent it to you to send a new secret."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/preview.html:7
|
||||
msgid "Secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/preview.html:9
|
||||
msgid "You can only reveal the secret once!"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/preview.html:12
|
||||
msgid "Reveal secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:6
|
||||
msgid "Set Secret"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:12
|
||||
msgid ""
|
||||
"SnapPass allows you to share secrets in a secure, ephemeral way. Input a "
|
||||
"single or multi-line secret, its expiration time, and click Generate URL."
|
||||
" Share the one-time use URL with your intended recipient."
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:18
|
||||
msgid "Two Weeks"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:19
|
||||
msgid "Week"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:20
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:21
|
||||
msgid "Hour"
|
||||
msgstr ""
|
||||
|
||||
#: snappass/templates/set_password.html:26
|
||||
msgid "Generate URL"
|
||||
msgstr ""
|
||||
|
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2024-02-14 21:09+0100\n"
|
||||
"POT-Creation-Date: 2024-02-16 10:38+0100\n"
|
||||
"PO-Revision-Date: 2024-02-14 21:16+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: nl\n"
|
||||
|
@ -18,9 +18,13 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.14.0\n"
|
||||
|
||||
#: snappass/templates/base.html:2
|
||||
msgid "en"
|
||||
msgstr "nl"
|
||||
|
||||
#: snappass/templates/base.html:4
|
||||
msgid "Snappass - Share Secrets"
|
||||
msgstr ""
|
||||
msgstr "Snappass - Deel Wachtwoorden"
|
||||
|
||||
#: snappass/templates/base.html:16
|
||||
msgid "Share Secret"
|
||||
|
|
Loading…
Reference in a new issue