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

Update labels and strings to match the latest spec

Mir Bhatia0058725c1f81
diff --git a/modules/meeting/app/components/recurring_meetings/table_component.rb b/modules/meeting/app/components/recurring_meetings/table_component.rb
index c6ce7effc86..219b6f5c682 100644
--- a/modules/meeting/app/components/recurring_meetings/table_component.rb
+++ b/modules/meeting/app/components/recurring_meetings/table_component.rb
@@ -30,7 +30,7 @@
module RecurringMeetings
class TableComponent < ::OpPrimer::BorderBoxTableComponent
- options :current_project, :count, :direction, :max_count
+ options :current_project, :count, :direction, :max_count, :blankslate_title, :blankslate_desc
columns :start_time, :relative_time, :status, :create
@@ -89,5 +89,25 @@ module RecurringMeetings
def count
@count ||= [options[:count], rows.count].max
end
+
+ def blankslate?
+ options[:blankslate_title].present?
+ end
+
+ def render_blank_slate
+ render(Primer::Beta::Blankslate.new(border: false)) do |component|
+ component.with_visual_icon(icon: blank_icon, size: :medium) if blank_icon
+ component.with_heading(tag: :h2) { blank_title }
+ component.with_description { blank_description }
+ end
+ end
+
+ def blank_title
+ blankslate? ? options[:blankslate_title] : I18n.t(:label_nothing_display)
+ end
+
+ def blank_description
+ blankslate? ? options[:blankslate_desc] : I18n.t(:no_results_title_text)
+ end
end
end
diff --git a/modules/meeting/app/views/recurring_meetings/show.html.erb b/modules/meeting/app/views/recurring_meetings/show.html.erb
index 81e2184a738..23f3078e505 100644
--- a/modules/meeting/app/views/recurring_meetings/show.html.erb
+++ b/modules/meeting/app/views/recurring_meetings/show.html.erb
@@ -46,8 +46,8 @@ See COPYRIGHT and LICENSE files for more details.
<% else -%>
<%= render RecurringMeetings::TableHeaderComponent.new(
meeting: @recurring_meeting,
- title: I18n.t("recurring_meeting.agenda_opened.title"),
- subtitle: I18n.t("recurring_meeting.agenda_opened.subtitle")
+ title: I18n.t("recurring_meeting.open.title"),
+ subtitle: I18n.t("recurring_meeting.open.subtitle")
) %>
<%= render RecurringMeetings::TableComponent.new(
rows: @meetings,
@@ -55,7 +55,9 @@ See COPYRIGHT and LICENSE files for more details.
count: @count,
direction: @direction,
max_count: @max_count,
- test_selector: "agenda-opened-table"
+ test_selector: "agenda-opened-table",
+ blankslate_title: I18n.t("recurring_meeting.open.blankslate.title"),
+ blankslate_desc: I18n.t("recurring_meeting.open.blankslate.desc")
) %>
<%= render RecurringMeetings::TableHeaderComponent.new(
meeting: @recurring_meeting,
@@ -69,7 +71,9 @@ See COPYRIGHT and LICENSE files for more details.
count: @count,
direction: @direction,
max_count: @max_count,
- test_selector: "planned-table"
+ test_selector: "planned-table",
+ blankslate_title: I18n.t("recurring_meeting.planned.blankslate.title"),
+ blankslate_desc: I18n.t("recurring_meeting.planned.blankslate.desc")
) %>
<% end -%>
<% end -%>
diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml
index a8cf7cf8fd1..001336244a1 100644
--- a/modules/meeting/config/locales/en.yml
+++ b/modules/meeting/config/locales/en.yml
@@ -132,7 +132,7 @@ en:
label_recurring_meeting_plural: "Recurring meetings"
label_template: "Template"
label_recurring_meeting_view: "View meeting series"
- label_recurring_meeting_create: "Create from template"
+ label_recurring_meeting_create: "Open"
label_recurring_meeting_copy: "Copy as one-off"
label_recurring_meeting_cancel: "Cancel this occurrence"
label_recurring_meeting_delete: "Delete occurrence"
@@ -279,17 +279,26 @@ en:
frequency: "%{base} at %{time}"
full: "%{base} at %{time}, ends on %{end_date}"
never_ending: "%{base} at %{time}"
- agenda_opened:
- title: "Agenda opened"
+ open:
+ title: "Open"
subtitle: >
Open meetings have agendas that can be edited and show up in individual users’ ‘My meetings’ section.
Changes to the meeting series template do not affect already-open meeting occurrences.
+ blankslate:
+ title: "No open meetings at the moment"
+ desc: "You can manually open a planned meeting by clicking on the 'Open' button below"
planned:
title: "Planned"
subtitle: >
The following meetings are planned in the recurring meeting schedule but are not open yet.
Every time a planned meeting starts, the next one will automatically be opened for you.
You can also open planned meetings manually to import the template and start editing the agenda.
+ blankslate:
+ title: "No more planned meetings"
+ desc: >
+ There are no additional meetings planned in this series.
+ To schedule additional meetings or extend the series,
+ go to the template and edit meeting details to change the end date, frequency or interval.
delete_dialog:
title: "Delete meeting series"
heading: "Permanently delete this meeting series?"
diff --git a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb
index 53f1a3cc652..552217e0916 100644
--- a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb
+++ b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb
@@ -110,7 +110,7 @@ RSpec.describe "Recurring meetings show",
get recurring_meeting_path(recurring_meeting)
content = page.find_by_id("content")
- expect(content).to have_text "Agenda opened"
+ expect(content).to have_text "Open"
expect(content).to have_text "Planned"
open_meeting_date = format_time(open_meeting.start_time)