8000 [Translator] Document support for calling 'trans' with ICU formatted messages by someonewithpc · Pull Request #13875 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[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
wants to merge 1 commit into from

Conversation

someonewithpc
Copy link
Contributor
@someonewithpc someonewithpc commented Jun 21, 2020

@javiereguiluz javiereguiluz added the Waiting Code Merge Docs for features pending to be merged label Jun 22, 2020
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
@xabbuh xabbuh added Translation and removed Waiting Code Merge Docs for features pending to be merged labels Oct 16, 2020
@wouterj wouterj changed the title Add documentation for pull #37371 [Translation] Document support for calling 'trans' with ICU formatted messages Oct 23, 2020
@wouterj wouterj added this to the 5.2 milestone Oct 23, 2020
@wouterj wouterj changed the base branch from master to 5.x October 23, 2020 11:30
@xabbuh xabbuh changed the base branch from 5.x to 5.2 November 17, 2020 10:07
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
@javiereguiluz
Copy link
Member

Hugo, thanks for providing these new docs ... and congrats on your first Symfony Docs contribution! 🎉

@carsonbot carsonbot changed the title [Translation] Document support for calling 'trans' with ICU formatted messages [Translator] Document support for calling 'trans' with ICU formatted messages Dec 22, 2020
@javiereguiluz
Copy link
Member

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0