15
15
import com .magento .idea .magento2plugin .actions .generation .data .ControllerFileData ;
16
16
import com .magento .idea .magento2plugin .actions .generation .generator .util .DirectoryGenerator ;
17
17
import com .magento .idea .magento2plugin .actions .generation .generator .util .FileFromTemplateGenerator ;
18
+ import com .magento .idea .magento2plugin .bundles .CommonBundle ;
18
19
import com .magento .idea .magento2plugin .bundles .ValidatorBundle ;
19
20
import com .magento .idea .magento2plugin .indexes .ModuleIndex ;
20
21
import com .magento .idea .magento2plugin .magento .files .Controller ;
@@ -38,6 +39,7 @@ public class ModuleControllerClassGenerator extends FileGenerator {
38
39
private ControllerFileData controllerFileData ;
39
40
private Project project ;
40
41
private ValidatorBundle validatorBundle ;
42
+ private CommonBundle commonBundle ;
41
43
private final GetFirstClassOfFile getFirstClassOfFile ;
42
44
private final DirectoryGenerator directoryGenerator ;
43
45
private final FileFromTemplateGenerator fileFromTemplateGenerator ;
@@ -50,6 +52,7 @@ public ModuleControllerClassGenerator(@NotNull ControllerFileData controllerFile
50
52
this .fileFromTemplateGenerator = FileFromTemplateGenerator .getInstance (project );
51
53
this .getFirstClassOfFile = GetFirstClassOfFile .getInstance ();
52
54
this .validatorBundle = new ValidatorBundle ();
55
+ this .commonBundle = new CommonBundle ();
53
56
}
54
57
55
58
public PsiFile generate (String actionName ) {
@@ -63,7 +66,7 @@ public PsiFile generate(String actionName) {
63
66
JOptionPane .showMessageDialog (
64
67
null ,
65
68
errorMessage ,
66
- "Error" ,
69
+ commonBundle . message ( "common.error" ) ,
67
70
JOptionPane .ERROR_MESSAGE
68
71
);
69
72
@@ -77,7 +80,7 @@ public PsiFile generate(String actionName) {
77
80
JOptionPane .showMessageDialog (
78
81
null ,
79
82
errorMessage ,
80
- "Error" ,
83
+ commonBundle . message ( "common.error" ) ,
81
84
JOptionPane .ERROR_MESSAGE
82
85
);
83
86
0 commit comments