mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix(translation): Don't use translation providers when from and to are the same
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
263a6910c4
commit
505e467cc4
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue