MohmmedAshraf / laravel-translations

Laravel Translations UI package provides a user-friendly interface for managing translations in your Laravel application. It simplifies tasks such as adding, editing, deleting, and exporting translations. The package also includes a handy search feature and the ability to invite collaborators for easy translation management
MIT License
648 stars 91 forks source link

Loading error if google translation failed to load #90

Closed Quiss closed 8 months ago

Quiss commented 8 months ago
[2024-03-18 05:50:25] production.ERROR: Client error: `GET https://translate.google.com/translate_a/single?client=gtx&hl=en&dt=t&dt=bd&dt=at&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&sl=ru&tl=en&q=...&ie=UTF-8&oe=UTF-8&multires=1&otf=0&pc=1&trs=1&ssel=0&tsel=0&kc=1&tk=983293.603011` resulted in a `400 Bad Request` response:
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, w (truncated...)
 {"userId":5,"exception":"[object] (Stichoza\\GoogleTranslate\\Exceptions\\TranslationRequestException(code: 400): Client error: `GET https://translate.google.com/translate_a/single?client=gtx&hl=en&dt=t&dt=bd&dt=at&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&sl=ru&tl=en&q=&ie=UTF-8&oe=UTF-8&multires=1&otf=0&pc=1&trs=1&ssel=0&tsel=0&kc=1&tk=983293.603011` resulted in a `400 Bad Request` response:
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content=\"initial-scale=1, minimum-scale=1, w (truncated...)
 at /var/www/html/vendor/stichoza/google-translate-php/src/GoogleTranslate.php:425)

[stacktrace]
#0 /var/www/html/vendor/stichoza/google-translate-php/src/GoogleTranslate.php(261): Stichoza\\GoogleTranslate\\GoogleTranslate->getResponse('<h2>\\xD0\\xA7\\xD1\\x82\\xD0\\xBE \\xD1\\x82\\xD0\\xB0...')
#1 /var/www/html/vendor/outhebox/laravel-translations/src/Http/Controllers/PhraseController.php(79): Stichoza\\GoogleTranslate\\GoogleTranslate->translate('<h2>\\xD0\\xA7\\xD1\\x82\\xD0\\xBE \\xD1\\x82\\xD0\\xB0...')
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Outhebox\\TranslationsUI\\Http\\Controllers\\PhraseController->edit(Object(Outhebox\\TranslationsUI\\Models\\Translation), Object(Outhebox\\TranslationsUI\\Models\\Phrase))
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction('edit', Array)
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Outhebox\\TranslationsUI\\Http\\Controllers\\PhraseController), 'edit')
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#8 /var/www/html/vendor/outhebox/laravel-translations/src/Http/Middleware/Authenticate.php(32): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Outhebox\\TranslationsUI\\Http\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#10 /var/www/html/vendor/inertiajs/inertia-laravel/src/Middleware.php(87): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))