Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Translation] Add resources from fallback locale to parent catalogue#17596

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

Merged
fabpot merged 1 commit intosymfony:2.3fromc960657:translator-fallback-resources
Jan 31, 2016

Conversation

@c960657
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

The resources representing a locale includes those of the fallback locale. However,getCatalogue()->getResources() only returns the resources belonging specifically to the selected locale.

Example: The localeen_GB falls back toen. I use the localeen_GB. During development, when I modify theen_GB translation file, the changes appear instantly when reloading the page. If I modify theen translation file, I need to manually clear the cache in order for the new translation to appear.

I believe this is a regression that was introduced in#15527.

This patch is for the 2.3 branch. For 2.6 and later, the test can be updated to use the getCatalogue() method instead of using ReflectionProperty.

Copy link
Contributor

Choose a reason for hiding this comment

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

you can get catalogue from the translator without using reflection,$translator->getCatalogue('en')

Copy link
Contributor

Choose a reason for hiding this comment

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

Not in branch2.3.

Copy link
Contributor

Choose a reason for hiding this comment

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

yep 👍

Copy link
Member

Choose a reason for hiding this comment

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

simplified inccc6d31 for 2.7.

@fabpot
Copy link
Member

Thank you@c960657.

@fabpotfabpot merged commitf7f82fa intosymfony:2.3Jan 31, 2016
fabpot added a commit that referenced this pull requestJan 31, 2016
… catalogue (c960657)This PR was merged into the 2.3 branch.Discussion----------[Translation] Add resources from fallback locale to parent catalogue| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -The resources representing a locale includes those of the fallback locale. However, `getCatalogue()->getResources()` only returns the resources belonging specifically to the selected locale.Example: The locale `en_GB` falls back to `en`. I use the locale `en_GB`. During development, when I modify the `en_GB` translation file, the changes appear instantly when reloading the page. If I modify the `en` translation file, I need to manually clear the cache in order for the new translation to appear.I believe this is a regression that was introduced in#15527.This patch is for the 2.3 branch. For 2.6 and later, the test can be updated to use the getCatalogue() method instead of using ReflectionProperty.Commits-------f7f82fa [Translation] Add resources from fallback locale
@fabpotfabpot mentioned this pull requestFeb 3, 2016
This was referencedFeb 28, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@c960657@fabpot@stloyd@aitboudad@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp