diff options
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/config.py | 19 | ||||
-rw-r--r-- | fatcat_scholar/web.py | 20 |
2 files changed, 19 insertions, 20 deletions
diff --git a/fatcat_scholar/config.py b/fatcat_scholar/config.py index 86870bc..43b03a3 100644 --- a/fatcat_scholar/config.py +++ b/fatcat_scholar/config.py @@ -10,3 +10,22 @@ settings = Dynaconf( GIT_REVISION = ( subprocess.check_output(["git", "describe", "--always"]).strip().decode("utf-8") ) + +I18N_LANG_OPTIONS = [ + "ar", + "de", + "el", + "es", + "en", + "fa", + "fr", + "hr", + "it", + "ko", + "nb", + "nl", + "pt", + "ru", + "zh", +] +assert settings.I18N_LANG_DEFAULT in I18N_LANG_OPTIONS diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index 1e04400..73088d6 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -45,26 +45,6 @@ from fatcat_scholar.search import ( logger = logging.getLogger() -I18N_LANG_TRANSLATIONS = [ - "ar", - "de", - "el", - "es", - "fa", - "fr", - "hr", - "it", - "ko", - "nb", - "nl", - "pt", - "ru", - "zh", -] -I18N_LANG_OPTIONS = I18N_LANG_TRANSLATIONS + [ - settings.I18N_LANG_DEFAULT, -] - class LangPrefix: """ |