fix i18n keys for duration

pull/10645/head
Christophe Bliard 2 years ago
parent f5fc2b9c59
commit 90a8329c3a
No known key found for this signature in database
GPG Key ID: 2BC07603210C3FA4
  1. 2
      app/contracts/work_packages/base_contract.rb
  2. 1
      config/locales/en.yml
  3. 2
      spec/contracts/work_packages/base_contract_spec.rb

@ -318,7 +318,7 @@ module WorkPackages
end
def 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.duration
end
def validate_duration_matches_dates

@ -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"

@ -498,7 +498,7 @@ describe WorkPackages::BaseContract do
work_package.duration = 4.5
end
it_behaves_like 'contract is invalid', duration: :only_integer
it_behaves_like 'contract is invalid', duration: :not_an_integer
end
context 'when setting the duration to a negative value' do

Loading…
Cancel
Save