Enhance log notifications to include message count in all locales and update related analysis logic
This commit is contained in:
@@ -164,7 +164,9 @@ func (a *alert) sendNotify(notify *alertNotify) {
|
||||
}
|
||||
text += fmt.Sprintf("%s: %s\n", field.name, v)
|
||||
}
|
||||
text += "\n" + i18n.Lang.T("log") + "\n"
|
||||
text += "\n" + i18n.Lang.T("log", map[string]any{
|
||||
"Count": len(notify.messages),
|
||||
}) + "\n"
|
||||
for _, message := range notify.messages {
|
||||
text += message + "\n\n"
|
||||
}
|
||||
|
||||
@@ -309,7 +309,9 @@ func (p *bruteForceProtection) sendNotify(subject string, notify *bruteForceProt
|
||||
for _, field := range notify.fields {
|
||||
text += fmt.Sprintf("%s: %s\n", field.name, field.value)
|
||||
}
|
||||
text += "\n" + i18n.Lang.T("log") + "\n"
|
||||
text += "\n" + i18n.Lang.T("log", map[string]any{
|
||||
"Count": len(notify.messages),
|
||||
}) + "\n"
|
||||
for _, message := range notify.messages {
|
||||
text += message + "\n\n"
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"daemon is not reopening logger": "The daemon did not reopen the log",
|
||||
|
||||
"time": "Time: {{.Time}}",
|
||||
"log": "Log: ",
|
||||
"log": "Log ({{.Count}}): ",
|
||||
"user": "User",
|
||||
"access to user has been gained": "Access to user has been gained",
|
||||
"unknown": "unknown",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"daemon is not reopening logger": "Жын журналды қайта ашпады",
|
||||
|
||||
"time": "Уақыт: {{.Time}}",
|
||||
"log": "Лог: ",
|
||||
"log": "Лог ({{.Count}}): ",
|
||||
"user": "Пайдаланушы",
|
||||
"access to user has been gained": "Пайдаланушыға кіру мүмкіндігі алынды",
|
||||
"unknown": "белгісіз",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"daemon is not reopening logger": "Демон не открыл журнал повторно",
|
||||
|
||||
"time": "Время: {{.Time}}",
|
||||
"log": "Лог: ",
|
||||
"log": "Лог ({{.Count}}): ",
|
||||
"user": "Пользователь",
|
||||
"access to user has been gained": "Получен доступ к пользователю",
|
||||
"unknown": "неизвестный",
|
||||
|
||||
Reference in New Issue
Block a user