File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 18
18
"illuminate/support" : " ^5.5|^6|^7" ,
19
19
"illuminate/translation" : " ^5.5|^6|^7" ,
20
20
"symfony/finder" : " ^3|^4|^5" ,
21
- "tanmuhittin/laravel-google-translate" : " ^1 .0.2 "
21
+ "tanmuhittin/laravel-google-translate" : " ^2 .0.1 "
22
22
},
23
23
"autoload" : {
24
24
"psr-4" : {
Original file line number Diff line number Diff line change 4
4
use Illuminate \Routing \Controller as BaseController ;
5
5
use Barryvdh \TranslationManager \Models \Translation ;
6
6
use Illuminate \Support \Collection ;
7
- use Tanmuhittin \ LaravelGoogleTranslate \ Commands \ TranslateFilesCommand ;
7
+ use Illuminate \ Support \ Str ;
8
8
9
9
class Controller extends BaseController
10
10
{
@@ -184,7 +184,7 @@ public function postTranslateMissing(Request $request){
184
184
// Translation already exists. Skip
185
185
continue ;
186
186
}
187
- $ translated_text = TranslateFilesCommand:: translate ( $ base_locale , $ newLocale , $ base_string -> value );
187
+ $ translated_text = Str:: apiTranslateWithAttributes ( $ base_string -> value , $ newLocale , $ base_locale );
188
188
request ()->replace ([
189
189
'value ' => $ translated_text ,
190
190
'name ' => $ newLocale . '| ' . $ base_string ->key ,
You can’t perform that action at this time.
0 commit comments