Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
allan-simon opened this issue Nov 3, 2022 · 1 comment
Open

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

allan-simon opened this issue Nov 3, 2022 · 1 comment

Comments

@allan-simon
Copy link

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

@allan-simon
Copy link
Author

setting project_root to %kernel.project_dir% solve the issue but I'm not sure if if intented to be used like that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant