@capillarytech/creatives-library 3.1.2 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/components/BreadCrumbs/messages.js +1 -1
  2. package/components/CapTagList/index.js +3 -3
  3. package/components/CapTagList/messages.js +16 -4
  4. package/components/Ckeditor/messages.js +1 -1
  5. package/components/CustomPopOver/index.js +3 -4
  6. package/components/CustomPopOver/messages.js +5 -1
  7. package/components/DateFilter/index.js +12 -12
  8. package/components/DateFilter/messages.js +40 -0
  9. package/components/DateRange/index.js +5 -4
  10. package/components/DateRange/messages.js +13 -1
  11. package/components/Edmeditor/messages.js +1 -1
  12. package/components/EmailPreview/index.js +4 -4
  13. package/components/EmailPreview/messages.js +18 -2
  14. package/components/Footer/messages.js +1 -1
  15. package/components/FormBuilder/index.js +15 -19
  16. package/components/FormBuilder/messages.js +33 -1
  17. package/components/Header/messages.js +4 -4
  18. package/components/ImagePreview/index.js +1 -1
  19. package/components/ImagePreview/messages.js +5 -1
  20. package/components/PageHeader/messages.js +1 -1
  21. package/components/PreviewSideBar/index.js +2 -2
  22. package/components/PreviewSideBar/messages.js +14 -6
  23. package/components/Sidebar/messages.js +3 -3
  24. package/components/SmsTest/index.js +6 -4
  25. package/components/SmsTest/messages.js +9 -1
  26. package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +3 -3
  27. package/components/TemplatePreview/index.js +7 -7
  28. package/components/TemplatePreview/messages.js +17 -5
  29. package/components/Toastr/messages.js +1 -1
  30. package/components/ToastrMessage/index.js +4 -1
  31. package/components/ToastrMessage/messages.js +5 -1
  32. package/components/TopBar/messages.js +1 -1
  33. package/containers/Assets/Gallery/messages.js +20 -20
  34. package/containers/Cap/index.js +5 -5
  35. package/containers/Cap/messages.js +75 -0
  36. package/containers/Dashboard/index.js +2 -2
  37. package/containers/Dashboard/messages.js +1 -1
  38. package/containers/Ebill/index.js +1 -1
  39. package/containers/Ebill/messages.js +20 -16
  40. package/containers/Email/index.js +24 -24
  41. package/containers/Email/messages.js +107 -59
  42. package/containers/Line/Create/index.js +7 -7
  43. package/containers/Line/Create/messages.js +58 -42
  44. package/containers/Line/Edit/index.js +14 -14
  45. package/containers/Line/Edit/messages.js +58 -38
  46. package/containers/Login/components/LoginForm/index.js +10 -7
  47. package/containers/Login/components/LoginForm/messages.js +15 -3
  48. package/containers/Login/index.js +1 -1
  49. package/containers/Login/messages.js +7 -3
  50. package/containers/MobilePush/Create/index.js +45 -45
  51. package/containers/MobilePush/Create/messages.js +111 -75
  52. package/containers/MobilePush/Edit/index.js +45 -45
  53. package/containers/MobilePush/Edit/messages.js +100 -83
  54. package/containers/NotFoundPage/messages.js +1 -1
  55. package/containers/Sms/Create/index.js +5 -5
  56. package/containers/Sms/Create/messages.js +43 -19
  57. package/containers/Sms/Edit/index.js +4 -4
  58. package/containers/Sms/Edit/messages.js +36 -20
  59. package/containers/TagList/messages.js +1 -1
  60. package/containers/Templates/index.js +20 -19
  61. package/containers/Templates/messages.js +136 -64
  62. package/containers/TestPage/messages.js +1 -1
  63. package/containers/Testv2/index.js +2 -2
  64. package/containers/Testv2/messages.js +9 -1
  65. package/containers/WeChat/MapTemplates/index.js +10 -10
  66. package/containers/WeChat/MapTemplates/messages.js +49 -17
  67. package/containers/WeChat/RichmediaTemplates/Create/messages.js +33 -33
  68. package/containers/WeChat/RichmediaTemplates/Edit/messages.js +1 -1
  69. package/containers/WeChat/RichmediaTemplates/View/index.js +2 -2
  70. package/containers/WeChat/RichmediaTemplates/View/messages.js +9 -1
  71. package/package.json +1 -1
  72. package/services/api.js +10 -2
  73. package/translations/en.json +973 -360
  74. package/translations/zh.json +994 -381
  75. package/v2Components/BreadCrumbs/messages.js +1 -1
  76. package/v2Components/CallTaskPreview/messages.js +1 -1
  77. package/v2Components/CapTagList/index.js +6 -5
  78. package/v2Components/CapTagList/messages.js +24 -4
  79. package/v2Components/Ckeditor/messages.js +1 -1
  80. package/v2Components/CmsTemplatesComponent/messages.js +2 -2
  81. package/v2Components/CustomPopOver/index.js +4 -2
  82. package/v2Components/CustomPopOver/messages.js +5 -1
  83. package/v2Components/Edmeditor/messages.js +1 -1
  84. package/v2Components/EmailPreview/index.js +2 -2
  85. package/v2Components/EmailPreview/messages.js +11 -3
  86. package/v2Components/EmailPreviewV2/index.js +1 -1
  87. package/v2Components/EmailPreviewV2/messages.js +13 -9
  88. package/v2Components/Footer/messages.js +1 -1
  89. package/v2Components/FormBuilder/index.js +11 -10
  90. package/v2Components/FormBuilder/messages.js +13 -13
  91. package/v2Components/Header/messages.js +4 -4
  92. package/v2Components/ImagePreview/index.js +3 -2
  93. package/v2Components/ImagePreview/messages.js +5 -1
  94. package/v2Components/MobilePushPreviewV2/index.js +2 -5
  95. package/v2Components/MobilePushPreviewV2/messages.js +9 -1
  96. package/v2Components/NavigationBar/messages.js +1 -1
  97. package/v2Components/NewCallTask/messages.js +5 -5
  98. package/v2Components/PreviewSideBar/messages.js +6 -6
  99. package/v2Components/SmsTest/index.js +6 -4
  100. package/v2Components/SmsTest/messages.js +9 -1
  101. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +3 -3
  102. package/v2Components/TemplatePreview/index.js +8 -7
  103. package/v2Components/TemplatePreview/messages.js +19 -7
  104. package/v2Components/Toastr/messages.js +1 -1
  105. package/v2Components/ToastrMessage/index.js +3 -2
  106. package/v2Components/ToastrMessage/messages.js +5 -1
  107. package/v2Components/TopBar/messages.js +7 -7
  108. package/v2Containers/Assets/Gallery/messages.js +24 -24
  109. package/v2Containers/CallTask/messages.js +6 -6
  110. package/v2Containers/Cap/index.js +5 -4
  111. package/v2Containers/Cap/messages.js +16 -16
  112. package/v2Containers/Cap/messsages.js +19 -15
  113. package/v2Containers/ChannelTemplates/messages.js +1 -1
  114. package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -1
  115. package/v2Containers/CreativesContainer/index.js +65 -46
  116. package/v2Containers/CreativesContainer/messages.js +5 -5
  117. package/v2Containers/Dashboard/index.js +2 -1
  118. package/v2Containers/Dashboard/messages.js +1 -1
  119. package/v2Containers/Ebill/index.js +1 -1
  120. package/v2Containers/Ebill/messages.js +20 -16
  121. package/v2Containers/Email/index.js +20 -20
  122. package/v2Containers/Email/messages.js +97 -61
  123. package/v2Containers/EmailWrapper/index.js +1 -1
  124. package/v2Containers/EmailWrapper/messages.js +12 -12
  125. package/v2Containers/Line/Create/index.js +3 -3
  126. package/v2Containers/Line/Create/messages.js +53 -41
  127. package/v2Containers/Line/Edit/index.js +10 -10
  128. package/v2Containers/Line/Edit/messages.js +55 -39
  129. package/v2Containers/Login/components/LoginForm/index.js +9 -6
  130. package/v2Containers/Login/components/LoginForm/messages.js +15 -3
  131. package/v2Containers/Login/index.js +1 -1
  132. package/v2Containers/Login/messages.js +7 -3
  133. package/v2Containers/MobilePush/Create/index.js +33 -33
  134. package/v2Containers/MobilePush/Create/messages.js +109 -81
  135. package/v2Containers/MobilePush/Edit/index.js +22 -22
  136. package/v2Containers/MobilePush/Edit/messages.js +95 -79
  137. package/v2Containers/MobilepushWrapper/messages.js +5 -5
  138. package/v2Containers/NotFoundPage/messages.js +1 -1
  139. package/v2Containers/Sms/Create/index.js +5 -5
  140. package/v2Containers/Sms/Create/messages.js +41 -21
  141. package/v2Containers/Sms/Edit/index.js +5 -5
  142. package/v2Containers/Sms/Edit/messages.js +36 -20
  143. package/v2Containers/TagList/messages.js +1 -1
  144. package/v2Containers/Templates/index.js +9 -1
  145. package/v2Containers/Templates/messages.js +1 -1
  146. package/v2Containers/TemplatesV2/messages.js +11 -11
  147. package/v2Containers/TestPage/messages.js +1 -1
  148. package/v2Containers/Testv2/index.js +2 -2
  149. package/v2Containers/Testv2/messages.js +9 -1
  150. package/v2Containers/WeChat/MapTemplates/index.js +2 -2
  151. package/v2Containers/WeChat/MapTemplates/messages.js +25 -25
  152. package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +4 -14
  153. package/v2Containers/WeChat/RichmediaTemplates/Create/messages.js +46 -46
  154. package/v2Containers/WeChat/RichmediaTemplates/Edit/index.js +1 -11
  155. package/v2Containers/WeChat/RichmediaTemplates/Edit/messages.js +1 -1
  156. package/v2Containers/WeChat/RichmediaTemplates/View/messages.js +9 -1
