mirror of https://github.com/jumpserver/jumpserver
perf: Translate check account
parent
090ad0ba83
commit
c84bc52c70
|
@ -6,6 +6,7 @@ import uuid
|
|||
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from accounts.models import Account, AccountRisk, RiskChoice
|
||||
from assets.automations.base.manager import BaseManager
|
||||
|
@ -266,17 +267,13 @@ class CheckAccountManager(BaseManager):
|
|||
return "accounts/check_account_report.html"
|
||||
|
||||
def print_summary(self):
|
||||
tmpl = (
|
||||
"\n---\nSummary: \nok: %s, weak password: %s, leaked password: %s, "
|
||||
"repeated password: %s, no secret: %s, using time: %ss"
|
||||
% (
|
||||
self.summary["ok"],
|
||||
self.summary[RiskChoice.weak_password],
|
||||
self.summary[RiskChoice.leaked_password],
|
||||
self.summary[RiskChoice.repeated_password],
|
||||
|
||||
self.summary["no_secret"],
|
||||
int(self.duration),
|
||||
)
|
||||
tmpl = _("\n---\nSummary: \nok: {}, weak password: {}, leaked password: {}, "
|
||||
"repeated password: {}, no secret: {}, using time: {}s").format(
|
||||
self.summary["ok"],
|
||||
self.summary[RiskChoice.weak_password],
|
||||
self.summary[RiskChoice.leaked_password],
|
||||
self.summary[RiskChoice.repeated_password],
|
||||
self.summary["no_secret"],
|
||||
int(self.duration)
|
||||
)
|
||||
print(tmpl)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1513,5 +1513,6 @@
|
|||
"ExecutionID": "Execution ID",
|
||||
"Invalid": "Invalid",
|
||||
"Disabled": "Disabled",
|
||||
"IgnoreFail": "Ignore fail"
|
||||
"IgnoreFail": "Ignore fail",
|
||||
"RiskDetectionDetail": "Risk detection detail"
|
||||
}
|
|
@ -1512,5 +1512,6 @@
|
|||
"ExecutionID": "执行 ID",
|
||||
"Invalid": "无效",
|
||||
"Disabled": "已禁用",
|
||||
"IgnoreFail": "忽略失败"
|
||||
"IgnoreFail": "忽略失败",
|
||||
"RiskDetectionDetail": "风险检测详情"
|
||||
}
|
Loading…
Reference in New Issue