Russian UI: settings, notch views, agent steps, errors; visible success after installing hooks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-06 20:15:30 +03:00
parent 750e5ad0ad
commit 319cdc8b18
20 changed files with 565 additions and 519 deletions
+9 -1
View File
@@ -195,7 +195,7 @@ final class N8nPoller: @unchecked Sendable {
let items = main.first else { return nil }
let count = items.count
let header = "→ \(lastNode) · \(count) item\(count == 1 ? "" : "s")"
let header = "→ \(lastNode) · \(count) \(ruItems(count))"
// Preview first item's JSON keys (up to 4)
if let firstItem = items.first,
@@ -257,3 +257,11 @@ final class N8nPoller: @unchecked Sendable {
appendAppLog("n8n.log", message, timestampFormat: "HH:mm:ss")
}
}
/// Russian plural for "элемент": 1 элемент, 2 элемента, 5 элементов.
fileprivate func ruItems(_ n: Int) -> String {
let mod10 = n % 10, mod100 = n % 100
if mod10 == 1 && mod100 != 11 { return "элемент" }
if (2...4).contains(mod10) && !(12...14).contains(mod100) { return "элемента" }
return "элементов"
}