diff --git a/src/models.py b/src/models.py index 2a8b38d..6f9dc71 100644 --- a/src/models.py +++ b/src/models.py @@ -43,6 +43,7 @@ class UserMeResponse(BaseModel): credits_remaining: Optional[int] = None credits_percent_used: Optional[float] = None is_global_admin: bool = False + output_language: str = "de" # Incidents (Lagen) diff --git a/src/routers/auth.py b/src/routers/auth.py index 968b690..420b815 100644 --- a/src/routers/auth.py +++ b/src/routers/auth.py @@ -216,6 +216,12 @@ async def get_me( if _staging_mode(): is_global_admin_response = False + # Org-Sprache fuer Frontend-i18n + output_language_iso = "de" + if current_user.get("tenant_id"): + from services.org_settings import get_org_language + output_language_iso = await get_org_language(db, current_user["tenant_id"]) + return UserMeResponse( id=current_user["id"], username=current_user["username"], @@ -233,6 +239,7 @@ async def get_me( read_only_reason=license_info.get("read_only_reason"), unlimited_budget=unlimited_budget, is_global_admin=is_global_admin_response, + output_language=output_language_iso, ) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 311f659..1ce0473 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -80,25 +80,25 @@
- +