8000 Translator : Retrieve every locales avalaible · Issue #13919 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Translator : Retrieve every locales avalaible #13919

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
xavierleune opened this issue Mar 13, 2015 · 0 comments
Closed

Translator : Retrieve every locales avalaible #13919

xavierleune opened this issue Mar 13, 2015 · 0 comments

Comments

@xavierleune
Copy link
Contributor

Hi,

I'm concerned about having no file generated in cache folder at runtime. My last problem is about the translation catalogues which are lazy loaded.
In fact I've read many lines of code and many issues about translator, there is actually no way to retrieve the list of locales.
Actually my idea is to add an optionnal entry to the "framework" conf key, to list available locales. If this entry is filled, it would be easy to run Translator::getCatalogue in a cache warmer. It means no BC Break and like other cache in symfony, the actual working would remain this one : if the cache file exists, load it. If not, create it and load it.

This patch is easy to do and I would be glad to do it, but I want to have your point of view before submitting my PR.

What do you think about it ?

xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 16, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 16, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 16, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 17, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 17, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 23, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 24, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 24, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 24, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 24, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 26, 2015
aitboudad pushed a commit to aitboudad/symfony that referenced this issue Mar 29, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 30, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 31, 2015
xavierleune added a commit to xavierleune/symfony that referenced this issue Mar 31, 2015
aitboudad added a commit that referenced this issue Apr 3, 2015
…p (xavierleune)

This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][Translation] generate translation cache at warmup

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13919
| License       | MIT
| Doc PR        | NA

This PR uses the parameters "locale" and "fallback_locales" to generate the catalogues at warmup, avoiding the creation of files at runtime.

Commits
-------

94d3876 FIX #13919 added TranslationsCacheWarmer to generate catalogues at warmup
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

2 participants
0