修改词条显示

This commit is contained in:
wangsong 2021-12-17 15:20:39 +08:00
parent d4506165df
commit da856a0980
3 changed files with 11 additions and 3 deletions

View File

@ -62,13 +62,13 @@ class UpdateManagerDbusController(dbus.service.Object):
interface = dbus.Interface(obj, dbus_interface='com.kylin.software.properties.interface')
retval = interface.updateSourceTemplate(timeout=5)
except Exception as e:
header = _("Failed to get update software push, please try to update again later")
header = _("Unable to access the source management server")
desc = str(e)
logging.error("update sourceTemplate Failed and Error mes:%s"%str(e))
return False,header,desc
if retval == False:
header = _("Failed to get update software push, please try to update again later")
header = _("Unable to access the source management server")
desc = _("Connection exception with push server")
logging.warning(header + desc)
return retval,header,desc

View File

@ -70,6 +70,14 @@ if __name__ == "__main__":
else:
logging.basicConfig(format=FORMAT,level=logging.DEBUG,filename = logfile(),filemode = 'a')
if sys.getfilesystemencoding() == "ascii" and not "LANG" in os.environ:
logging.info('start setting environ["LANG"] ...')
os.environ["LANG"] = "C.UTF-8"
os.execv(sys.argv[0], sys.argv)
# if not "LANGUAGE" in os.environ:
# os.environ["LANGUAGE"] = "zh_CN.UTF-8"
# logging.info('kylin-system-updater(lang:%s) starting ...',os.environ["LANGUAGE"])
logging.info('kylin-system-updater starting ...')

View File

@ -2553,7 +2553,7 @@ msgstr ""
msgid "%.0f kB"
msgstr "%.0f kB"
msgid "Failed to get update software push, please try to update again later"
msgid "Unable to access the source management server"
msgstr "无法访问源管理服务器,请稍后再试"
msgid "Connection exception with push server"