Skip to content

Commit

Permalink
✨(config) add LANGUAGE_CODE to the frontend config.json file
Browse files Browse the repository at this point in the history
The frontend was hardcoding its own default language. We need the
frontend and backend to use the same default language.
  • Loading branch information
sampaccoud committed Feb 6, 2023
1 parent ff16a32 commit 942f647
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/magnify/apps/core/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def exception_handler(exc, context):
def get_frontend_configuration(request):
"""Returns the frontend configuration dict as configured in settings."""
frontend_configuration = {
"JITSI_DOMAIN": settings.JITSI_CONFIGURATION["jitsi_domain"]
"JITSI_DOMAIN": settings.JITSI_CONFIGURATION["jitsi_domain"],
"LANGUAGE_CODE": settings.LANGUAGE_CODE,
}
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
return Response(frontend_configuration)
1 change: 1 addition & 0 deletions tests/apps/core/test_core_api_frontend_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ def test_api_get_frontend_configuration(self):
"KEYCLOAK_REALM": "magnify",
"KEYCLOAK_CLIENT_ID": "magnify-front",
"KEYCLOAK_EXPIRATION_SECONDS": 1800,
"LANGUAGE_CODE": "en",
},
)

0 comments on commit 942f647

Please sign in to comment.