@@ -7,167 +7,183 @@ import { defineMessages } from 'react-intl';
7
7
 
8
8
  export default defineMessages({
9
9
  "imageUploadLabel": {
10
- id: 'app.containers.Line.Create.ImageUploadLabel',
10
+ id: 'creatives.containers.Line.Create.ImageUploadLabel',
11
11
  defaultMessage: 'Upload image',
12
12
  },
13
13
  "Enter template name*": {
14
- id: 'app.containers.Line.Create.enterTemplateNameImportant',
14
+ id: 'creatives.containers.Line.Create.enterTemplateNameImportant',
15
15
  defaultMessage: 'Enter template name*',
16
16
  },
17
17
  "Enter template name": {
18
- id: 'app.containers.Line.Create.enterTemplateName',
18
+ id: 'creatives.containers.Line.Create.enterTemplateName',
19
19
  defaultMessage: 'Enter template name',
20
20
  },
21
21
  "Template name cannot be empty": {
22
- id: 'app.containers.Line.Create.templateCantEmpty',
22
+ id: 'creatives.containers.Line.Create.templateCantEmpty',
23
23
  defaultMessage: 'Template name cannot be empty',
24
24
  },
25
25
  "Discard Changes": {
26
- id: 'app.containers.Line.Create.discardChanges',
26
+ id: 'creatives.containers.Line.Create.discardChanges',
27
27
  defaultMessage: 'Discard changes',
28
28
  },
29
29
  "Cancel": {
30
- id: 'app.containers.Line.Create.cancel',
30
+ id: 'creatives.containers.Line.Create.cancel',
31
31
  defaultMessage: 'Cancel',
32
32
  },
33
33
  "Save": {
34
- id: 'app.containers.Line.Create.save',
34
+ id: 'creatives.containers.Line.Create.save',
35
35
  defaultMessage: 'Save',
36
36
  },
37
37
  "Select Line Account": {
38
- id: 'app.containers.Line.Create.selectLineAccount',
38
+ id: 'creatives.containers.Line.Create.selectLineAccount',
39
39
  defaultMessage: 'Select line account',
40
40
  },
41
41
  "Account Id": {
42
- id: 'app.containers.Line.Create.accountId',
42
+ id: 'creatives.containers.Line.Create.accountId',
43
43
  defaultMessage: 'Account id',
44
44
  },
45
45
  "Select Line Template": {
46
- id: 'app.containers.Line.Create.selectLineTemplate',
46
+ id: 'creatives.containers.Line.Create.selectLineTemplate',
47
47
  defaultMessage: 'Select line template',
48
48
  },
49
49
  "Template": {
50
- id: 'app.containers.Line.Create.template',
50
+ id: 'creatives.containers.Line.Create.template',
51
51
  defaultMessage: 'Template',
52
52
  },
53
53
  "Title*": {
54
- id: 'app.containers.Line.Create.titleLabel',
54
+ id: 'creatives.containers.Line.Create.titleLabel',
55
55
  defaultMessage: 'Title*',
56
56
  },
57
57
  "Title": {
58
- id: 'app.containers.Line.Create.title',
58
+ id: 'creatives.containers.Line.Create.title',
59
59
  defaultMessage: 'Title',
60
60
  },
61
61
  "Please input message title name.": {
62
- id: 'app.containers.Line.Create.titleNameInvalid',
62
+ id: 'creatives.containers.Line.Create.titleNameInvalid',
63
63
  defaultMessage: 'Please enter the message title',
64
64
  },
65
65
  "Template message has unsupported/missing tags!": {
66
- id: 'app.containers.Line.Create.messageHasUnsupportedTag',
66
+ id: 'creatives.containers.Line.Create.messageHasUnsupportedTag',
67
67
  defaultMessage: 'Please check the message content for unsupported/missing tags',
68
68
  },
69
69
  "Tags": {
70
- id: 'app.containers.Line.Create.Tags',
70
+ id: 'creatives.containers.Line.Create.Tags',
71
71
  defaultMessage: 'Tags',
72
72
  },
73
73
  "Message*": {
74
- id: 'app.containers.Line.Create.messageLabel',
74
+ id: 'creatives.containers.Line.Create.messageLabel',
75
75
  defaultMessage: 'Message*',
76
76
  },
77
77
  "Message": {
78
- id: 'app.containers.Line.Create.message',
78
+ id: 'creatives.containers.Line.Create.message',
79
79
  defaultMessage: 'Message',
80
80
  },
81
81
  "Please input line template content.": {
82
- id: 'app.containers.Line.Create.inputLineTemplateContent',
82
+ id: 'creatives.containers.Line.Create.inputLineTemplateContent',
83
83
  defaultMessage: 'Please enter the message content',
84
84
  },
85
85
  "Template title has unsupported/missing tags.": {
86
- id: 'app.containers.Line.Create.titleHasUnsupportedTag',
86
+ id: 'creatives.containers.Line.Create.titleHasUnsupportedTag',
87
87
  defaultMessage: 'Please check the message content for unsupported/missing tags',
88
88
  },
89
89
  "Template name cannot be empty.": {
90
- id: 'app.containers.Line.Create.templateNameNotEmpty',
90
+ id: 'creatives.containers.Line.Create.templateNameNotEmpty',
91
91
  defaultMessage: 'Please provide a template name ',
92
92
  },
93
93
  "Message title has unsupported/missing tags!": {
94
- id: 'app.containers.Line.Create.messageTitleWithUnsupportedTag',
94
+ id: 'creatives.containers.Line.Create.messageTitleWithUnsupportedTag',
95
95
  defaultMessage: 'Please check the message content for unsupported/missing tags',
96
96
  },
97
97
  "Image": {
98
- id: 'app.containers.Line.Create.Image',
98
+ id: 'creatives.containers.Line.Create.Image',
99
99
  defaultMessage: 'Image',
100
100
  },
101
101
  "Max file size acceptable is 5mb": {
102
- id: 'app.containers.Line.Create.maxUploadFileSize',
102
+ id: 'creatives.containers.Line.Create.maxUploadFileSize',
103
103
  defaultMessage: 'Max file size acceptable is 5mb',
104
104
  },
105
105
  "Please upload Image": {
106
- id: 'app.containers.Line.Create.pleaseUploadImage',
106
+ id: 'creatives.containers.Line.Create.pleaseUploadImage',
107
107
  defaultMessage: 'Please upload Image',
108
108
  },
109
109
  "Upload Image": {
110
- id: 'app.containers.Line.Create.uploadImage',
110
+ id: 'creatives.containers.Line.Create.uploadImage',
111
111
  defaultMessage: 'Upload image',
112
112
  },
113
113
  "Line Template Created Successfully": {
114
- id: 'app.containers.Line.Create.templateCreatedSuccessfully',
114
+ id: 'creatives.containers.Line.Create.templateCreatedSuccessfully',
115
115
  defaultMessage: 'Line template created successfully',
116
116
  },
117
117
  "Line Template Edited Successfully": {
118
- id: 'app.containers.Line.Create.templateEditedSuccessfully',
118
+ id: 'creatives.containers.Line.Create.templateEditedSuccessfully',
119
119
  defaultMessage: 'Line template edited successfully',
120
120
  },
121
121
  "somethingWentWrong": {
122
- id: 'app.containers.Line.Create.somethingWentWrong',
122
+ id: 'creatives.containers.Line.Create.somethingWentWrong',
123
123
  defaultMessage: 'Something went wrong!!',
124
124
  },
125
125
  "Name and Description": {
126
- id: 'app.containers.Line.Create.nameAndDescription',
126
+ id: 'creatives.containers.Line.Create.nameAndDescription',
127
127
  defaultMessage: 'Name and description',
128
128
  },
129
129
  "Button 1": {
130
- id: 'app.containers.Line.Create.button1',
130
+ id: 'creatives.containers.Line.Create.button1',
131
131
  defaultMessage: 'Button 1',
132
132
  },
133
133
  "Button 2": {
134
- id: 'app.containers.Line.Create.button2',
134
+ id: 'creatives.containers.Line.Create.button2',
135
135
  defaultMessage: 'Button 2',
136
136
  },
137
137
  "File size cannot be more than 1mb": {
138
- id: 'app.containers.Line.Create.uploadFileSizeError',
138
+ id: 'creatives.containers.Line.Create.uploadFileSizeError',
139
139
  defaultMessage: 'File size cannot be more than 1mb',
140
140
  },
141
141
  "value cannot be empty.": {
142
- id: 'app.containers.Line.Create.valueCantEmpty',
142
+ id: 'creatives.containers.Line.Create.valueCantEmpty',
143
143
  defaultMessage: 'value cannot be empty.',
144
144
  },
145
- "Uploading Image...": {
146
- id: 'app.containers.Line.Create.uploadingImage',
145
+ "uploadingImage": {
146
+ id: 'creatives.containers.Line.Create.uploadingImage',
147
147
  defaultMessage: 'Uploading image...',
148
148
  },
149
149
  "Photo Uploaded Successfully": {
150
- id: 'app.containers.Line.Create.uploadSuccess',
150
+ id: 'creatives.containers.Line.Create.uploadSuccess',
151
151
  defaultMessage: 'Photo uploaded successfully',
152
152
  },
153
153
  "Campaigns": {
154
- id: 'app.containers.Line.Create.Campaigns',
154
+ id: 'creatives.containers.Line.Create.Campaigns',
155
155
  defaultMessage: 'Campaigns',
156
156
  },
157
157
  "Creatives": {
158
- id: 'app.containers.Line.Create.Creatives',
158
+ id: 'creatives.containers.Line.Create.Creatives',
159
159
  defaultMessage: 'Creatives',
160
160
  },
161
161
  "Line": {
162
- id: 'app.containers.Line.Create.line',
162
+ id: 'creatives.containers.Line.Create.line',
163
163
  defaultMessage: 'Line',
164
164
  },
165
165
  "Please upload an image to proceed": {
166
- id: 'app.containers.Line.Create.image',
166
+ id: 'creatives.containers.Line.Create.image',
167
167
  defaultMessage: 'Please upload an image to proceed',
168
168
  },
169
169
  "Maximum characters length exceeds": {
170
- id: 'app.containers.Line.Create.line',
170
+ id: 'creatives.containers.Line.Create.line',
171
171
  defaultMessage: 'Maximum characters length exceeds',
172
172
  },
173
+ "goBackConfirmation": {
174
+ id: 'creatives.containers.Line.Create.goBackConfirmation',
175
+ defaultMessage: "Going back will discard all the changes you've made. Continue?",
176
+ },
177
+ "alertMessage": {
178
+ id: 'creatives.containers.Line.Create.alertMessage',
179
+ defaultMessage: "Alert",
180
+ },
181
+ "templateNotConfigured": {
182
+ id: 'creatives.containers.Line.Create.templateNotConfigured',
183
+ defaultMessage: "template not configured,",
184
+ },
185
+ "savingTemplate": {
186
+ id: 'creatives.containers.Line.Create.savingTemplate',
187
+ defaultMessage: "Saving Template...",
188
+ },
173
189
  });
@@ -81,7 +81,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
81
81
  injectedTags: {},
82
82
  showModal: false,
83
83
  eventsMap: map,
84
- modalContent: {title: "Alert", body: this.props.intl.formatMessage(messages['template not configured,']), type: 'confirm'},
84
+ modalContent: {title: this.props.intl.formatMessage(messages.alertMessage), body: this.props.intl.formatMessage(messages['template not configured,']), type: 'confirm'},
85
85
  };
