mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
default to 'en' in celery #51
This commit is contained in:
parent
7867b5b346
commit
15a86d0f84
1 changed files with 10 additions and 7 deletions
|
@ -20,13 +20,16 @@ from config import Config
|
||||||
|
|
||||||
|
|
||||||
def get_locale():
|
def get_locale():
|
||||||
if session.get('ui_language', None):
|
try:
|
||||||
return session['ui_language']
|
if session.get('ui_language', None):
|
||||||
else:
|
return session['ui_language']
|
||||||
try:
|
else:
|
||||||
return request.accept_languages.best_match(current_app.config['LANGUAGES'])
|
try:
|
||||||
except:
|
return request.accept_languages.best_match(current_app.config['LANGUAGES'])
|
||||||
return 'en'
|
except:
|
||||||
|
return 'en'
|
||||||
|
except:
|
||||||
|
return 'en'
|
||||||
|
|
||||||
|
|
||||||
db = SQLAlchemy() # engine_options={'pool_size': 5, 'max_overflow': 10} # session_options={"autoflush": False}
|
db = SQLAlchemy() # engine_options={'pool_size': 5, 'max_overflow': 10} # session_options={"autoflush": False}
|
||||||
|
|
Loading…
Add table
Reference in a new issue