mirror of https://git.48k.eu/ogcp
Use lazy translation on intervals' strings
Constant strings outside of a request must use lazy strings. See flask-babel documentation for more information.multi-ogserver
parent
c8cf49bf6c
commit
ee6880a9f2
|
@ -25,6 +25,7 @@ from pathlib import Path
|
|||
from ogcp.models import User
|
||||
from ogcp.forms.auth import LoginForm
|
||||
from ogcp.og_server import OGServer
|
||||
from flask_babel import lazy_gettext as _l
|
||||
from flask_babel import _
|
||||
from ogcp import app
|
||||
import requests
|
||||
|
@ -185,9 +186,9 @@ def get_user(username):
|
|||
|
||||
|
||||
intervals = (
|
||||
(_('days'), 86400), # 60 * 60 * 24
|
||||
(_('hours'), 3600), # 60 * 60
|
||||
(_('minutes'), 60),
|
||||
(_l('days'), 86400), # 60 * 60 * 24
|
||||
(_l('hours'), 3600), # 60 * 60
|
||||
(_l('minutes'), 60),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue