Files
TimeTracker/app/templates/errors/404.html
Dries Peeters 69f9f1140d feat(i18n): add translations, locale switcher, and user language preference
- Integrate Flask-Babel and i18n utilities; initialize in app factory
- Add `preferred_language` to `User` with Alembic migration (011_add_user_preferred_language)
- Add `babel.cfg` and `scripts/extract_translations.py`
- Add `translations/` for en, de, fr, it, nl, fi
- Update templates to use `_()` and add language picker in navbar/profile
- Respect locale in routes and context processors; persist user preference
- Update requirements and Docker/Docker entrypoint for Babel/gettext support
- Minor copy and style adjustments across pages

Migration: run `alembic upgrade head`
2025-09-11 23:08:41 +02:00

29 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ _('Page Not Found') }} - {{ app_name }}{% endblock %}
{% block content %}
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6 text-center">
<div class="py-5">
<i class="fas fa-exclamation-triangle fa-5x text-warning mb-4"></i>
<h1 class="display-4 text-muted">404</h1>
<h2 class="h4 mb-3">{{ _('Page Not Found') }}</h2>
<p class="text-muted mb-4">
{{ _("The page you're looking for doesn't exist or has been moved.") }}
</p>
<div class="d-grid gap-2 d-md-block">
<a href="{{ url_for('main.dashboard') }}" class="btn btn-primary">
<i class="fas fa-home"></i> {{ _('Go to Dashboard') }}
</a>
<a href="javascript:history.back()" class="btn btn-outline-secondary">
<i class="fas fa-arrow-left"></i> {{ _('Go Back') }}
</a>
</div>
</div>
</div>
</div>
</div>
{% endblock %}