File tree 1 file changed +4
-4
lines changed
packages/Webkul/Lead/src/Services 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class MagicAIService
28
28
public static function extractDataFromFile ($ base64File )
29
29
{
30
30
if (self ::$ isExtracting ) {
31
- throw new Exception ('admin::app.leads.file.recursive-call ' );
31
+ throw new Exception (trans ( 'admin::app.leads.file.recursive-call ' ) );
32
32
}
33
33
34
34
self ::$ isExtracting = true ;
@@ -37,7 +37,7 @@ public static function extractDataFromFile($base64File)
37
37
$ text = self ::extractTextFromBase64File ($ base64File );
38
38
39
39
if (empty ($ text )) {
40
- throw new Exception ('admin::app.leads.file.failed-extract ' );
40
+ throw new Exception (trans ( 'admin::app.leads.file.failed-extract ' ) );
41
41
}
42
42
43
43
return self ::processPromptWithAI ($ text );
@@ -57,7 +57,7 @@ private static function extractTextFromBase64File($base64File)
57
57
empty ($ base64File )
58
58
|| ! base64_decode ($ base64File , true )
59
59
) {
60
- throw new Exception ('admin::app.leads.file.invalid-base64 ' );
60
+ throw new Exception (trans ( 'admin::app.leads.file.invalid-base64 ' ) );
61
61
}
62
62
63
63
$ tempFile = tempnam (sys_get_temp_dir (), 'file_ ' );
@@ -88,7 +88,7 @@ private static function extractTextFromBase64File($base64File)
88
88
}
89
89
90
90
if (empty ($ data )) {
91
- throw new Exception ('admin::app.leads.file.data-extraction-failed ' );
91
+ throw new Exception (trans ( 'admin::app.leads.file.data-extraction-failed ' ) );
92
92
}
93
93
94
94
return $ data ;
You can’t perform that action at this time.
0 commit comments