Skip to content

Commit 4907552

Browse files
committed
Generalize notifier copy: %{number} → %{name}, drop "Number" prefix
Substrate post-Phase-1 (#45) is generic single-resource CRUD, not queue-only — `ItemTag.name` can be a queue number ("A001"), a pet name ("Mittens"), a task title, etc. The copy "Number %{number} is up" only reads correctly for the queue case, and the agent's renamer doesn't substitute the word "Number" (it's not in the rename plan), so the wrong copy ships to every renamed app. Change to "%{name} is ready" — generalizes cleanly across the queue, reservation, vet-clinic, and task-tracker domains the substrate targets. Body unchanged. Test passes; rubocop clean.
1 parent c5046ab commit 4907552

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/notifiers/item_tag_called_notifier.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ItemTagCalledNotifier < ApplicationNotifier
1212

1313
notification_methods do
1414
def title
15-
I18n.t("notifiers.item_tag_called.title", number: record.name)
15+
I18n.t("notifiers.item_tag_called.title", name: record.name)
1616
end
1717

1818
def body

config/locales/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ en:
4242

4343
notifiers:
4444
item_tag_called:
45-
title: "Number %{number} is up"
45+
title: "%{name} is ready"
4646
body: "Please proceed to %{shop}."
4747

4848
api:

test/notifiers/item_tag_called_notifier_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ItemTagCalledNotifierTest < ActiveSupport::TestCase
2727
ItemTagCalledNotifier.with(record: @item_tag).deliver(@shopkeeper)
2828
notification = @shopkeeper.notifications.last
2929

30-
assert_equal I18n.t("notifiers.item_tag_called.title", number: @item_tag.name), notification.title
30+
assert_equal I18n.t("notifiers.item_tag_called.title", name: @item_tag.name), notification.title
3131
assert_equal I18n.t("notifiers.item_tag_called.body", shop: @shop.name), notification.body
3232
end
3333
end

0 commit comments

Comments
 (0)