Skip to content

Commit ff531c0

Browse files
fix: escape stray % in anomaly notification text (#305)
1 parent 2bf3a18 commit ff531c0

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

budget/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111
- Editing a split transaction with three or more parts no longer zeroes or overwrites the other splits. The last split row is now a read-only "remaining" amount (transaction total minus the other parts), and the dialog blocks saving until the parts add up ([#303](https://github.com/otherworld-dev/Budget/issues/303))
12+
- Spending-anomaly notifications no longer crash with "The arguments array must contain 1 items, 0 given" — a stray `%` in the notification text made Nextcloud's translation layer fail, spamming the log every time notifications were rendered ([#305](https://github.com/otherworld-dev/Budget/issues/305))
1213

1314
## [2.34.0] - 2026-06-24
1415

budget/lib/Notification/Notifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ public function prepare(INotification $notification, string $languageCode): INot
396396

397397
// TRANSLATORS: {category}, {percent}, {amount} are placeholders — do NOT translate them. Keep all {placeholder} names exactly as-is.
398398
$notification->setRichMessage(
399-
$l->t('{category} spending is {percent}% above your typical level — {amount} so far this month.'),
399+
$l->t('{category} spending is {percent}%% above your typical level — {amount} so far this month.'),
400400
[
401401
'category' => ['type' => 'highlight', 'id' => 'category', 'name' => $parameters['categoryName']],
402402
'percent' => ['type' => 'highlight', 'id' => 'percent', 'name' => $parameters['percentAbove']],

0 commit comments

Comments
 (0)