86
86
  }
87
87
  componentWillMount() {
@@ -655,16 +655,16 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
655
655
  setModalContent = (type) => {
656
656
  if (type === 'ios') {
657
657
  const modalContent = {
658
- title: "Alert",
659
- body: "Android template is not configured. Save without Android template",
658
+ title: this.props.intl.formatMessage(messages.alertMessage),
659
+ body: this.props.intl.formatMessage(messages.androidNotConfigured),
660
660
  type: 'confirm',
661
661
  id: 'ios',
662
662
  };
663
663
  this.setState({modalContent, showModal: true});
664
664
  } else if (type === 'android') {
665
665
  const modalContent = {
666
- title: "Alert",
667
- body: "IOS template is not configured, Save without IOS template",
666
+ title: this.props.intl.formatMessage(messages.alertMessage),
667
+ body: this.props.intl.formatMessage(messages.iosNotConfigured),
668
668
  type: 'confirm',
669
669
  id: 'android',
670
670
  };
@@ -718,8 +718,8 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
718
718
  this.props.globalActions.addMessageToQueue(message);
719
719
  } else {
720
720
  const name = data.file.name.split('.');
721
- const blob = data.file.slice(0, -1, 'image');
722
- const newFile = new File([blob], `${name[0]}${Date.now()}.${name[1]}`, {type: 'image'});
721
+ // const blob = data.file.slice(0, -1, 'image');
722
+ const newFile = new File([data.file], `${name[0]}${Date.now()}.${name[1]}`, {type: 'image'});
723
723
  this.props.actions.uploadAsset(newFile, data.type, data.fileParams);
724
724
  }
725
725
  };
@@ -761,8 +761,8 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
761
761
  moveToTemplates = () => {
762
762
  console.log('in move to Templates');
763
763
  const modalContent = {
764
- title: "Alert",
765
- body: "Do you really want to go back? All your temporary changes will be lost!",
764
+ title: this.props.intl.formatMessage(messages.alertMessage),
765
+ body: this.props.intl.formatMessage(messages.goBackConfirmation),
766
766
  type: 'confirm',
767
767
  id: 'template-back-confirm-modal',
768
768
  show: true,
@@ -955,8 +955,8 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
955
955
 
956
956
  render() {
957
957
  const schema = this.state.schema;
958
- let tipText = this.props.Edit && ("getTemplateDetailsInProgress" in this.props.Edit && this.props.Edit.getTemplateDetailsInProgress) ? 'Getting template details...' : '';
959
- tipText = this.props.Edit && ("editTemplateInProgress" in this.props.Edit && this.props.Edit.editTemplateInProgress) ? 'Saving Template...' : '';
958
+ let tipText = this.props.Edit && ("getTemplateDetailsInProgress" in this.props.Edit && this.props.Edit.getTemplateDetailsInProgress) ? this.props.intl.formatMessage(messages.gettingTemplate) : '';
959
+ tipText = this.props.Edit && ("editTemplateInProgress" in this.props.Edit && this.props.Edit.editTemplateInProgress) ? this.props.intl.formatMessage(messages.savingTemplate) : '';
960
960
  const spinning = this.props.Edit.fetchingDefaultTemplates || this.props.Edit.assetUploading || this.state.loading || (this.props.Edit && (("getTemplateDetailsInProgress" in this.props.Edit && this.props.Edit.getTemplateDetailsInProgress) || ("editTemplateInProgress" in this.props.Edit && this.props.Edit.editTemplateInProgress)));
961
961
  let tags = this.props.metaEntities && this.props.metaEntities.tags ? this.props.metaEntities.tags.standard : [];
962
962
  if (this.props.supportedTags) {
@@ -969,9 +969,9 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
969
969
  <Col offset={1}>
970
970
  {this.props.location.query.type !== "embedded" &&
971
971
  <Breadcrumb>
972
- <BreadcrumbItem>Campaigns</BreadcrumbItem>
973
- <BreadcrumbItem>Creatives</BreadcrumbItem>
974
- <BreadcrumbItem>Mobile Push</BreadcrumbItem>
972
+ <BreadcrumbItem>{this.props.intl.formatMessage(messages.Campaigns)}</BreadcrumbItem>
973
+ <BreadcrumbItem>{this.props.intl.formatMessage(messages.Creatives)}</BreadcrumbItem>
974
+ <BreadcrumbItem>{this.props.intl.formatMessage(messages.Line)}</BreadcrumbItem>
975
975
  </Breadcrumb>
976
976
  }
977
977
  </Col>
@@ -7,151 +7,171 @@ import { defineMessages } from 'react-intl';
7
7
 
8
8
  export default defineMessages({
9
9
  "imageUploadLabel": {
10
- id: 'app.containers.Line.Edit.ImageUploadLabel',
10
+ id: 'creatives.containers.Line.Edit.ImageUploadLabel',
11
11
  defaultMessage: 'Upload image',
12
12
  },
13
13
  "Enter template name*": {
14
- id: 'app.containers.Line.Edit.enterTemplateNameImportant',
14
+ id: 'creatives.containers.Line.Edit.enterTemplateNameImportant',
15
15
  defaultMessage: 'Enter template name*',
16
16
  },
17
17
  "Enter template name": {
18
- id: 'app.containers.Line.Edit.enterTemplateName',
18
+ id: 'creatives.containers.Line.Edit.enterTemplateName',
19
19
  defaultMessage: 'Enter template name',
20
20
  },
21
21
  "Template name cannot be empty": {
22
- id: 'app.containers.Line.Edit.templateCantEmpty',
22
+ id: 'creatives.containers.Line.Edit.templateCantEmpty',
23
23
  defaultMessage: 'Template name cannot be empty',
24
24
  },
25
25
  "Discard Changes": {
26
- id: 'app.containers.Line.Edit.discardChanges',
26
+ id: 'creatives.containers.Line.Edit.discardChanges',
27
27
  defaultMessage: 'Discard changes',
28
28
  },
29
29
  "Cancel": {
30
- id: 'app.containers.Line.Edit.cancel',
30
+ id: 'creatives.containers.Line.Edit.cancel',
31
31
  defaultMessage: 'Cancel',
32
32
  },
33
33
  "Save": {
34
- id: 'app.containers.Line.Edit.save',
34
+ id: 'creatives.containers.Line.Edit.save',
35
35
  defaultMessage: 'Save',
36
36
  },
37
37
  "Select Line Template": {
38
- id: 'app.containers.Line.Edit.selectLineTemplate',
38
+ id: 'creatives.containers.Line.Edit.selectLineTemplate',
39
39
  defaultMessage: 'Select line template',
40
40
  },
41
41
  "Template": {
42
- id: 'app.containers.Line.Edit.template',
42
+ id: 'creatives.containers.Line.Edit.template',
43
43
  defaultMessage: 'Template',
44
44
  },
45
45
  "Title*": {
46
- id: 'app.containers.Line.Edit.titleLabel',
46
+ id: 'creatives.containers.Line.Edit.titleLabel',
47
47
  defaultMessage: 'Title*',
48
48
  },
49
49
  "Title": {
50
- id: 'app.containers.Line.Edit.title',
50
+ id: 'creatives.containers.Line.Edit.title',
51
51
  defaultMessage: 'Title',
52
52
  },
53
53
  "Please input message title name.": {
54
- id: 'app.containers.Line.Edit.titleNameInvalid',
54
+ id: 'creatives.containers.Line.Edit.titleNameInvalid',
55
55
  defaultMessage: 'Please enter the message title',
56
56
  },
57
57
  "Template message has unsupported/missing tags!": {
58
- id: 'app.containers.Line.Edit.messageHasUnsupportedTag',
58
+ id: 'creatives.containers.Line.Edit.messageHasUnsupportedTag',
59
59
  defaultMessage: 'Please check the message content for unsupported/missing tags',
60
60
  },
61
61
  "Tags": {
62
- id: 'app.containers.Line.Edit.Tags',
62
+ id: 'creatives.containers.Line.Edit.Tags',
63
63
  defaultMessage: 'Tags',
64
64
  },
65
65
  "Message*": {
66
- id: 'app.containers.Line.Edit.messageLabel',
66
+ id: 'creatives.containers.Line.Edit.messageLabel',
67
67
  defaultMessage: 'Message*',
68
68
  },
69
69
  "Message": {
70
- id: 'app.containers.Line.Edit.message',
70
+ id: 'creatives.containers.Line.Edit.message',
71
71
  defaultMessage: 'Message',
72
72
  },
73
73
  "Please input mobile push template content.": {
74
- id: 'app.containers.Line.Edit.inputLineTemplateContent',
74
+ id: 'creatives.containers.Line.Edit.inputLineTemplateContent',
75
75
  defaultMessage: 'Please enter the message content',
76
76
  },
77
77
  "Template title has unsupported/missing tags.": {
78
- id: 'app.containers.Line.Edit.titleHasUnsupportedTag',
78
+ id: 'creatives.containers.Line.Edit.titleHasUnsupportedTag',
79
79
  defaultMessage: 'Please check the message content for unsupported/missing tags',
80
80
  },
81
81
  "Template name cannot be empty.": {
82
- id: 'app.containers.Line.Edit.templateNameNotEmpty',
82
+ id: 'creatives.containers.Line.Edit.templateNameNotEmpty',
83
83
  defaultMessage: 'Please provide a template name ',
84
84
  },
85
85
  "Message title has unsupported/missing tags!": {
86
- id: 'app.containers.Line.Edit.messageTitleWithUnsupportedTag',
86
+ id: 'creatives.containers.Line.Edit.messageTitleWithUnsupportedTag',
87
87
  defaultMessage: 'Please check the message content for unsupported/missing tags',
88
88
  },
89
89
  "Image": {
90
- id: 'app.containers.Line.Edit.Image',
90
+ id: 'creatives.containers.Line.Edit.Image',
91
91
  defaultMessage: 'Image',
92
92
  },
93
93
  "Max file size acceptable is 5mb": {
94
- id: 'app.containers.Line.Edit.maxUploadFileSize',
94
+ id: 'creatives.containers.Line.Edit.maxUploadFileSize',
95
95
  defaultMessage: 'Max file size acceptable is 5mb',
96
96
  },
97
97
  "Please upload Image": {
98
- id: 'app.containers.Line.Edit.pleaseUploadImage',
98
+ id: 'creatives.containers.Line.Edit.pleaseUploadImage',
99
99
  defaultMessage: 'Please upload image',
100
100
  },
101
101
  "Upload Image": {
102
- id: 'app.containers.Line.Edit.uploadImage',
102
+ id: 'creatives.containers.Line.Edit.uploadImage',
103
103
  defaultMessage: 'Upload image',
104
104
  },
105
105
  "Line Template Edited Successfully": {
106
- id: 'app.containers.Line.Edit.templateEditedSuccessfully',
106
+ id: 'creatives.containers.Line.Edit.templateEditedSuccessfully',
107
107
  defaultMessage: 'Line template edited successfully',
108
108
  },
109
109
  "somethingWentWrong": {
110
- id: 'app.containers.Line.Edit.somethingWentWrong',
110
+ id: 'creatives.containers.Line.Edit.somethingWentWrong',
111
111
  defaultMessage: 'Something went wrong!!',
112
112
  },
113
- "Do you really want to go back? All your temporary changes will be lost!": {
114
- id: 'app.containers.Line.Edit.goBackConfirmation',
113
+ "goBackConfirmation": {
114
+ id: 'creatives.containers.Line.Edit.goBackConfirmation',
115
115
  defaultMessage: "Going back will discard all the changes you've made. Continue?",
116
116
  },
117
+ "alertMessage": {
118
+ id: 'creatives.containers.Line.Edit.alertMessage',
119
+ defaultMessage: "Alert",
120
+ },
117
121
  "Name and Description": {
118
- id: 'app.containers.Line.Edit.nameAndDescription',
122
+ id: 'creatives.containers.Line.Edit.nameAndDescription',
119
123
  defaultMessage: 'Name and description',
120
124
  },
121
125
  "Button 1": {
122
- id: 'app.containers.Line.Edit.button1',
126
+ id: 'creatives.containers.Line.Edit.button1',
123
127
  defaultMessage: 'Button 1',
124
128
  },
125
129
  "Button 2": {
126
- id: 'app.containers.Line.Edit.button2',
130
+ id: 'creatives.containers.Line.Edit.button2',
127
131
  defaultMessage: 'Button 2',
128
132
  },
129
133
  "File size cannot be more than 5mb": {
130
- id: 'app.containers.Line.Edit.uploadFileSizeError',
134
+ id: 'creatives.containers.Line.Edit.uploadFileSizeError',
131
135
  defaultMessage: 'File size cannot be more than 5mb',
132
136
  },
133
137
  "value cannot be empty.": {
134
- id: 'app.containers.Line.Edit.valueCantEmpty',
138
+ id: 'creatives.containers.Line.Edit.valueCantEmpty',
135
139
  defaultMessage: 'value cannot be empty.',
136
140
  },
137
141
  "Uploading Image...": {
138
- id: 'app.containers.Line.Edit.uploadingImage',
142
+ id: 'creatives.containers.Line.Edit.uploadingImage',
139
143
  defaultMessage: 'Uploading image...',
140
144
  },
141
145
  "Campaigns": {
142
- id: 'app.containers.Line.Edit.Campaigns',
146
+ id: 'creatives.containers.Line.Edit.Campaigns',
143
147
  defaultMessage: 'Campaigns',
144
148
  },
145
149
  "Creatives": {
146
- id: 'app.containers.Line.Edit.Creatives',
150
+ id: 'creatives.containers.Line.Edit.Creatives',
147
151
  defaultMessage: 'Creatives',
148
152
  },
149
153
  "Line": {
150
- id: 'app.containers.Line.Edit.mobilePush',
154
+ id: 'creatives.containers.Line.Edit.mobilePush',
151
155
  defaultMessage: 'Mobile Push',
152
156
  },
153
157
  "template not configured,": {
154
- id: 'app.containers.Line.Edit.templateNotConfigured',
158
+ id: 'creatives.containers.Line.Edit.templateNotConfigured',
155
159
  defaultMessage: 'template not configured,',
156
160
  },
161
+ "androidNotConfigured": {
162
+ id: 'creatives.containers.Line.Edit.androidNotConfigured',
163
+ defaultMessage: 'Android template is not configured. Save without Android template',
164
+ },
165
+ "iosNotConfigured": {
166
+ id: 'creatives.containers.Line.Edit.iosNotConfigured',
167
+ defaultMessage: 'IOS template is not configured, Save without IOS template',
168
+ },
169
+ "savingTemplate": {
170
+ id: 'creatives.containers.Line.Edit.savingTemplate',
171
+ defaultMessage: "Saving Template...",
172
+ },
173
+ "gettingTemplate": {
174
+ id: 'creatives.containers.Line.Create.gettingTemplate',
175
+ defaultMessage: "Getting template details...",
176
+ },
157
177
  });
@@ -2,6 +2,8 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { Form, Icon } from 'antd';
4
4
  import { CapInput, CapButton } from '@capillarytech/cap-react-ui-library';
5
+ import { injectIntl, intlShape } from 'react-intl';
6
+ import messages from './messages';
5
7
  const FormItem = Form.Item;
6
8
 
7
9
  class NormalLoginForm extends React.Component {
@@ -20,27 +22,27 @@ class NormalLoginForm extends React.Component {
20
22
  <Form onSubmit={this.handleSubmit} className="login-form">
21
23
  <FormItem className="login-form-item">
22
24
  {getFieldDecorator('username', {
23
- rules: [{ required: true, message: 'Please input your username!' }],
25
+ rules: [{ required: true, message: this.props.intl.formatMessage(messages.inputUsernameMandatory) }],
24
26
  })(
25
- <CapInput prefix={<Icon type="user" style={{ fontSize: 13 }} />} placeholder="Username" />
27
+ <CapInput prefix={<Icon type="user" style={{ fontSize: 13 }} />} placeholder={this.props.intl.formatMessage(messages.username)} />
26
28
  )}
27
29
  </FormItem>
28
30
  <FormItem className="login-form-item">
29
31
  {getFieldDecorator('password', {
30
- rules: [{ required: true, message: 'Please input your Password!' }],
32
+ rules: [{ required: true, message: this.props.intl.formatMessage(messages.inputPasswordMandatory) }],
31
33
  })(
32
- <CapInput prefix={<Icon type="lock" style={{ fontSize: 13 }} />} type="password" placeholder="Password" />
34
+ <CapInput prefix={<Icon type="lock" style={{ fontSize: 13 }} />} type="password" placeholder={this.props.intl.formatMessage(messages.password)} />
33
35
  )}
34
36
  </FormItem>
35
37
  {this.props.isError
36
38
  ? <FormItem>
37
- <span style={{color: "red"}}>{"Invalid or Incorrect credentials!"}</span>
39
+ <span style={{color: "red"}}>{this.props.intl.formatMessage(messages.invalidCredentials)}</span>
38
40
  </FormItem>
39
41
  : null
40
42
  }
41
43
  <FormItem>
42
44
  <CapButton loading={this.props.loginInProgress} type="primary" htmlType="submit" className="login-form-button">
43
- Log in
45
+ {this.props.intl.formatMessage(messages.loginButton)}
44
46
  </CapButton>
45
47
  </FormItem>
46
48
  </Form>
@@ -53,7 +55,8 @@ NormalLoginForm.propTypes = {
53
55
  loginInProgress: PropTypes.bool,
54
56
  isError: PropTypes.bool,
55
57
  form: PropTypes.object,
58
+ intl: intlShape.isRequired,
56
59
  };
57
60
 
58
61
  const WrappedNormalLoginForm = Form.create()(NormalLoginForm);
59
- export default WrappedNormalLoginForm;
62
+ export default injectIntl(WrappedNormalLoginForm);
@@ -7,15 +7,27 @@ import { defineMessages } from 'react-intl';
7
7
 
8
8
  export default defineMessages({
9
9
  username: {
10
- id: 'reon.modules.Login.components.LoginForm.input.username',
10
+ id: 'creatives.containers.Login.components.LoginForm.input.username',
11
11
  defaultMessage: 'Username or email',
12
12
  },
13
13
  password: {
14
- id: 'reon.modules.Login.components.LoginForm.input.password',
14
+ id: 'creatives.containers.Login.components.LoginForm.input.password',
15
15
  defaultMessage: 'Password',
16
16
  },
17
17
  loginButton: {
18
- id: 'reon.modules.Login.components.LoginForm.input.loginButton',
18
+ id: 'creatives.containers.Login.components.LoginForm.input.loginButton',
19
19
  defaultMessage: 'Login',
20
20
  },
21
+ invalidCredentials: {
22
+ id: 'creatives.containers.Login.components.LoginForm.input.invalidCredentials',
23
+ defaultMessage: 'Invalid or Incorrect credentials!',
24
+ },
25
+ inputPasswordMandatory: {
26
+ id: 'creatives.containers.Login.components.LoginForm.input.inputPasswordMandatory',
27
+ defaultMessage: 'Please input your Password!',
28
+ },
29
+ inputUsernameMandatory: {
30
+ id: 'creatives.containers.Login.components.LoginForm.input.inputUsernameMandatory',
31
+ defaultMessage: 'Please input your username!',
32
+ },
21
33
  });
@@ -58,7 +58,7 @@ export class Login extends React.Component { // eslint-disable-line react/prefer
58
58
  <Helmet
59
59
  title={message}
60
60
  meta={[
61
- { name: 'description', content: 'Login Page' },
61
+ { name: 'description', content: <FormattedMessage {...messages.loginPage}/> },
62
62
  ]}
63
63
  />}
64
64
  </FormattedMessage>
@@ -7,15 +7,19 @@ import { defineMessages } from 'react-intl';
7
7
 
8
8
  export default defineMessages({
9
9
  pageTitle: {
10
- id: 'app.containers.Login.pageTitle',
10
+ id: 'creatives.containers.Login.pageTitle',
11
11
  defaultMessage: 'Login',
12
12
  },
13
13
  header: {
14
- id: 'app.containers.Login.header',
14
+ id: 'creatives.containers.Login.header',
15
15
  defaultMessage: 'This is login container change !',
16
16
  },
17
17
  invalidCredential: {
18
- id: 'app.containers.Login.invalidCredential',
18
+ id: 'creatives.containers.Login.invalidCredential',
19
19
  defaultMessage: 'Invalid username or password',
20
20
  },
21
+ loginPage: {
22
+ id: 'creatives.containers.Login.loginPage',
23
+ defaultMessage: 'Login Page',
24
+ },
21
25
  });