Skip to content

Commit e81eadf

Browse files
committed
[TranslationDebug] workaround for getFallbackLocales.
1 parent bda3966 commit e81eadf

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

DataCollectorTranslator.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ public function getCatalogue($locale = null)
8888
return $this->translator->getCatalogue($locale);
8989
}
9090

91+
/**
92+
* Gets the fallback locales.
93+
*
94+
* @return array $locales The fallback locales
95+
*/
96+
public function getFallbackLocales()
97+
{
98+
if ($this->translator instanceof Translator) {
99+
return $this->translator->getFallbackLocales();
100+
}
101+
102+
return array();
103+
}
104+
91105
/**
92106
* Passes through all unknown calls onto the translator object.
93107
*/

LoggingTranslator.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ public function getCatalogue($locale = null)
8888
return $this->translator->getCatalogue($locale);
8989
}
9090

91+
/**
92+
* Gets the fallback locales.
93+
*
94+
* @return array $locales The fallback locales
95+
*/
96+
public function getFallbackLocales()
97+
{
98+
if ($this->translator instanceof Translator) {
99+
return $this->translator->getFallbackLocales();
100+
}
101+
102+
return array();
103+
}
104+
91105
/**
92106
* Passes through all unknown calls onto the translator object.
93107
*/

0 commit comments

Comments
 (0)