Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle][Translation] Added support for PHP files with trans() in translation commands#30120

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromyceruto:add_php_files_support
Feb 16, 2019

Conversation

@yceruto
Copy link
Member

@ycerutoyceruto commentedFeb 8, 2019
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#29085
LicenseMIT
Doc PR-

This PR allows translation commands be able to debug and update translation messages from any PHP file/class defined as service, injecting or wiring thetranslator service, e.g.:

useSymfony\Component\Translation\TranslatorInterface;class ParallelUniverseControllerextends AbstractController{publicfunctionhello(Request$request,TranslatorInterface$translator)    {// this id 'hello_message' will be extracted from translation:update$message =$translator->trans('hello_message');// send message to space...    }}

this supports all ways of wiring (auto or not): via constructor, public property, method calls, service subscriber and controller argument.

rvanlaak, MatTheCat, petrofcikmatus, tyx, and yceruto reacted with hooray emoji
@fabpot
Copy link
Member

#29121 is now merged, can be rebased.

yceruto and petrofcikmatus reacted with thumbs up emoji

@yceruto
Copy link
MemberAuthor

Rebased (Travis failure is unrelated), ready on my side, thanks.

@fabpot
Copy link
Member

Thank you@yceruto.

yceruto and petrofcikmatus reacted with hooray emoji

@fabpotfabpot merged commit9f9b828 intosymfony:masterFeb 16, 2019
fabpot added a commit that referenced this pull requestFeb 16, 2019
…iles with trans() in translation commands (yceruto)This PR was merged into the 4.3-dev branch.Discussion----------[FrameworkBundle][Translation] Added support for PHP files with trans() in translation commands| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#29085| License       | MIT| Doc PR        | -This PR allows translation commands be able to debug and update translation messages from any PHP file/class defined as service, injecting or wiring the `translator` service, e.g.:```phpuse Symfony\Component\Translation\TranslatorInterface;class ParallelUniverseController extends AbstractController{    public function hello(Request $request, TranslatorInterface $translator)    {        // this id 'hello_message' will be extracted from translation:update        $message = $translator->trans('hello_message');        // send message to space...    }}```this supports all ways of wiring (auto or not): via constructor, public property, method calls, service subscriber and controller argument.Commits-------9f9b828 Added support for PHP files with translation in translation commands
@ycerutoyceruto deleted the add_php_files_support branchFebruary 16, 2019 13:12
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestMay 28, 2019
…P files (javiereguiluz)This PR was squashed before being merged into the 4.3 branch (closes#11598).Discussion----------Mentioned the extraction of translation contents from PHP filesSeesymfony/symfony#30120 andhttps://symfony.com/blog/new-in-symfony-4-3-extracting-translation-contents-from-php-files.Commits-------f82ad62 Mentioned the extraction of translation contents from PHP files
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@yceruto@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp