Skip to content

Bug: xliff file-source is truncated at the beginning #482

@allan-simon

Description

@allan-simon

When I run the command bin/console translation:extract app

I got in the xliff file

    <unit id="0f6q9sX" name="The first name cannot be more than 255 characters.">
      <notes>
        <note category="file-source" priority="1">agrant/src/Entity/Employee.php:0</note>
      </notes>
      <segment>
        <source>The first name cannot be more than 255 characters.</source>
        <target></target>
      </segment>
    </unit>

while it should be /vagrant/src/Entity/Employee.php , the issue seems to be there https://github.com/php-translation/symfony-bundle/blob/master/Service/Importer.php#L136

as my project_root is detected as / so / is 1 in length , with the +1 done, the /v is removed

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