Skip to content

Commit

Permalink
The error is handle in get_current_locale directly (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Sep 14, 2021
1 parent 49d9c0d commit 3c905c1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions jupyterlab_server/settings_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ def get(self, schema_name=""):
"""Get setting(s)"""
# Need to be update here as translator locale is not change when a new locale is put
# from frontend
try:
locale = self.get_current_locale()
except web.HTTPError as e:
# fallback in case of missing (404) or misshapen (500) translation schema
locale = DEFAULT_LOCALE
'Failed loading or validating translation settings schema'

locale = self.get_current_locale()
translator.set_locale(locale)

result, warnings = get_settings(
Expand Down

0 comments on commit 3c905c1

Please sign in to comment.