perf: notification i18n

This commit is contained in:
wangruidong
2024-05-24 15:42:12 +08:00
committed by w940853815
parent 8ebdd59e00
commit 0ea2339ad5
18 changed files with 173 additions and 124 deletions

View File

@@ -22,7 +22,7 @@ class ServerPerformanceMessage(SystemMessage):
self.terms_with_errors = terms_with_errors
def get_html_msg(self) -> dict:
subject = gettext("Terminal health check warning")
subject = gettext("Component health check warning")
context = {
'terms_with_errors': self.terms_with_errors
}
@@ -55,7 +55,7 @@ class ServerPerformanceMessage(SystemMessage):
for item, data in items_mapper.items():
msg = data['alarm_msg_format']
max_threshold = data['max_threshold']
value = 123 // i+1
value = 123 // i + 1
msg = msg.format(max_threshold=max_threshold, value=value, name=term.name)
errors.append(msg)
terms_with_errors.append([term, errors])
@@ -67,7 +67,7 @@ class ServerPerformanceCheckUtil(object):
'is_alive': {
'default': False,
'max_threshold': False,
'alarm_msg_format': _('The terminal is offline: {name}')
'alarm_msg_format': _('The component is offline: {name}')
},
'disk_used': {
'default': 0,