Skip to content

[FrameworkBundle] Fix translations dir discovery #16139

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

Merged
merged 1 commit into from
Oct 6, 2015

Conversation

nicolas-grekas
Copy link
Member

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


if (file_exists($legacyTranslationsDir)) {
if (!file_exists($translationsDir) && file_exists($dir = dirname($r->getFilename()).'/../../Resources/translations')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both path exists in 2.3, but only one contains every translation files :/
So in 2.3, only /../Resources/translations will be loaded, which only contains az and he translations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, we have the new path in 2.3 with only incomplete files ? This looks wrong to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sorry, I merged really to quickly... let's try again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ogizanagi can you please work on this? (removing Resources/translations from Security/Core in 2.3 also)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I did not notice that translations are contained in both directories (even if not both are complete). I guess the real issue was caused by allowing to install symfony/security and symfony/security-core in parallel (see #16134) which led to the AuthenticationException being found first in the core package.

@nicolas-grekas Removing the translations from the core package means that we should use another class to detect the translations directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabbuh : Why ? We should only remove those translations files from 2.3 and use symfony/security Resources/translations folder.
Wouldn't be ok ? (it should not be propagated to upper branches)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #16141

@nicolas-grekas nicolas-grekas merged commit f37ceef into symfony:2.3 Oct 6, 2015
nicolas-grekas added a commit that referenced this pull request Oct 6, 2015
…s-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix translations dir discovery

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

Commits
-------

f37ceef [FrameworkBundle] Fix translations dir discovery
@nicolas-grekas nicolas-grekas deleted the fix branch October 6, 2015 09:06
nicolas-grekas added a commit that referenced this pull request Oct 6, 2015
…ity/core in 2.3 & dir loading (ogizanagi)

This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] [Security] Remove trans from the security/core in 2.3 & dir loading

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

See #16139 (comment).

I think the most efficient solution is to remove translations from `Security/Core` in 2.3 only (should not be propagated to newest branches!) and load both folders if they exist.

Commits
-------

1ed07a0 [FrameworkBundle] [Security] Remove trans from the security/core in 2.3 & dir loading
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.

5 participants