Skip to content

How to ignore a trans call? #146

@Guite

Description

@Guite

I am trying to get the extraction working for the first time.

Unfortunately I am not able to get the Ignore annotation working properly yet.

Here is what I am doing:

use Translation\Extractor\Annotation\Ignore;

// ...
echo $this->getTranslator()->trans(/** @Ignore */$id, $parameters);

This leads to Argument 1 passed to Translation\Extractor\Visitor\BaseVisitor::addLocation() must be of the type string, null given, called in /.../vendor/php-translation/extractor/src/Visitor/Php/Symfony/ContainerAwareTrans.php on line 50 pointing to this call. Seems it still tries to extract this key.

When I exclude the affected class using excluded_names the process continues to the next occurence.

Is there something obvious I am missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions