Browse Source
fix(translation): Don't use translation providers when from and to are the same
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/38097/head
Joas Schilling
3 years ago
No known key found for this signature in database
GPG Key ID: C400AAF20C1BB6FC
1 changed files with
4 additions and
0 deletions
-
lib/private/Translation/TranslationManager.php
|
|
|
@ -80,6 +80,10 @@ class TranslationManager implements ITranslationManager { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($fromLanguage === $toLanguage) { |
|
|
|
return $text; |
|
|
|
} |
|
|
|
|
|
|
|
foreach ($this->getProviders() as $provider) { |
|
|
|
try { |
|
|
|
return $provider->translate($fromLanguage, $toLanguage, $text); |
|
|
|
|