-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Translator] Document support for calling 'trans' with ICU formatted messages #13875
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Aug 30, 2020
… formatted messages (someonewithpc) This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- [Translation] Add support for calling 'trans' with ICU formatted messages | Q | A | ------------- | --- | Branch? | master | Bug fix? | maybe, see #37228 | New feature? | yes | Deprecations? | no | Tickets | Fix #37228 | License | MIT | Doc PR | symfony/symfony-docs#13875 Motivation: ``` $apples = [0 => 'No apples', 1 => '1 apple', '# apples']; echo _m($apples, ['count' => 0]); // Outputs 'No apples' echo _m($apples, ['count' => 2]); // Outputs '2 apples' ``` where `_m` is a wrapper my application is using, but we obviously don't want to replicate many of the effort of the translation component, so it relies on `trans`. This wrapper itself could be integrated into Symfony, if deemed appropriate. See #37228 Commits ------- d2ec41f [Translation] Add support for calling 'trans' with ICU formatted messages
symfony-splitter
pushed a commit
to symfony/translation
that referenced
this pull request
Aug 30, 2020
… formatted messages (someonewithpc) This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- [Translation] Add support for calling 'trans' with ICU formatted messages | Q | A | ------------- | --- | Branch? | master | Bug fix? | maybe, see symfony/symfony#37228 | New feature? | yes | Deprecations? | no | Tickets | Fix #37228 | License | MIT | Doc PR | symfony/symfony-docs#13875 Motivation: ``` $apples = [0 => 'No apples', 1 => '1 apple', '# apples']; echo _m($apples, ['count' => 0]); // Outputs 'No apples' echo _m($apples, ['count' => 2]); // Outputs '2 apples' ``` where `_m` is a wrapper my application is using, but we obviously don't want to replicate many of the effort of the translation component, so it relies on `trans`. This wrapper itself could be integrated into Symfony, if deemed appropriate. See #37228 Commits ------- d2ec41f4ef [Translation] Add support for calling 'trans' with ICU formatted messages
javiereguiluz
added a commit
that referenced
this pull request
Dec 22, 2020
…ICU formatted messages (someonewithpc) This PR was merged into the 5.2 branch. Discussion ---------- [Translation] Document support for calling 'trans' with ICU formatted messages See symfony/symfony#37371 Commits ------- a490d10 Add documentation for pull #37371
Hugo, thanks for providing these new docs ... and congrats on your first Symfony Docs contribution! 🎉 |
I'm closing this manually because GitHub didn't do that automatically. But this was successfully merged. See 33c0ce3 |
SerhiyMytrovtsiy
added a commit
to SerhiyMytrovtsiy/translation
that referenced
this pull request
Oct 19, 2022
… formatted messages (someonewithpc) This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- [Translation] Add support for calling 'trans' with ICU formatted messages | Q | A | ------------- | --- | Branch? | master | Bug fix? | maybe, see symfony/symfony#37228 | New feature? | yes | Deprecations? | no | Tickets | Fix #37228 | License | MIT | Doc PR | symfony/symfony-docs#13875 Motivation: ``` $apples = [0 => 'No apples', 1 => '1 apple', '# apples']; echo _m($apples, ['count' => 0]); // Outputs 'No apples' echo _m($apples, ['count' => 2]); // Outputs '2 apples' ``` where `_m` is a wrapper my application is using, but we obviously don't want to replicate many of the effort of the translation component, so it relies on `trans`. This wrapper itself could be integrated into Symfony, if deemed appropriate. See #37228 Commits ------- d2ec41f4ef [Translation] Add support for calling 'trans' with ICU formatted messages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See symfony/symfony#37371