Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Change interval text

Oliver Günther4ddabfdb6b59
diff --git a/modules/meeting/app/models/recurring_meeting.rb b/modules/meeting/app/models/recurring_meeting.rb
index bfae6d86890..30be11c7e30 100644
--- a/modules/meeting/app/models/recurring_meeting.rb
+++ b/modules/meeting/app/models/recurring_meeting.rb
@@ -94,7 +94,7 @@ class RecurringMeeting < ApplicationRecord
if interval == 1
human_frequency
else
- I18n.t("recurring_meeting.in_words.daily_interval", interval: interval.ordinalize)
+ I18n.t("recurring_meeting.in_words.daily_interval", interval:)
end
when "working_days"
I18n.t("recurring_meeting.in_words.working_days")
@@ -102,7 +102,7 @@ class RecurringMeeting < ApplicationRecord
if interval == 1
I18n.t("recurring_meeting.in_words.weekly", weekday:)
else
- I18n.t("recurring_meeting.in_words.weekly_interval", interval: interval.ordinalize, weekday:)
+ I18n.t("recurring_meeting.in_words.weekly_interval", interval:, weekday:)
end
end
end
diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml
index 5141b7066cb..ce94b217a9f 100644
--- a/modules/meeting/config/locales/en.yml
+++ b/modules/meeting/config/locales/en.yml
@@ -248,11 +248,11 @@ en:
iterations: "A number of occurrences"
starts: "Starts"
in_words:
- daily_interval: "Every %{interval} day"
+ daily_interval: "Every %{interval} days"
working_days: "Every working day"
working_days_interval: "Every %{interval} working day"
weekly: "Every week on %{weekday}"
- weekly_interval: "Every %{interval} week on %{weekday}"
+ weekly_interval: "Every %{interval} weeks on %{weekday}"
frequency: "%{base} at %{time}"
full: "%{base} at %{time}, ends on %{end_date}"
diff --git a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_schedule_spec.rb b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_schedule_spec.rb
index 9c782110321..ac44c13d2d3 100644
--- a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_schedule_spec.rb
+++ b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_schedule_spec.rb
@@ -72,7 +72,7 @@ RSpec.describe "Recurring meetings schedule text",
it "returns the update text" do
expect(subject).to have_http_status(:ok)
- expect(subject.body).to include("Every 2nd week on Thursday at 10:00 AM")
+ expect(subject.body).to include("Every 2 weeks on Thursday at 10:00 AM")
end
end
@@ -81,7 +81,7 @@ RSpec.describe "Recurring meetings schedule text",
it "returns the update text" do
expect(subject).to have_http_status(:ok)
- expect(subject.body).to include("Every 2nd day at 10:00 AM")
+ expect(subject.body).to include("Every 2 days at 10:00 AM")
end
end