[Translator] Set sources when extracting strings from php files#31249
[Translator] Set sources when extracting strings from php files#31249fabpot merged 1 commit intosymfony:masterfrom Stadly:extract-sources-php
Conversation
|
I don't understand why the test is failing on PHP7.3 I've tested with PHP7.3 locally, and it works fine. Can it have something to do with |
src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
Outdated
Show resolved
Hide resolved
|
I don't think the failing build has anything to do with this PR. |
src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
Outdated
Show resolved
Hide resolved
|
@Stadly I see that yo merge a branch here. Can you rebase to get rid of the merge commit? |
src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
Outdated
Show resolved
Hide resolved
|
Haha. I'm messing up everything. I'll try to fix it :) |
|
One last question about this PR: we set the filename as an absolute path. Is it useful? Wouldn't it be "better" to use a relative path? I'm not sure what the spec says about this. |
|
The path used when extracting is the one set as source, so whether it is absolute or relative depends on the user. |
|
Should I add a test using relative paths? |
|
Thank you @Stadly. |
…php files (Stadly) This PR was squashed before being merged into the 4.3-dev branch (closes #31249). Discussion ---------- [Translator] Set sources when extracting strings from php files | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Set metadata about filenames and line numbers when extracting translatable strings from php files. This PR complements #30909 and #31248, as those PRs implement support for dumping the filenames and line numbers to Po and Qt file formats. Commits ------- f05d4e4 [Translator] Set sources when extracting strings from php files
Set metadata about filenames and line numbers when extracting translatable strings from php files. This PR complements #30909 and #31248, as those PRs implement support for dumping the filenames and line numbers to Po and Qt file formats.