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

Appearance settings

Commit 5c394ee

Browse filesBrowse files
committed
Collect locale details earlier in the process in TranslationDataCollector
1 parent 0bf8d12 commit 5c394ee
Copy full SHA for 5c394ee

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

‎src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ public function lateCollect()
3636
{
3737
$messages = $this->sanitizeCollectedMessages($this->translator->getCollectedMessages());
3838

39-
$this->data = $this->computeCount($messages);
39+
$this->data += $this->computeCount($messages);
4040
$this->data['messages'] = $messages;
4141

42-
$this->data['locale'] = $this->translator->getLocale();
43-
$this->data['fallback_locales'] = $this->translator->getFallbackLocales();
44-
4542
$this->data = $this->cloneVar($this->data);
4643
}
4744

@@ -50,6 +47,8 @@ public function lateCollect()
5047
*/
5148
public function collect(Request $request, Response $response, \Exception $exception = null)
5249
{
50+
$this->data['locale'] = $this->translator->getLocale();
51+
$this->data['fallback_locales'] = $this->translator->getFallbackLocales();
5352
}
5453

5554
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.