system-info: fix unicode problem on translation
This commit is contained in:
parent
526cdfd9b2
commit
e02a88e64d
2 changed files with 3 additions and 2 deletions
|
|
@ -134,7 +134,8 @@ def uptime():
|
|||
human_value = value.copy()
|
||||
human_value['boot_time'] = time_to_datetime(boot_time)
|
||||
human_value['uptime'] = age(time_to_datetime(boot_time), show_suffix=False)
|
||||
human_value['text'] = 'Server started {}'.format(
|
||||
|
||||
human_value['text'] = u'Server started {}'.format(
|
||||
age(time_to_datetime(boot_time)))
|
||||
|
||||
return SysInfoRes(value=value, human_value=human_value)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ from threading import Thread
|
|||
|
||||
from rhodecode.translation import _ as tsf
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
@ -69,6 +68,7 @@ def set_user_lang(event):
|
|||
if cur_user:
|
||||
user_lang = cur_user.get_instance().user_data.get('language')
|
||||
if user_lang:
|
||||
log.debug('lang: setting current user:%s language to: %s', cur_user, user_lang)
|
||||
event.request._LOCALE_ = user_lang
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue