@capillarytech/creatives-library 7.17.19 → 7.17.20
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.
package/package.json
CHANGED
|
@@ -53,11 +53,11 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
53
53
|
componentDidMount() {
|
|
54
54
|
const user = localStorage.getItem('user');
|
|
55
55
|
let locale = 'en';
|
|
56
|
+
moment.locale(locale);
|
|
56
57
|
if (user) {
|
|
57
58
|
locale = JSON.parse(user).lang || locale;
|
|
58
59
|
}
|
|
59
60
|
locale = this.getTranslationMappedLocale(locale);
|
|
60
|
-
moment.locale(locale);
|
|
61
61
|
this.setState({
|
|
62
62
|
translationLang: locale,
|
|
63
63
|
});
|
|
@@ -3064,7 +3064,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3064
3064
|
injectedTags={this.props.injectedTags ? this.props.injectedTags : {}}
|
|
3065
3065
|
className={val.className ? val.className : ''}
|
|
3066
3066
|
id={val.id}
|
|
3067
|
-
userLocale={this.
|
|
3067
|
+
userLocale={this.state.translationLang}
|
|
3068
3068
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
3069
3069
|
channel={channel}
|
|
3070
3070
|
/>
|
|
@@ -36,7 +36,6 @@ import { FONT_COLOR_05 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
|
36
36
|
import { gtmPush } from '../../utils/gtmTrackers';
|
|
37
37
|
const {CapCustomCardList} = CapCustomCard;
|
|
38
38
|
import {transformEmailTemplates, storeS3FileSizeDetails, CREATIVES_S3_ASSET_FILESIZES} from '../../utils/cdnTransformation';
|
|
39
|
-
import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
|
|
40
39
|
|
|
41
40
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
42
41
|
constructor(props) {
|
|
@@ -81,7 +80,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
81
80
|
addLanguageType: '',
|
|
82
81
|
startValidation: false,
|
|
83
82
|
saveForm: false,
|
|
84
|
-
translationLang: 'en',
|
|
85
83
|
};
|
|
86
84
|
|
|
87
85
|
this.isTagLoaded = false;
|
|
@@ -206,10 +204,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
206
204
|
// this.startTemplateCreation();
|
|
207
205
|
// }, 15000);
|
|
208
206
|
}
|
|
209
|
-
|
|
210
|
-
getTranslationMappedLocale(locale) {
|
|
211
|
-
return GET_TRANSLATION_MAPPED?.[locale];
|
|
212
|
-
}
|
|
207
|
+
|
|
213
208
|
componentDidMount() {
|
|
214
209
|
const query = {
|
|
215
210
|
layout: 'EMAIL',
|
|
@@ -221,16 +216,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
221
216
|
if (this.props.location.query.type === 'embedded') {
|
|
222
217
|
this.showNext();
|
|
223
218
|
}
|
|
224
|
-
const user = localStorage.getItem('user');
|
|
225
|
-
let locale = 'en';
|
|
226
|
-
if (user) {
|
|
227
|
-
locale = JSON.parse(user)?.lang || locale;
|
|
228
|
-
}
|
|
229
|
-
locale = this.getTranslationMappedLocale(locale);
|
|
230
|
-
moment.locale(locale);
|
|
231
|
-
this.setState({
|
|
232
|
-
translationLang: locale,
|
|
233
|
-
});
|
|
234
219
|
}
|
|
235
220
|
|
|
236
221
|
checkBeeEditorAllowedForLibrary = () => {
|
|
@@ -2729,7 +2714,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2729
2714
|
uuid={CmsSettings.uuid}
|
|
2730
2715
|
type={CmsSettings.type}
|
|
2731
2716
|
isEmailLoading={isLoading}
|
|
2732
|
-
userLocale={this.state.translationLang}
|
|
2733
2717
|
/> : ''}
|
|
2734
2718
|
</Col>
|
|
2735
2719
|
</Row>
|