locales are working, added de_DE locale
This commit is contained in:
14
database.py
14
database.py
@ -18,7 +18,21 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from functools import wraps
|
||||
|
||||
from pony.orm import Database, db_session, Optional, Required, Set, PrimaryKey
|
||||
|
||||
from utils import _
|
||||
|
||||
# Database singleton
|
||||
db = Database()
|
||||
|
||||
|
||||
def user_locale(func):
|
||||
@wraps(func)
|
||||
def wrapped(*pargs, **kwargs):
|
||||
_.push('de_DE') # TODO: Get user locale from Database
|
||||
result = func(*pargs, **kwargs)
|
||||
_.pop()
|
||||
return result
|
||||
return wrapped
|
||||
|
Reference in New Issue
Block a user