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