Skip to content

Commit 2f760d9

Browse files
s35560claude
andcommitted
fix(locale): use count-neutral wording for the experiment days-left message
Address review comments on PR #2778: - "{{ .Field_1 }} days left" rendered "`1` days left" for an experiment with exactly one day remaining. Reword it as "Days left: {{ .Field_1 }}" so the English notification is grammatical for singular, plural, zero and negative values, and update the test expectation accordingly. The Japanese message is already count-neutral and stays unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 96783e4 commit 2f760d9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/locale/localizedata/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,5 @@ AppliedNow: "{{ .Field_1 }} has been applied immediately"
157157

158158
NotificationFeatureStale: "There are feature flags that have not been used for more than {{ .Field_1 }} days."
159159
NotificationExperimentRunning: "There are running experiments."
160-
NotificationExperimentDaysLeft: "{{ .Field_1 }} days left"
160+
NotificationExperimentDaysLeft: "Days left: {{ .Field_1 }}"
161161
NotificationMAUCount: "This is the MAU for month {{ .Field_1 }}."

pkg/subscription/sender/notifier/slack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func TestCreateExperimentRunningAttachment(t *testing.T) {
202202
desc: "english",
203203
lang: locale.En,
204204
expectedText: "There are running experiments.",
205-
expectedDaysMsg: "- `1` days left, Name: *",
205+
expectedDaysMsg: "- Days left: `1`, Name: *",
206206
},
207207
{
208208
desc: "japanese",

0 commit comments

Comments
 (0)