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
parent 263a6910c4
commit 505e467cc4
No known key found for this signature in database
GPG Key ID: C400AAF20C1BB6FC
  1. 4
      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);

Loading…
Cancel
Save