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
fix i18n keys for duration
Christophe Bliard90a8329c3a00
diff --git a/app/contracts/work_packages/base_contract.rb b/app/contracts/work_packages/base_contract.rbindex f3742638226..62ea0acc5a8 100644--- a/app/contracts/work_packages/base_contract.rb+++ b/app/contracts/work_packages/base_contract.rb@@ -318,7 +318,7 @@ module WorkPackagesenddef validate_duration_integer- errors.add :duration, :only_integer if model.duration_before_type_cast != model.duration+ errors.add :duration, :not_an_integer if model.duration_before_type_cast != model.durationenddef validate_duration_matches_datesdiff --git a/config/locales/en.yml b/config/locales/en.ymlindex ff46a4759b4..021b99f3389 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -578,6 +578,7 @@ en:begin_deletion: "Begin of the deletion"children: "Subelements"done_ratio: "Progress (%)"+ duration: "Duration"end_insertion: "End of the insertion"end_deletion: "End of the deletion"version: "Version"diff --git a/spec/contracts/work_packages/base_contract_spec.rb b/spec/contracts/work_packages/base_contract_spec.rbindex 58bd48025d6..557a82f9781 100644--- a/spec/contracts/work_packages/base_contract_spec.rb+++ b/spec/contracts/work_packages/base_contract_spec.rb@@ -498,7 +498,7 @@ describe WorkPackages::BaseContract dowork_package.duration = 4.5end- it_behaves_like 'contract is invalid', duration: :only_integer+ it_behaves_like 'contract is invalid', duration: :not_an_integerendcontext 'when setting the duration to a negative value' do