Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[#18637][TranslationDebug] workaround for getFallbackLocales.#20465
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
aitboudad commentedNov 9, 2016
| Q | A |
|---|---|
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #18637 |
| License | MIT |
| Doc PR | ~ |
| if (is_dir($path)) { | ||
| $loader->loadMessages($path,$fallbackCatalogue); | ||
| } | ||
| $fallbackLocales = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
array()
| }catch (\Throwable$e) { | ||
| } | ||
| }elseif ($translatorinstanceof Translator) { | ||
| $fallbackLocales =$translator->getFallbackLocales(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What about a new interface for this? Or at least actually define this method? Imo. we should not rely on the magic__call behavior of these translators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What about a new interface for this?
seems better!
Imo. we should not rely on the magic __call behavior of these translators.
right, It was added for BC and I think we should deprecate this behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I defined this method for the moment
Simperfit commentedNov 9, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@aitboudad since you introduced two new public method, could you please add tests for them ? |
fabpot commentedNov 9, 2016
Thank you@aitboudad. |
…es. (aitboudad)This PR was merged into the 2.7 branch.Discussion----------[#18637][TranslationDebug] workaround for getFallbackLocales.| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#18637| License | MIT| Doc PR | ~Commits-------31deea1 [TranslationDebug] workaround for getFallbackLocales.