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 scheduling mode journal label

Oliver Güntherb438d67f9aff
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 7ec33920f7c..09a3b29c6f1 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3652,8 +3652,8 @@ en:
cannot_annotate: "This file cannot be annotated."
scheduling:
- activated: "activated"
- deactivated: "deactivated"
+ manual: "set to Manual"
+ automatic: "set to Automatic"
search_input_placeholder: "Search ..."
diff --git a/lib/open_project/journal_formatter/schedule_manually.rb b/lib/open_project/journal_formatter/schedule_manually.rb
index 0895e96a744..e3bcc341630 100644
--- a/lib/open_project/journal_formatter/schedule_manually.rb
+++ b/lib/open_project/journal_formatter/schedule_manually.rb
@@ -28,8 +28,9 @@
class OpenProject::JournalFormatter::ScheduleManually < JournalFormatter::Base
def render(key, values, options = { html: true })
- label_text = options[:html] ? content_tag(:strong, label(key)) : label(key)
- activated_text = values.last ? I18n.t("scheduling.activated") : I18n.t("scheduling.deactivated")
+ text = I18n.t("work_packages.datepicker_modal.mode.title")
+ label_text = options[:html] ? content_tag(:strong, text) : text
+ activated_text = values.last ? I18n.t("scheduling.manual") : I18n.t("scheduling.automatic")
I18n.t(:text_journal_label_value, label: label_text, value: activated_text)
end
diff --git a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb b/spec/features/work_packages/scheduling/scheduling_mode_spec.rb
index ecbfa8f728e..807bbfd0663 100644
--- a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb
+++ b/spec/features/work_packages/scheduling/scheduling_mode_spec.rb
@@ -156,7 +156,7 @@ RSpec.describe "scheduling mode", :js do
work_packages_page.wait_for_activity_tab
# Changing the scheduling mode is journalized
- activity_tab.expect_journal_changed_attribute(text: "Manual scheduling activated")
+ activity_tab.expect_journal_changed_attribute(text: "Scheduling mode set to Manual")
work_packages_page.switch_to_tab(tab: :overview)
expect_dates(wp, "2016-01-05", "2016-01-10")
diff --git a/spec/lib/journal_formatter/schedule_manually_spec.rb b/spec/lib/journal_formatter/schedule_manually_spec.rb
index 39d7b55bb8e..e47f1f8f825 100644
--- a/spec/lib/journal_formatter/schedule_manually_spec.rb
+++ b/spec/lib/journal_formatter/schedule_manually_spec.rb
@@ -41,8 +41,8 @@ RSpec.describe OpenProject::JournalFormatter::ScheduleManually do
describe "with the first value being true, and the second false" do
let(:expected) do
I18n.t(:text_journal_label_value,
- label: "<strong>Manual scheduling</strong>",
- value: "deactivated")
+ label: "<strong>Scheduling mode</strong>",
+ value: "set to Automatic")
end
it { expect(instance.render(key, [true, false])).to eq(expected) }
@@ -51,8 +51,8 @@ RSpec.describe OpenProject::JournalFormatter::ScheduleManually do
describe "with the first value being false, and the second true" do
let(:expected) do
I18n.t(:text_journal_label_value,
- label: "<strong>Manual scheduling</strong>",
- value: "activated")
+ label: "<strong>Scheduling mode</strong>",
+ value: "set to Manual")
end
it { expect(instance.render(key, [false, true])).to eq(expected) }