-
Couldn't load subscription status.
- Fork 422
Closed
Labels
Description
Scenario;
- My keys are English strings
- My base language is English
- My target language is Dutch
- I'm using the Google Auto Translate option
The Translation Manager shows;
This is because I don't have an English "translation" for the English string.
When I start the Auto translate option, I now get this error;
Argument 1 passed to Illuminate\Support\Str::Tanmuhittin\LaravelGoogleTranslate\{closure}() must be of the type string, null given, called in /data/kapiteinkoko/app2/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php on line 88
The quick fix is this, but I'm not sure this is the right way to fix this in all scenarios;
- $translated_text = Str::apiTranslateWithAttributes($base_string->value, $newLocale, $base_locale);
+ $translated_text = Str::apiTranslateWithAttributes($base_string->value ?? $base_string->key, $newLocale, $base_locale);HyperDesignCoWiz-Amit
