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

Add different strings for series backlogs

Mir Bhatiac2fb8069677e
diff --git a/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.html.erb b/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.html.erb
index 05b1706bab6..47fe3abd501 100644
--- a/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.html.erb
+++ b/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.html.erb
@@ -11,8 +11,8 @@
)
) do |dialog|
dialog.with_confirmation_message do |message|
- message.with_heading(tag: :h2) { I18n.t(:label_agenda_backlog_clear_title) }
- message.with_description_content(I18n.t(:text_agenda_backlog_clear_description))
+ message.with_heading(tag: :h2) { heading }
+ message.with_description_content(description)
end
end
%>
diff --git a/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.rb b/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.rb
index a31fc726186..2040fcd69fb 100644
--- a/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.rb
+++ b/modules/meeting/app/components/meeting_sections/backlogs/clear_backlog_dialog_component.rb
@@ -38,5 +38,23 @@ module MeetingSections
@meeting = meeting
end
+
+ private
+
+ def heading
+ if @meeting.recurring?
+ I18n.t(:label_series_backlog_clear_title)
+ else
+ I18n.t(:label_agenda_backlog_clear_title)
+ end
+ end
+
+ def description
+ if @meeting.recurring?
+ I18n.t(:text_series_backlog_clear_description)
+ else
+ I18n.t(:text_agenda_backlog_clear_description)
+ end
+ end
end
end
diff --git a/modules/meeting/app/components/meeting_sections/backlogs/header_component.html.erb b/modules/meeting/app/components/meeting_sections/backlogs/header_component.html.erb
index 9e1f7b67b6e..3ea531312c5 100644
--- a/modules/meeting/app/components/meeting_sections/backlogs/header_component.html.erb
+++ b/modules/meeting/app/components/meeting_sections/backlogs/header_component.html.erb
@@ -7,8 +7,8 @@
box: @box, collapsed: @collapsed
)
) do |header|
- header.with_title(font_weight: :bold) { I18n.t("label_agenda_backlog") }
- header.with_description { I18n.t("text_agenda_backlog") }
+ header.with_title(font_weight: :bold) { title }
+ header.with_description { description }
header.with_count(count: @backlog.agenda_items.count)
end
end
diff --git a/modules/meeting/app/components/meeting_sections/backlogs/header_component.rb b/modules/meeting/app/components/meeting_sections/backlogs/header_component.rb
index 3e2acbcbd90..0e35b4b9410 100644
--- a/modules/meeting/app/components/meeting_sections/backlogs/header_component.rb
+++ b/modules/meeting/app/components/meeting_sections/backlogs/header_component.rb
@@ -54,6 +54,22 @@ module MeetingSections
end
end
+ def title
+ if @meeting.recurring?
+ I18n.t(:label_series_backlog)
+ else
+ I18n.t(:label_agenda_backlog)
+ end
+ end
+
+ def description
+ if @meeting.recurring?
+ I18n.t(:text_series_backlog)
+ else
+ I18n.t(:text_agenda_backlog)
+ end
+ end
+
def clear_action_item(menu)
menu.with_item(
label: I18n.t(:label_backlog_clear),
diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml
index 25204ecc382..2ac8dcb6b5d 100644
--- a/modules/meeting/config/locales/en.yml
+++ b/modules/meeting/config/locales/en.yml
@@ -436,9 +436,20 @@ en:
text_backlog_clear_error: "One or more errors occurred while trying to clear the backlog."
label_agenda_backlog: "Agenda backlog"
- text_agenda_backlog: "This backlog is unique to this one-time meeting. You can drag items in and out to add or remove them from the meeting agenda."
+ text_agenda_backlog: >
+ This backlog is unique to this one-time meeting.
+ You can drag items in and out to add or remove them from the meeting agenda.
label_agenda_backlog_clear_title: "Clear agenda backlog?"
- text_agenda_backlog_clear_description: "Are you sure you want to remove all items currently in the agenda items? This action is not reversible."
+ text_agenda_backlog_clear_description: >
+ Are you sure you want to remove all items currently in the agenda items? This action is not reversible.
+ label_series_backlog: "Series backlog"
+ text_series_backlog: >
+ The backlog is shared with all occurrences of this series.
+ You can drag items in and out to add or remove them from a particular meeting.
+ label_series_backlog_clear_title: "Clear series backlog?"
+ text_series_backlog_clear_description: >
+ This will remove all items in the series backlog, which is shared with all meetings in the series.
+ Are you sure you want to continue? This action is not reversible.
text_agenda_item_title: 'Agenda item "%{title}"'