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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#43884] Change wording on manual scheduling activity
Dmitriif87c147cb458
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 7b0234ff8dc..f1e7161ebe8 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -603,6 +603,7 @@ en:progress: "Progress (%)"readonly: "Read only"schedule_manually: "Manual scheduling"+ schedule_default: "Default scheduling"spent_hours: "Spent time"spent_time: "Spent time"subproject: "Subproject"@@ -2774,6 +2775,7 @@ en:text_journal_set_to: "%{label} set to %{value}"text_journal_set_with_diff: "%{label} set (%{link})"text_journal_label_value: "%{label} %{value}"+ text_scheduling_label: "%{type} activated"text_latest_note: "The latest comment is: %{note}"text_length_between: "Length between %{min} and %{max} characters."text_line_separated: "Multiple values allowed (one line for each value)."diff --git a/lib/open_project/journal_formatter/schedule_manually.rb b/lib/open_project/journal_formatter/schedule_manually.rbindex e605b9ca522..b1781c5093b 100644--- a/lib/open_project/journal_formatter/schedule_manually.rb+++ b/lib/open_project/journal_formatter/schedule_manually.rb@@ -28,9 +28,9 @@class OpenProject::JournalFormatter::ScheduleManually < JournalFormatter::Basedef render(key, values, options = { no_html: false })- label_text = options[:no_html] ? label(key) : content_tag('strong', label(key))- activated_text = values.last ? I18n.t('scheduling.activated') : I18n.t('scheduling.deactivated')+ calculated_key = values.last ? :schedule_default : :schedule_manually+ label_text = options[:no_html] ? label(calculated_key) : content_tag('strong', label(calculated_key))- I18n.t(:text_journal_label_value, label: label_text, value: activated_text)+ I18n.t(:text_scheduling_label, type: label_text)endenddiff --git a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb b/spec/features/work_packages/scheduling/scheduling_mode_spec.rbindex be4c71a6929..2537310756b 100644--- a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb+++ b/spec/features/work_packages/scheduling/scheduling_mode_spec.rb@@ -132,7 +132,7 @@ describe 'scheduling mode',work_packages_page.expect_and_dismiss_toaster message: 'Successful update.'# Changing the scheduling mode is journalized- work_packages_page.expect_activity_message("Manual scheduling activated")+ work_packages_page.expect_activity_message("Default scheduling activated")expect_dates(wp, '2016-01-05', '2016-01-10')expect(wp.schedule_manually).to be_truthydiff --git a/spec/lib/journal_formatter/schedule_manually_spec.rb b/spec/lib/journal_formatter/schedule_manually_spec.rbindex a83b53b0889..56d1e735782 100644--- a/spec/lib/journal_formatter/schedule_manually_spec.rb+++ b/spec/lib/journal_formatter/schedule_manually_spec.rb@@ -40,9 +40,7 @@ describe OpenProject::JournalFormatter::ScheduleManually dodescribe '#render' dodescribe 'with the first value being true, and the second false' dolet(:expected) do- I18n.t(:text_journal_label_value,- label: "<strong>Manual scheduling</strong>",- value: 'deactivated')+ I18n.t(:text_scheduling_label, type: "<strong>Manual scheduling</strong>")endit { expect(instance.render(key, [true, false])).to eq(expected) }@@ -50,9 +48,7 @@ describe OpenProject::JournalFormatter::ScheduleManually dodescribe 'with the first value being false, and the second true' dolet(:expected) do- I18n.t(:text_journal_label_value,- label: "<strong>Manual scheduling</strong>",- value: 'activated')+ I18n.t(:text_scheduling_label, type: "<strong>Default scheduling</strong>")endit { expect(instance.render(key, [false, true])).to eq(expected) }