From d3eb37ebff3c6d9805884b0594c911f2ef9c16db Mon Sep 17 00:00:00 2001 From: nocci Date: Tue, 29 Apr 2025 15:19:59 +0200 Subject: [PATCH] more translations fixed --- .env | 34 +++++ setup.sh | 22 ++-- steam-gift-manager/Dockerfile | 3 +- steam-gift-manager/app.py | 14 +- steam-gift-manager/requirements.txt | 1 + steam-gift-manager/static/style.css | 2 +- steam-gift-manager/templates/login.html | 2 +- steam-gift-manager/templates/redeem.html | 2 +- translate.sh | 8 +- translations/de/LC_MESSAGES/messages.mo | Bin 445 -> 445 bytes translations/de/LC_MESSAGES/messages.po | 159 +++++++++++------------ translations/en/LC_MESSAGES/messages.mo | Bin 445 -> 445 bytes translations/en/LC_MESSAGES/messages.po | 35 ++--- translations/messages.pot | 33 ++--- upgrade.sh | 10 +- 15 files changed, 170 insertions(+), 155 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..e8985d5 --- /dev/null +++ b/.env @@ -0,0 +1,34 @@ +# Flask-Configuration - Key are generated through setup.sh +SECRET_KEY="" +REDEEM_SECRET="" +WTF_CSRF_SECRET_KEY="" + +# locales +BABEL_DEFAULT_LOCALE="en" +BABEL_SUPPORTED_LOCALES="de,en" +BABEL_TRANSLATION_DIRECTORIES="translations" + +# Timezone +TZ=Europe/Berlin + +# Security +SESSION_COOKIE_SECURE="False" +CSRF_ENABLED="True" +# Account registration +REGISTRATION_ENABLED="True" + +# checking interval if keys have to be redeemed before a specific date +CHECK_EXPIRING_KEYS_INTERVAL_HOURS=6 + +# Pushover +PUSHOVER_APP_TOKEN="" +PUSHOVER_USER_KEY="" + +# Gotify +GOTIFY_URL="" +GOTIFY_TOKEN="" + +# Matrix +MATRIX_HOMESERVER="" +MATRIX_ACCESS_TOKEN="" +MATRIX_ROOM_ID="" diff --git a/setup.sh b/setup.sh index 0793758..362cdb9 100644 --- a/setup.sh +++ b/setup.sh @@ -351,7 +351,7 @@ def login(): @app.route('/register', methods=['GET', 'POST']) def register(): if not app.config['REGISTRATION_ENABLED']: - flash(_('Registrierungen sind deaktiviert'), 'danger') + flash(_('No new registrations. They are deactivated!'), 'danger') return redirect(url_for('login')) if request.method == 'POST': @@ -385,16 +385,16 @@ def change_password(): confirm_password = request.form['confirm_password'] if not check_password_hash(current_user.password, current_password): - flash(_('Aktuelles Passwort ist falsch'), 'danger') + flash(_('Current passwort is wrong'), 'danger') return redirect(url_for('change_password')) if new_password != confirm_password: - flash(_('Neue Passwörter stimmen nicht überein'), 'danger') + flash(_('New Passwords are not matching'), 'danger') return redirect(url_for('change_password')) current_user.password = generate_password_hash(new_password) db.session.commit() - flash(_('Passwort erfolgreich geändert'), 'success') + flash(_('Password changed successfully'), 'success') return redirect(url_for('index')) return render_template('change_password.html') @@ -652,15 +652,15 @@ def import_games(): db.session.commit() - flash(_('%(new)d neue Spiele importiert, %(dup)d Duplikate übersprungen', new=new_games, dup=duplicates), 'success') + flash(_('%(new)d new games imported, %(dup)d skipped duplicates', new=new_games, dup=duplicates), 'success') except Exception as e: db.session.rollback() - flash(_('Importfehler: %(error)s', error=str(e)), 'danger') + flash(_('Import error: %(error)s', error=str(e)), 'danger') return redirect(url_for('index')) - flash(_('Bitte eine gültige CSV-Datei hochladen.'), 'danger') + flash(_('Please upload a valid CSV file.'), 'danger') return render_template('import.html') @@ -1015,7 +1015,7 @@ cat < templates/base.html {% if current_user.is_authenticated %}