Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Translation File Generation #30443

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
dtfafard opened this issue Mar 4, 2019 · 2 comments
Closed

Translation File Generation #30443

dtfafard opened this issue Mar 4, 2019 · 2 comments

Comments

@dtfafard
Copy link

dtfafard commented Mar 4, 2019

Hi guys,

very small bug but that took me 4 hours to find the fix. When generating the files using :

php bin/console translation:update --dump-messages --force fr

It generates the files with the extension "yml" by default.

According to : https://symfony.com/doc/current/translation.html#translation-resource-file-names-and-locations, the translation component only recognizes files with the extension "yaml".

I think this could be fixed quite easily.

Also, since your documentation recommends to use XLF, I think the script should generate the files in XLF too. Or change the documentation to mention that the default should be YAML/YML (I personally prefer YAML/YML). This would make everything consistent.

@GaryPEGEOT
Copy link
Contributor

Has been done on #27935 :)

@javiereguiluz
Copy link
Member

@GaryPEGEOT in #27935 we made XLF the default format ... but here another bug has been reported too: the command generates a .yml file which Symfony doesn't load because it only loads .yaml

@fabpot fabpot closed this as completed Mar 9, 2019
fabpot added a commit that referenced this issue Mar 9, 2019
…EGEOT)

This PR was squashed before being merged into the 3.4 branch (closes #30498).

Discussion
----------

[translation] Update defaut format from yml to yaml

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30443
| License       | MIT
| Doc PR        |

As stated in #30443 , command `php bin/console translation:update --dump-messages --force fr` will by default output the translation to yml format, which is not supported by Symfony

Commits
-------

ba42030 [translation] Update defaut format from yml to yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants