Added translations for validator strings.

This commit is contained in:
Jan Böhmer 2019-09-04 23:56:18 +02:00
parent b62b0918d7
commit 940b834057
6 changed files with 245 additions and 0 deletions

View file

@ -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');
}
}

View file

@ -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;
/**

View file

@ -1646,6 +1646,82 @@ Element 3</target>
<source>entity.edit.reset</source>
<target state="translated">Änderungen verwerfen</target>
</trans-unit>
<trans-unit id="noZi5aQ" resname="entity.info.parts_count">
<source>entity.info.parts_count</source>
<target state="translated">Bauteile mit diesem Element</target>
</trans-unit>
<trans-unit id="lZvhKYu" resname="validator.noneofitschild.self">
<source>validator.noneofitschild.self</source>
<target state="translated">Ein Element kann nicht sich selbst als übergeordnet sein!</target>
</trans-unit>
<trans-unit id="pr07aV4" resname="validator.noneofitschild.children">
<source>validator.noneofitschild.children</source>
<target state="translated">Ein Kindelement kann nicht das übergeordnete Element sein!</target>
</trans-unit>
<trans-unit id="0IF0VIF" resname="validator.isSelectable">
<source>validator.isSelectable</source>
<target state="translated">Das Element muss auswählbar sein!</target>
</trans-unit>
<trans-unit id="nd207H6" resname="validator.part_lot.location_full.no_increasment">
<source>validator.part_lot.location_full.no_increasment</source>
<target state="translated">Der verwendete Lagerort wurde als voll markiert, daher kann der Bestand nicht erhöht werden. (Neuer Bestand maximal {{ old_amount }})</target>
</trans-unit>
<trans-unit id="R6Ov4Yt" resname="validator.part_lot.location_full">
<source>validator.part_lot.location_full</source>
<target state="translated">Der Lagerort ist voll, daher können keine neue Teile hinzugefügt werden.</target>
</trans-unit>
<trans-unit id="6vIlN5q" resname="validator.part_lot.only_existing">
<source>validator.part_lot.only_existing</source>
<target state="translated">Der Lagerort wurde als "nur bestehende Teile" markiert, daher können keine neuen Teile hinzugefügt werden.</target>
</trans-unit>
<trans-unit id="BNQk2e7" resname="validator.part_lot.single_part">
<source>validator.part_lot.single_part</source>
<target state="translated">Der Lagerort wurde als "Nur ein Bauteil" markiert, daher kann kein neues Bauteil hinzugefügt werden.</target>
</trans-unit>
<trans-unit id="7yhBzTg" resname="m_status.active.help">
<source>m_status.active.help</source>
<target state="translated">Das Bauteil wird momentan und in absehbarer Zukunft produziert.</target>
</trans-unit>
<trans-unit id="UsEaNqy" resname="m_status.announced.help">
<source>m_status.announced.help</source>
<target state="translated">Das Bauteil wurde angekündigt, ist aber noch nicht erhältlich.</target>
</trans-unit>
<trans-unit id="huj6JXj" resname="m_status.discontinued.help">
<source>m_status.discontinued.help</source>
<target state="translated">Das Bauteil wird nicht mehr hergestellt.</target>
</trans-unit>
<trans-unit id="xytsZcE" resname="m_status.eol.help">
<source>m_status.eol.help</source>
<target state="translated">Die Produktion des Bauteils wird bald eingestellt.</target>
</trans-unit>
<trans-unit id="t8VuM2P" resname="m_status.nrfnd.help">
<source>m_status.nrfnd.help</source>
<target state="translated">Im Moment wird das Bauteil noch hergestellt, die Verwendung für neue Designs ist nicht mehr empfohlen.</target>
</trans-unit>
<trans-unit id="8x._AWi" resname="m_status.unknown.help">
<source>m_status.unknown.help</source>
<target state="translated">Der Produktionstatus ist nicht bekannt.</target>
</trans-unit>
<trans-unit id="g4ahva6" resname="flash.success">
<source>flash.success</source>
<target state="translated">Erfolg</target>
</trans-unit>
<trans-unit id="NehzWgk" resname="flash.error">
<source>flash.error</source>
<target state="translated">Fehler</target>
</trans-unit>
<trans-unit id="h8vhq_r" resname="flash.warning">
<source>flash.warning</source>
<target state="translated">Warnung</target>
</trans-unit>
<trans-unit id="m5p2YEz" resname="flash.notice">
<source>flash.notice</source>
<target state="translated">Hinweis</target>
</trans-unit>
<trans-unit id="YA5xZMy" resname="flash.info">
<source>flash.info</source>
<target state="translated">Info</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -1617,6 +1617,82 @@ Element 3</target>
<source>entity.edit.reset</source>
<target state="translated">Discard changes</target>
</trans-unit>
<trans-unit id="noZi5aQ" resname="entity.info.parts_count">
<source>entity.info.parts_count</source>
<target state="translated">Count of parts with this element</target>
</trans-unit>
<trans-unit id="lZvhKYu" resname="validator.noneofitschild.self">
<source>validator.noneofitschild.self</source>
<target state="translated">A element can not be its own parent.</target>
</trans-unit>
<trans-unit id="pr07aV4" resname="validator.noneofitschild.children">
<source>validator.noneofitschild.children</source>
<target state="translated">The parent can not be one of the children of itself.</target>
</trans-unit>
<trans-unit id="0IF0VIF" resname="validator.isSelectable">
<source>validator.isSelectable</source>
<target state="translated">The element must be selectable.</target>
</trans-unit>
<trans-unit id="nd207H6" resname="validator.part_lot.location_full.no_increasment">
<source>validator.part_lot.location_full.no_increasment</source>
<target state="translated">The storage location was marked as full, so you can not increase the instock amount. (New amount max. {{ old_amount }})</target>
</trans-unit>
<trans-unit id="R6Ov4Yt" resname="validator.part_lot.location_full">
<source>validator.part_lot.location_full</source>
<target state="translated">The storage location was marked as full, so you can not add a new part to it.</target>
</trans-unit>
<trans-unit id="6vIlN5q" resname="validator.part_lot.only_existing">
<source>validator.part_lot.only_existing</source>
<target state="translated">The storage location was marked as "only existing", so you can not add new part to it.</target>
</trans-unit>
<trans-unit id="BNQk2e7" resname="validator.part_lot.single_part">
<source>validator.part_lot.single_part</source>
<target state="translated">The storage location was marked as "single part", so you can not add a new part to it.</target>
</trans-unit>
<trans-unit id="7yhBzTg" resname="m_status.active.help">
<source>m_status.active.help</source>
<target state="translated">The part is currently and in forseeable future in production</target>
</trans-unit>
<trans-unit id="UsEaNqy" resname="m_status.announced.help">
<source>m_status.announced.help</source>
<target state="translated">The part was announced but is not available yet.</target>
</trans-unit>
<trans-unit id="huj6JXj" resname="m_status.discontinued.help">
<source>m_status.discontinued.help</source>
<target state="translated">The part is discontinued and not produced anymore.</target>
</trans-unit>
<trans-unit id="xytsZcE" resname="m_status.eol.help">
<source>m_status.eol.help</source>
<target state="translated">The product has reached its end-of-life and the production will be stopped soon.</target>
</trans-unit>
<trans-unit id="t8VuM2P" resname="m_status.nrfnd.help">
<source>m_status.nrfnd.help</source>
<target state="translated">The part is currently in production but is not recommended for new designs.</target>
</trans-unit>
<trans-unit id="8x._AWi" resname="m_status.unknown.help">
<source>m_status.unknown.help</source>
<target state="translated">The manufacturing status of the part is not known.</target>
</trans-unit>
<trans-unit id="g4ahva6" resname="flash.success">
<source>flash.success</source>
<target state="translated">Success</target>
</trans-unit>
<trans-unit id="NehzWgk" resname="flash.error">
<source>flash.error</source>
<target state="translated">Error</target>
</trans-unit>
<trans-unit id="h8vhq_r" resname="flash.warning">
<source>flash.warning</source>
<target state="translated">Warning</target>
</trans-unit>
<trans-unit id="m5p2YEz" resname="flash.notice">
<source>flash.notice</source>
<target state="translated">Notice</target>
</trans-unit>
<trans-unit id="YA5xZMy" resname="flash.info">
<source>flash.info</source>
<target state="translated">Info</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -396,6 +396,34 @@
<note priority="1">src\Entity\StructuralDBElement.php:0</note>
<note priority="1">src\Entity\Supplier.php:0</note>
</trans-unit>
<trans-unit id="lZvhKYu" resname="validator.noneofitschild.self">
<source>validator.noneofitschild.self</source>
<target state="translated">Ein Element kann nicht sich selbst übergeordnet sein!</target>
</trans-unit>
<trans-unit id="pr07aV4" resname="validator.noneofitschild.children">
<source>validator.noneofitschild.children</source>
<target state="translated">Ein Kindelement kann nicht das übergeordnete Element sein!</target>
</trans-unit>
<trans-unit id="0IF0VIF" resname="validator.isSelectable">
<source>validator.isSelectable</source>
<target state="translated">Das Element muss auswählbar sein!</target>
</trans-unit>
<trans-unit id="nd207H6" resname="validator.part_lot.location_full.no_increasment">
<source>validator.part_lot.location_full.no_increasment</source>
<target state="translated">Der verwendete Lagerort wurde als voll markiert, daher kann der Bestand nicht erhöht werden. (Neuer Bestand maximal {{ old_amount }})</target>
</trans-unit>
<trans-unit id="R6Ov4Yt" resname="validator.part_lot.location_full">
<source>validator.part_lot.location_full</source>
<target state="translated">Der Lagerort ist voll, daher können keine neue Teile hinzugefügt werden.</target>
</trans-unit>
<trans-unit id="6vIlN5q" resname="validator.part_lot.only_existing">
<source>validator.part_lot.only_existing</source>
<target state="translated">Der Lagerort wurde als "nur bestehende Teile" markiert, daher können keine neuen Teile hinzugefügt werden.</target>
</trans-unit>
<trans-unit id="BNQk2e7" resname="validator.part_lot.single_part">
<source>validator.part_lot.single_part</source>
<target state="translated">Der Lagerort wurde als "Nur ein Bauteil" markiert, daher kann kein neues Bauteil hinzugefügt werden.</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -396,6 +396,34 @@
<note priority="1">src\Entity\StructuralDBElement.php:0</note>
<note priority="1">src\Entity\Supplier.php:0</note>
</trans-unit>
<trans-unit id="lZvhKYu" resname="validator.noneofitschild.self">
<source>validator.noneofitschild.self</source>
<target state="translated">A element can not be its own parent.</target>
</trans-unit>
<trans-unit id="pr07aV4" resname="validator.noneofitschild.children">
<source>validator.noneofitschild.children</source>
<target state="translated">The parent can not be one of the children of itself.</target>
</trans-unit>
<trans-unit id="0IF0VIF" resname="validator.isSelectable">
<source>validator.isSelectable</source>
<target state="translated">The element must be selectable.</target>
</trans-unit>
<trans-unit id="nd207H6" resname="validator.part_lot.location_full.no_increasment">
<source>validator.part_lot.location_full.no_increasment</source>
<target state="translated">The storage location was marked as full, so you can not increase the instock amount. (New amount max. {{ old_amount }})</target>
</trans-unit>
<trans-unit id="R6Ov4Yt" resname="validator.part_lot.location_full">
<source>validator.part_lot.location_full</source>
<target state="translated">The storage location was marked as full, so you can not add a new part to it.</target>
</trans-unit>
<trans-unit id="6vIlN5q" resname="validator.part_lot.only_existing">
<source>validator.part_lot.only_existing</source>
<target state="translated">The storage location was marked as "only existing", so you can not add new part to it.</target>
</trans-unit>
<trans-unit id="BNQk2e7" resname="validator.part_lot.single_part">
<source>validator.part_lot.single_part</source>
<target state="translated">The storage location was marked as "single part", so you can not add a new part to it.</target>
</trans-unit>
</body>
</file>
</xliff>