Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix for mail language #1165

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/iam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
)

import structlog
from django.utils import translation
import os

logger = structlog.get_logger(__name__)

Expand Down Expand Up @@ -285,6 +287,10 @@ def _create_user(
)

logger.info("user created sucessfully", user=user)
FORCE_LANGUAGE = os.environ.get("FORCE_LANGUAGE")
if FORCE_LANGUAGE:
translation.activate(FORCE_LANGUAGE)
print("FORCE_LANGUAGE:", FORCE_LANGUAGE)

if mailing:
try:
Expand Down
Binary file modified backend/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion backend/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ msgstr ""

#: iam/models.py:279
msgid "Welcome to Ciso Assistant!"
msgstr ""
msgstr "Bienvenue sur CISO Assistant !"

#: iam/models.py:326
msgid "last name"
Expand Down
Loading