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

[#18637][TranslationDebug] workaround for getFallbackLocales. #20465

Merged
merged 1 commit into from
Nov 9, 2016

Conversation

aitboudad
Copy link
Contributor

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 = [];
Copy link
Contributor

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 ($translator instanceof Translator) {
$fallbackLocales = $translator->getFallbackLocales();
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Copy link
Contributor

Simperfit commented Nov 9, 2016

@aitboudad since you introduced two new public method, could you please add tests for them ?

@fabpot
Copy link
Member

fabpot commented Nov 9, 2016

Thank you @aitboudad.

@fabpot fabpot merged commit 31deea1 into symfony:2.7 Nov 9, 2016
fabpot added a commit that referenced this pull request Nov 9, 2016
…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.
@aitboudad aitboudad deleted the issue_18637 branch November 10, 2016 07:34
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

5 participants