mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
PHRAS-3426_translations-ignored_MASTER
- fix : crashed when @Ignore annotation was used in form item - fix : translate "help_message"s from forms - fix : replace many "string-typed" form elements by "type::class" dump translations (4 new strings)
This commit is contained in:
@@ -11,16 +11,17 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Command\Developer\Utils;
|
||||
|
||||
use Doctrine\Common\Annotations\DocParser;
|
||||
use JMS\TranslationBundle\Annotation\Desc;
|
||||
use JMS\TranslationBundle\Annotation\Ignore;
|
||||
use JMS\TranslationBundle\Annotation\Meaning;
|
||||
use JMS\TranslationBundle\Exception\RuntimeException;
|
||||
use JMS\TranslationBundle\Logger\LoggerAwareInterface;
|
||||
use JMS\TranslationBundle\Model\FileSource;
|
||||
use JMS\TranslationBundle\Model\Message;
|
||||
use JMS\TranslationBundle\Annotation\Meaning;
|
||||
use JMS\TranslationBundle\Annotation\Desc;
|
||||
use JMS\TranslationBundle\Annotation\Ignore;
|
||||
use Doctrine\Common\Annotations\DocParser;
|
||||
use JMS\TranslationBundle\Model\MessageCatalogue;
|
||||
use JMS\TranslationBundle\Translation\Extractor\FileVisitorInterface;
|
||||
use PhpParser\Comment\Doc;
|
||||
use PHPParser\Node;
|
||||
use PHPParser\Node\Expr\Array_;
|
||||
use PHPParser\Node\Scalar\String_;
|
||||
@@ -94,7 +95,8 @@ class HelpMessageExtractor implements FileVisitorInterface, NodeVisitor, LoggerA
|
||||
$docComment = $item->key->getDocComment();
|
||||
$docComment = $docComment ? $docComment : $item->value->getDocComment();
|
||||
if ($docComment) {
|
||||
foreach ($this->docParser->parse($docComment, 'file '.$this->file.' near line '.$item->value->getLine()) as $annot) {
|
||||
/** @var Doc $docComment */
|
||||
foreach ($this->docParser->parse($docComment->getText(), 'file '.$this->file.' near line '.$item->value->getLine()) as $annot) {
|
||||
if ($annot instanceof Ignore) {
|
||||
$ignore = true;
|
||||
} elseif ($annot instanceof Desc) {
|
||||
|
Reference in New Issue
Block a user