* fix i18n

* Ignore linter error regarding _
This commit is contained in:
Viktor Haid 2024-09-11 19:51:17 +02:00 committed by GitHub
parent 5745dd40f1
commit c13e80bf2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View file

@ -11,10 +11,13 @@ WORKDIR $APP_DIR
COPY ["setup.py", "requirements.txt", "MANIFEST.in", "README.rst", "AUTHORS.rst", "$APP_DIR/"]
COPY ["./snappass", "$APP_DIR/snappass"]
RUN pip install -r requirements.txt
RUN pybabel compile -d snappass/translations
RUN python setup.py install && \
chown -R snappass $APP_DIR && \
chgrp -R snappass $APP_DIR
RUN pip install -r requirements.txt
USER snappass

View file

@ -1,3 +1,4 @@
include *.rst LICENSE
recursive-include snappass/static *
recursive-include snappass/templates *
recursive-include snappass/translations *

View file

@ -11,7 +11,8 @@ from urllib.parse import quote_plus
from urllib.parse import unquote_plus
from urllib.parse import urljoin
from distutils.util import strtobool
from flask_babel import Babel
# _ is required to get the Jinja templates translated
from flask_babel import Babel, _ # noqa: F401
NO_SSL = bool(strtobool(os.environ.get('NO_SSL', 'False')))
URL_PREFIX = os.environ.get('URL_PREFIX', None)