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

Reword meeting labels

Oliver Günther1691c8b6d199
diff --git a/modules/meeting/app/forms/recurring_meeting/frequency.rb b/modules/meeting/app/forms/recurring_meeting/frequency.rb
index 2080ed6d554..940733af38b 100644
--- a/modules/meeting/app/forms/recurring_meeting/frequency.rb
+++ b/modules/meeting/app/forms/recurring_meeting/frequency.rb
@@ -39,7 +39,12 @@ class RecurringMeeting::Frequency < ApplicationForm
}
) do |list|
RecurringMeeting.frequencies.each_key do |value|
- label = I18n.t(:"recurring_meeting.frequency.#{value}")
+ label =
+ if value.to_s == "working_days"
+ I18n.t(:"recurring_meeting.frequency.working_days")
+ else
+ I18n.t(:"recurring_meeting.frequency.x_#{value}", count: 1)
+ end
list.option(label:, value:)
end
end
diff --git a/modules/meeting/app/models/recurring_meeting.rb b/modules/meeting/app/models/recurring_meeting.rb
index a73a8255c5c..975837892ed 100644
--- a/modules/meeting/app/models/recurring_meeting.rb
+++ b/modules/meeting/app/models/recurring_meeting.rb
@@ -106,7 +106,12 @@ class RecurringMeeting < ApplicationRecord
end
def human_frequency
- I18n.t("recurring_meeting.frequency.#{frequency}")
+ case frequency
+ when "working_days"
+ I18n.t("recurring_meeting.frequency.working_days")
+ else
+ I18n.t("recurring_meeting.frequency.x_#{frequency}", count: interval)
+ end
end
def human_day_of_week
diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml
index c5c4cbda57a..f6f34cfc7b1 100644
--- a/modules/meeting/config/locales/en.yml
+++ b/modules/meeting/config/locales/en.yml
@@ -286,10 +286,14 @@ en:
Every new occurrence of a meeting in the series will use this template.
Changes will not affect past or already created meetings.
frequency:
+ x_daily:
+ one: "Every day"
+ other: "Every %{count} days"
+ x_weekly:
+ one: "Every week"
+ other: "Every %{count} weeks"
every_weekday: "Every %{day_of_the_week}"
- daily: "Daily"
working_days: "Every working day"
- weekly: "Weekly"
end_after:
never: "never"
specific_date: "after a specific date"
diff --git a/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb b/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb
index 67a7f3b9e59..ca3936a3ff3 100644
--- a/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb
+++ b/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb
@@ -153,7 +153,7 @@ RSpec.describe "Recurring meetings CRUD",
show_page.edit_meeting_series
show_page.within_modal "Edit Meeting" do
- page.select("Daily", from: "Frequency")
+ page.select("Every day", from: "Frequency")
meetings_page.set_start_time "11:00"
page.select("a number of occurrences", from: "Meeting series ends")
page.fill_in("Occurrences", with: "8")
@@ -162,7 +162,7 @@ RSpec.describe "Recurring meetings CRUD",
click_link_or_button("Save")
end
wait_for_network_idle
- show_page.expect_subtitle text: "Daily at 11:00 AM, ends on 01/07/2025"
+ show_page.expect_subtitle text: "Every day at 11:00 AM, ends on 01/07/2025"
end
it "shows the correct actions based on status" do
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 33fb596bb52..9bbd49c4fc1 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
@@ -63,7 +63,7 @@ RSpec.describe "Recurring meetings schedule text",
describe "setting schedule" do
it "returns the update text" do
expect(subject).to have_http_status(:ok)
- expect(subject.body).to include("Daily at 10:00 AM")
+ expect(subject.body).to include("Every day at 10:00 AM")
end
context "when changing the frequency and interval" do
@@ -90,7 +90,7 @@ RSpec.describe "Recurring meetings schedule text",
it "falls back to the default" do
expect(subject).to have_http_status(:ok)
- expect(subject.body).to include("Daily at 10:00 AM")
+ expect(subject.body).to include("Every day at 10:00 AM")
end
end
@@ -100,7 +100,7 @@ RSpec.describe "Recurring meetings schedule text",
it "returns an update turbo stream" do
expect(subject).to have_http_status(:ok)
expect(subject.body).to include("turbo-stream")
- expect(subject.body).to include("Daily at 10:00 AM")
+ expect(subject.body).to include("Every day at 10:00 AM")
end
end
end