diff --git a/src/Controller/DebugController.php b/src/Controller/DebugController.php index ee5d7fe4..e860b7cb 100644 --- a/src/Controller/DebugController.php +++ b/src/Controller/DebugController.php @@ -31,6 +31,7 @@ namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; +use Symfony\Contracts\Translation\TranslatorInterface; /** * Class DebugController. @@ -50,6 +51,41 @@ class DebugController extends AbstractController $this->addFlash('testkjfd', 'Blabla. This message type should be not know to template!'); + + return $this->render('base.html.twig'); } + + /** + * @Route("/debug/dummy") + */ + public function dummy(TranslatorInterface $translator) + { + //Here we collect translation keys automatically created, so they can be extracted easily + + //Validators: + $translator->trans('validator.noneofitschild.self'); + $translator->trans('validator.noneofitschild.children'); + $translator->trans('validator.isSelectable'); + $translator->trans('validator.part_lot.location_full.no_increasment'); + $translator->trans('validator.part_lot.location_full'); + $translator->trans('validator.part_lot.only_existing'); + $translator->trans('validator.part_lot.single_part'); + + //Manufacturer status + $translator->trans('m_status.active.help'); + $translator->trans('m_status.announced.help'); + $translator->trans('m_status.discontinued.help'); + $translator->trans('m_status.eol.help'); + $translator->trans('m_status.nrfnd.help'); + $translator->trans('m_status.unknown.help'); + + //Flash titles + $translator->trans('flash.success'); + $translator->trans('flash.error'); + $translator->trans('flash.warning'); + $translator->trans('flash.notice'); + $translator->trans('flash.info'); + + } } diff --git a/src/Validator/Constraints/NoneOfItsChildrenValidator.php b/src/Validator/Constraints/NoneOfItsChildrenValidator.php index 0c09642f..94907855 100644 --- a/src/Validator/Constraints/NoneOfItsChildrenValidator.php +++ b/src/Validator/Constraints/NoneOfItsChildrenValidator.php @@ -37,6 +37,7 @@ use Symfony\Bundle\MakerBundle\Str; use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\UnexpectedValueException; /** diff --git a/translations/messages.de.xlf b/translations/messages.de.xlf index 9e1c6a23..2f300684 100644 --- a/translations/messages.de.xlf +++ b/translations/messages.de.xlf @@ -1646,6 +1646,82 @@ Element 3 entity.edit.reset Änderungen verwerfen + + entity.info.parts_count + Bauteile mit diesem Element + + + validator.noneofitschild.self + Ein Element kann nicht sich selbst als übergeordnet sein! + + + validator.noneofitschild.children + Ein Kindelement kann nicht das übergeordnete Element sein! + + + validator.isSelectable + Das Element muss auswählbar sein! + + + validator.part_lot.location_full.no_increasment + Der verwendete Lagerort wurde als voll markiert, daher kann der Bestand nicht erhöht werden. (Neuer Bestand maximal {{ old_amount }}) + + + validator.part_lot.location_full + Der Lagerort ist voll, daher können keine neue Teile hinzugefügt werden. + + + validator.part_lot.only_existing + Der Lagerort wurde als "nur bestehende Teile" markiert, daher können keine neuen Teile hinzugefügt werden. + + + validator.part_lot.single_part + Der Lagerort wurde als "Nur ein Bauteil" markiert, daher kann kein neues Bauteil hinzugefügt werden. + + + m_status.active.help + Das Bauteil wird momentan und in absehbarer Zukunft produziert. + + + m_status.announced.help + Das Bauteil wurde angekündigt, ist aber noch nicht erhältlich. + + + m_status.discontinued.help + Das Bauteil wird nicht mehr hergestellt. + + + m_status.eol.help + Die Produktion des Bauteils wird bald eingestellt. + + + m_status.nrfnd.help + Im Moment wird das Bauteil noch hergestellt, die Verwendung für neue Designs ist nicht mehr empfohlen. + + + m_status.unknown.help + Der Produktionstatus ist nicht bekannt. + + + flash.success + Erfolg + + + flash.error + Fehler + + + flash.warning + Warnung + + + flash.notice + Hinweis + + + flash.info + Info + diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 28ab5114..de76a3ca 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -1617,6 +1617,82 @@ Element 3 entity.edit.reset Discard changes + + entity.info.parts_count + Count of parts with this element + + + validator.noneofitschild.self + A element can not be its own parent. + + + validator.noneofitschild.children + The parent can not be one of the children of itself. + + + validator.isSelectable + The element must be selectable. + + + validator.part_lot.location_full.no_increasment + The storage location was marked as full, so you can not increase the instock amount. (New amount max. {{ old_amount }}) + + + validator.part_lot.location_full + The storage location was marked as full, so you can not add a new part to it. + + + validator.part_lot.only_existing + The storage location was marked as "only existing", so you can not add new part to it. + + + validator.part_lot.single_part + The storage location was marked as "single part", so you can not add a new part to it. + + + m_status.active.help + The part is currently and in forseeable future in production + + + m_status.announced.help + The part was announced but is not available yet. + + + m_status.discontinued.help + The part is discontinued and not produced anymore. + + + m_status.eol.help + The product has reached its end-of-life and the production will be stopped soon. + + + m_status.nrfnd.help + The part is currently in production but is not recommended for new designs. + + + m_status.unknown.help + The manufacturing status of the part is not known. + + + flash.success + Success + + + flash.error + Error + + + flash.warning + Warning + + + flash.notice + Notice + + + flash.info + Info + diff --git a/translations/validators.de.xlf b/translations/validators.de.xlf index f064e2f1..c9e3e0c4 100644 --- a/translations/validators.de.xlf +++ b/translations/validators.de.xlf @@ -396,6 +396,34 @@ src\Entity\StructuralDBElement.php:0 src\Entity\Supplier.php:0 + + validator.noneofitschild.self + Ein Element kann nicht sich selbst übergeordnet sein! + + + validator.noneofitschild.children + Ein Kindelement kann nicht das übergeordnete Element sein! + + + validator.isSelectable + Das Element muss auswählbar sein! + + + validator.part_lot.location_full.no_increasment + Der verwendete Lagerort wurde als voll markiert, daher kann der Bestand nicht erhöht werden. (Neuer Bestand maximal {{ old_amount }}) + + + validator.part_lot.location_full + Der Lagerort ist voll, daher können keine neue Teile hinzugefügt werden. + + + validator.part_lot.only_existing + Der Lagerort wurde als "nur bestehende Teile" markiert, daher können keine neuen Teile hinzugefügt werden. + + + validator.part_lot.single_part + Der Lagerort wurde als "Nur ein Bauteil" markiert, daher kann kein neues Bauteil hinzugefügt werden. + diff --git a/translations/validators.en.xlf b/translations/validators.en.xlf index e0f1a23c..26386009 100644 --- a/translations/validators.en.xlf +++ b/translations/validators.en.xlf @@ -396,6 +396,34 @@ src\Entity\StructuralDBElement.php:0 src\Entity\Supplier.php:0 + + validator.noneofitschild.self + A element can not be its own parent. + + + validator.noneofitschild.children + The parent can not be one of the children of itself. + + + validator.isSelectable + The element must be selectable. + + + validator.part_lot.location_full.no_increasment + The storage location was marked as full, so you can not increase the instock amount. (New amount max. {{ old_amount }}) + + + validator.part_lot.location_full + The storage location was marked as full, so you can not add a new part to it. + + + validator.part_lot.only_existing + The storage location was marked as "only existing", so you can not add new part to it. + + + validator.part_lot.single_part + The storage location was marked as "single part", so you can not add a new part to it. +