Fix bad i18n interpolation value

and added the missing test case

closes LS-3274
flag=calendar_series

test plan: passes jenkins

Change-Id: Ibdc8d5e83458df68a0d8c00d8820cb153d1b1481
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/296074
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
This commit is contained in:
Ed Schiebel 2022-07-13 13:37:27 -04:00
parent c9f05516b6
commit 2d0264139b
2 changed files with 2 additions and 1 deletions

View File

@ -362,7 +362,7 @@ module RruleHelper
else
I18n.t({
one: "Monthly until %{until}",
other: "Every %{interval} months until %{until}"
other: "Every %{count} months until %{until}"
}, {
count: interval,
until: format_date(until_date)

View File

@ -50,6 +50,7 @@ describe RruleHelper do
"FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=15;COUNT=3" => "Every 2 months on day 15, 3 times",
"FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=3,5;COUNT=3" => "Every 2 months on days 3,5, 3 times",
"FREQ=MONTHLY;INTERVAL=1;UNTIL=20220729T000000Z" => "Monthly until Jul 29, 2022",
"FREQ=MONTHLY;INTERVAL=2;UNTIL=20220729T000000Z" => "Every 2 months until Jul 29, 2022",
"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=5;UNTIL=20220729T000000Z" => "Monthly on day 5 until Jul 29, 2022",
"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=3,5;UNTIL=20220729T000000Z" => "Monthly on days 3,5 until Jul 29, 2022",
"FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=5;UNTIL=20220729T000000Z" => "Every 2 months on day 5 until Jul 29, 2022",