v1r0x / integration_libretranslate

LibreTranslate integration providing translations using your own server/api key in Nextcloud Text App
GNU Affero General Public License v3.0
10 stars 0 forks source link

update to Nc27 #1

Closed szaimen closed 9 months ago

szaimen commented 11 months ago

Hi, Nc27 is already out since a while. Would be cool if your app was compatible with Nc27 as well. Thanks for your work! :)

v1r0x commented 10 months ago

Hi, thanks for the hint! I'll look into it and see if and what changes are needed for an update :+1:

jospoortvliet commented 10 months ago

Hi @v1r0x ! This is cool, on-server translation! Look forward to the update - note that Nc 28 is also near already...

v1r0x commented 10 months ago

Thanks for your nice feedback!

I just released a new version (1.1.0) with a simple GUI in the additional settings (admin settings) and support for NC 27 and 28.

Can you confirm that it works for you on either NC 27 or NC 28 Beta? Thanks!

nunesgh commented 10 months ago

I have installed the app on Nextcloud 27, but Source/Target Language settings are always returning to en/de and I cannot find the app anywhere to actually use it.

Also, the error below was logged. ``` [integration_libretranslate] Error: Exception: en is not an available language. at <> 0. /var/www/nextcloud/apps/integration_libretranslate/vendor/jefs42/libretranslate/src/LibreTranslate.php line 61 Jefs42\LibreTranslate->setSource() 1. /var/www/nextcloud/apps/integration_libretranslate/lib/LibretranslateProvider.php line 72 Jefs42\LibreTranslate->__construct() 2. <> OCA\IntegrationLibreTranslate\LibretranslateProvider->__construct() 3. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 84 ReflectionClass->newInstanceArgs() 4. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 124 OC\AppFramework\Utility\SimpleContainer->buildClass() 5. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 142 OC\AppFramework\Utility\SimpleContainer->resolve() 6. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 494 OC\AppFramework\Utility\SimpleContainer->query() 7. /var/www/nextcloud/lib/private/ServerContainer.php line 155 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback() 8. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 65 OC\ServerContainer->query() 9. /var/www/nextcloud/lib/private/Translation/TranslationManager.php line 128 OC\AppFramework\Utility\SimpleContainer->get() 10. /var/www/nextcloud/lib/private/Translation/TranslationManager.php line 145 OC\Translation\TranslationManager->getProviders() 11. /var/www/nextcloud/apps/text/lib/Service/InitialStateProvider.php line 43 OC\Translation\TranslationManager->canDetectLanguage() 12. /var/www/nextcloud/apps/text/lib/Listeners/LoadViewerListener.php line 54 OCA\Text\Service\InitialStateProvider->provideState() 13. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86 OCA\Text\Listeners\LoadViewerListener->handle() 14. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251 OC\EventDispatcher\ServiceEventListener->__invoke() 15. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73 Symfony\Component\EventDispatcher\EventDispatcher->callListeners() 16. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 94 Symfony\Component\EventDispatcher\EventDispatcher->dispatch() 17. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 106 OC\EventDispatcher\EventDispatcher->dispatch() 18. /var/www/nextcloud/apps/dashboard/lib/Controller/DashboardController.php line 87 OC\EventDispatcher\EventDispatcher->dispatchTyped() 19. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Dashboard\Controller\DashboardController->index() 20. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController() 21. /var/www/nextcloud/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch() 22. /var/www/nextcloud/lib/private/Route/Router.php line 315 OC\AppFramework\App::main() 23. /var/www/nextcloud/lib/base.php line 1068 OC\Route\Router->match() 24. /var/www/nextcloud/index.php line 36 OC::handleRequest() GET /apps/dashboard/ [PHP] Error: foreach() argument must be of type array|object, null given at /var/www/nextcloud/apps/integration_libretranslate/vendor/jefs42/libretranslate/src/LibreTranslate.php#119 GET /apps/dashboard/ ```
v1r0x commented 10 months ago

Thanks! I just uploaded a new version, that should fix setting source/target language.

When the app is enabled you can decide which of installed translation providers you want to use (NC admin settings > Artificial Intelligence). This provider is then available in e.g. Text editor or Deck card editor

grafik

nunesgh commented 10 months ago

Thank you for the updated version. The settings are now being kept, but the errors are still appearing on the logs.

v1r0x commented 10 months ago

Are they only in the logs or is it impossible to use the app?

szaimen commented 9 months ago

I just tested today and it works with Nc27. Thanks for fixing this! :)