Enhance log notifications to include message count in all locales and update related analysis logic

This commit is contained in:
2026-04-12 01:25:26 +05:00
parent 9298f09b2e
commit 954f3b4ce2
5 changed files with 9 additions and 5 deletions
@@ -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"
}
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -65,7 +65,7 @@
"daemon is not reopening logger": "Жын журналды қайта ашпады",
"time": "Уақыт: {{.Time}}",
"log": "Лог: ",
"log": "Лог ({{.Count}}): ",
"user": "Пайдаланушы",
"access to user has been gained": "Пайдаланушыға кіру мүмкіндігі алынды",
"unknown": "белгісіз",
+1 -1
View File
@@ -65,7 +65,7 @@
"daemon is not reopening logger": "Демон не открыл журнал повторно",
"time": "Время: {{.Time}}",
"log": "Лог: ",
"log": "Лог ({{.Count}}): ",
"user": "Пользователь",
"access to user has been gained": "Получен доступ к пользователю",
"unknown": "неизвестный",