diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2022-05-07 16:49:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-07 16:49:39 +0200 |
| commit | 385135accc3dae72eca09b53140d1f050d4785ba (patch) | |
| tree | 91c057e4a3983a1001a0ef8c55abe5b809ec4deb /searx/webapp.py | |
| parent | 8511a1c125879a8a9aaaf215267f5ef6d090a5cc (diff) | |
| parent | 550f70b1aabd377ace73a011024eaa4ea13ffab4 (diff) | |
Merge pull request #1179 from searxng/translations_update
Update translations
Diffstat (limited to 'searx/webapp.py')
| -rwxr-xr-x | searx/webapp.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 648a49ebe..3d3f736a5 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -220,6 +220,9 @@ def _get_translations(): if has_request_context() and request.form.get('use-translation') == 'oc': babel_ext = flask_babel.current_app.extensions['babel'] return Translations.load(next(babel_ext.translation_directories), 'oc') + if has_request_context() and request.form.get('use-translation') == 'szl': + babel_ext = flask_babel.current_app.extensions['babel'] + return Translations.load(next(babel_ext.translation_directories), 'szl') return _flask_babel_get_translations() @@ -238,6 +241,9 @@ def get_locale(): if locale == 'oc': request.form['use-translation'] = 'oc' locale = 'fr_FR' + if locale == 'szl': + request.form['use-translation'] = 'szl' + locale = 'pl' if locale == '': # if there is an error loading the preferences # the locale is going to be '' |