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

[Translation] Fix FileDumper behavior #34797

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Dec 4, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #34713
License MIT
Doc PR -

Execute bin/console translation:update --force en command:

Before

See related issue for details #34713

After

The default translation file name will depend on whether the intl (or polyfill) extension is installed or not.

For exmaple:

Intl extension (or polyfill) installed translation file created
no messages.en.xlf
yes messages+intl-icu.en.xlf

However, if you are currently updating a single file, that file name will be used regardless of whether the Intl extension is installed, i.e. if you have this translation file: messages.en.xlf, new translation keys will be stored in it, even if you have installed the intl extension.

Last, if both translation files (messages.es.xlf and messages+intl-icu.en.xlf) coexist in the same path, rare but possible, we will use the default filename guessed earlier to store all current messages and the another file will be emptied.

@fabpot
Copy link
Member

fabpot commented Dec 4, 2019

Thank you @yceruto.

fabpot added a commit that referenced this pull request Dec 4, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] Fix FileDumper behavior

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34713
| License       | MIT
| Doc PR        | -

Execute `bin/console translation:update --force en` command:

## Before
See related issue for details #34713

## After
The default translation file name will depend on whether the intl (or polyfill) extension is installed or not.

For exmaple:

| Intl extension (or polyfill) installed | translation file created |
| --- | --- |
| no | messages.en.xlf |
| yes | messages+intl-icu.en.xlf |

However, if you are currently updating a single file, that file name will be used regardless of whether the Intl extension is installed, i.e. if you have this translation file: `messages.en.xlf`, new translation keys will be stored in it, even if you have installed the intl extension.

Last, if both translation files (`messages.es.xlf` and `messages+intl-icu.en.xlf`) coexist in the same path, rare but possible, we will use the default filename guessed earlier to store all current messages and the another file will be emptied.

Commits
-------

1c41ae7 Fixed translations file dumper behavior
@fabpot fabpot merged commit 1c41ae7 into symfony:4.4 Dec 4, 2019
@yceruto yceruto deleted the trans_dump branch December 4, 2019 11:13
This was referenced Dec 19, 2019
nicolas-grekas added a commit that referenced this pull request Jan 21, 2020
…fix #34713 (yceruto)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Revert #34797 "Fixed translations file dumper behavior" and fix #34713

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35264
| License       | MIT
| Doc PR        | -

Revert #34797

See also #35328

It's very likely that the new way will be completely different from this one that is being reverted. That's why I'm reverting rather than fixing it.

Commits
-------

9ca8720 Fixed #34713 Move new messages to intl domain when possible
56e79fe Revert "Fixed translations file dumper behavior"
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Jan 21, 2020
…d fix #34713 (yceruto)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Revert #34797 "Fixed translations file dumper behavior" and fix #34713

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35264
| License       | MIT
| Doc PR        | -

Revert symfony/symfony#34797

See also symfony/symfony#35328

It's very likely that the new way will be completely different from this one that is being reverted. That's why I'm reverting rather than fixing it.

Commits
-------

9ca872054b Fixed #34713 Move new messages to intl domain when possible
56e79fefa1 Revert "Fixed translations file dumper behavior"
This was referenced Jan 21, 2020
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.

None yet

3 participants