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

[Translator] Set sources when extracting strings from php files #31249

Merged
merged 1 commit into from May 7, 2019

Conversation

Projects
None yet
4 participants
@Stadly
Copy link
Contributor

commented Apr 25, 2019

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.

@Stadly

This comment has been minimized.

Copy link
Contributor Author

commented Apr 25, 2019

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 deps=low?

@nicolas-grekas nicolas-grekas added this to the next milestone Apr 26, 2019

@fabpot

fabpot approved these changes Apr 29, 2019

@Stadly

This comment has been minimized.

Copy link
Contributor Author

commented Apr 29, 2019

I don't think the failing build has anything to do with this PR.

@fabpot fabpot force-pushed the Stadly:extract-sources-php branch 2 times, most recently from 870953e to 3b1470a Apr 29, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented May 2, 2019

@Stadly I see that yo merge a branch here. Can you rebase to get rid of the merge commit?

@Stadly

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Haha. I'm messing up everything. I'll try to fix it :)

@Stadly Stadly force-pushed the Stadly:extract-sources-php branch from 7981b4d to 42528f3 May 2, 2019

@fabpot

fabpot approved these changes May 2, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented May 2, 2019

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.

@Stadly

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

The path used when extracting is the one set as source, so whether it is absolute or relative depends on the user. extract(__DIR__.'/../src/') will give absolute paths, while extract('../src/') will give relative paths.

@Stadly

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Should I add a test using relative paths?

@fabpot fabpot force-pushed the Stadly:extract-sources-php branch from f423000 to f05d4e4 May 7, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented May 7, 2019

Thank you @Stadly.

@fabpot fabpot merged commit f05d4e4 into symfony:master May 7, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request May 7, 2019

feature #31249 [Translator] Set sources when extracting strings from …
…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

@Stadly Stadly deleted the Stadly:extract-sources-php branch May 7, 2019

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.