Added translations for PartLot Validation errors.

This commit is contained in:
Jan Böhmer 2020-06-13 22:29:32 +02:00
parent 50cca40f77
commit 92cc73774c
2 changed files with 20 additions and 2 deletions

View file

@ -92,8 +92,8 @@ class ValidPartLotValidator extends ConstraintValidator
//Amount increasment is not allowed //Amount increasment is not allowed
if ($db_lot && $value->getAmount() > $db_lot['amount']) { if ($db_lot && $value->getAmount() > $db_lot['amount']) {
$this->context->buildViolation('validator.part_lot.location_full.no_increasment') $this->context->buildViolation('validator.part_lot.location_full.no_increase')
->setParameter('{{ old_amount }}', $db_lot['amount']) ->setParameter('{{ old_amount }}', (string) $db_lot['amount'])
->atPath('amount')->addViolation(); ->atPath('amount')->addViolation();
} }

View file

@ -197,5 +197,23 @@
<target>Can not add new parts to this location as it is marked as "Only Existing"</target> <target>Can not add new parts to this location as it is marked as "Only Existing"</target>
</segment> </segment>
</unit> </unit>
<unit id="3xoKOIS" name="validator.part_lot.location_full.no_increase">
<segment>
<source>validator.part_lot.location_full.no_increase</source>
<target>Location is full. Amount can not be increased (new value must be smaller than {{ old_amount }}).</target>
</segment>
</unit>
<unit id="R6Ov4Yt" name="validator.part_lot.location_full">
<segment>
<source>validator.part_lot.location_full</source>
<target>Location is full. Can not add new parts to it.</target>
</segment>
</unit>
<unit id="BNQk2e7" name="validator.part_lot.single_part">
<segment>
<source>validator.part_lot.single_part</source>
<target>This location can only contain a single part and it is already full!</target>
</segment>
</unit>
</file> </file>
</xliff> </xliff>