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][cache fallback] keep only missing messages in fallbackCatalogue.#14318

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

Closed

Conversation

aitboudad
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Fixed tickets#14315
Tests pass?yes
LicenseMIT

@@ -444,6 +430,14 @@ private function getFallbackContent(MessageCatalogue $catalogue)
$fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback));
$currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current));

$fallbackMessages = $fallbackCatalogue->all();
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be inelse to avoid call if not needed as you replace it if not in debug anyway...

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

fixed

@mpdude
Copy link
Contributor

I don't think this optimizes anything?

@aitboudadaitboudadforce-pushed thetranslation_catalogue_merge branch from547c8a9 to41fd50aCompareApril 12, 2015 09:14
@aitboudadaitboudadforce-pushed thetranslation_catalogue_merge branch from41fd50a to41f1eccCompareApril 12, 2015 11:08
@stof
Copy link
Member

@mpdude this PR is about fixing a bug in the previous optimization. and keeping only the missing messages rather than the whole fallback catalogue is about optimizing memory usage.

@stof
Copy link
Member

@nicolas-grekas we have a Fatal Error related to the Debug component in the deps=high build when running the TwigBundle tests. It would be great to investigate it

@mpdude
Copy link
Contributor

@stof sure, I understand what it is about. The thing is that this optimization and dropping the messages causes unintuitive and possibly BC breaking behaviour when getting the catalogue from the translator (#14315).

As this PR passes the tests from#14315 I wonder if itreally fixes the problem or if the actual optimization does not happen anymore at all, although (at a glimpse) the code suggests it.

@aitboudad
Copy link
ContributorAuthor

@mpdude I removed your last commit(e9cb79d) as It won't pass and I think it's useless

@mpdude
Copy link
Contributor

No, it's not useless. It shows that your fix here does not suffice. Run it against a Symfony version before the optimization was introduced and it will pass.

@aitboudad
Copy link
ContributorAuthor

@mpdude ok no problem for me :)

@mpdude
Copy link
Contributor

I have an idea how we might be able to rescue this. It's not gonna be beautiful, but might work. Need to think about it a little more and will get back to you.

@aitboudadaitboudad deleted the translation_catalogue_merge branchApril 14, 2015 06:39
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.

4 participants
@aitboudad@mpdude@stof@stloyd

[8]ページ先頭

©2009-2025 Movatter.jp