aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-01-09 10:36:52 +0100
committerMarcel Klehr <mklehr@gmx.net>2024-01-10 11:16:14 +0100
commit1fd0c2979e1edfb667cbb0e7abbc3c342f7d11f6 (patch)
tree89f0838978639e20fc2250c831f6a68ca96c2c4f /apps/settings/lib
parent50aeae6a858094d86d93d0db12889ca98d226ab0 (diff)
downloadnextcloud-server-1fd0c2979e1edfb667cbb0e7abbc3c342f7d11f6.tar.gz
nextcloud-server-1fd0c2979e1edfb667cbb0e7abbc3c342f7d11f6.zip
enh(OCP\Translation): Add ITranslationProviderWithId
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'apps/settings/lib')
-rw-r--r--apps/settings/lib/Settings/Admin/ArtificialIntelligence.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
index e2862139e49..ab0dc1446bb 100644
--- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
+++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
@@ -37,6 +37,7 @@ use OCP\TextProcessing\IProvider;
use OCP\TextProcessing\IProviderWithId;
use OCP\TextProcessing\ITaskType;
use OCP\Translation\ITranslationManager;
+use OCP\Translation\ITranslationProviderWithId;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
@@ -62,7 +63,7 @@ class ArtificialIntelligence implements IDelegatedSettings {
$translationPreferences = [];
foreach ($this->translationManager->getProviders() as $provider) {
$translationProviders[] = [
- 'class' => $provider::class,
+ 'class' => $provider instanceof ITranslationProviderWithId ? $provider->getId() : $provider::class,
'name' => $provider->getName(),
];
$translationPreferences[] = $provider::class;