@designcrowd/fe-shared-lib 1.2.4 → 1.2.5-byo-2

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/buildspec.yml CHANGED
@@ -29,6 +29,7 @@ phases:
29
29
  - yarn build
30
30
  - docker build -t $IMAGE_TAG --build-arg NPM_TOKEN=$NPM_TOKEN .
31
31
  - echo Build started on `date`
32
+ - yarn bundle-translation
32
33
  - yarn build:storybook
33
34
  post_build:
34
35
  commands:
package/index.js CHANGED
@@ -19,7 +19,7 @@ export { default as SellDomainNameWidget } from './src/experiences/components/Se
19
19
  export { default as PublishBrandPageModal } from './src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue';
20
20
  export { default as PublishBrandPageCard } from './src/experiences/components/PublishBrandPageModal/PublishBrandPageCard.vue';
21
21
 
22
- export { setLocaleAsync, tr } from './src/useSharedLibTranslate';
22
+ export { setLocaleAsync, tr, uploadYourLogoTr } from './src/useSharedLibTranslate';
23
23
 
24
24
  export { default as Button } from './src/atoms/components/Button/Button.vue';
25
25
  export { default as ButtonGroup } from './src/atoms/components/ButtonGroup/ButtonGroup.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.4",
3
+ "version": "1.2.5-byo-2",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -1,5 +1,3 @@
1
- // eslint-disable-next-line import/no-extraneous-dependencies
2
- import { useArgs } from '@storybook/preview-api';
3
1
  import Modal from './Modal.vue';
4
2
  import Button from '../Button/Button.vue';
5
3
 
@@ -10,7 +8,6 @@ export default {
10
8
 
11
9
  export const Sample = {
12
10
  render: (args) => {
13
- const [, setArgs] = useArgs();
14
11
  return {
15
12
  components: {
16
13
  Modal,
@@ -25,7 +22,7 @@ export const Sample = {
25
22
  `,
26
23
  methods: {
27
24
  closeLoginModal() {
28
- setArgs({ ...args, visible: false });
25
+ this.visible = false;
29
26
  },
30
27
  },
31
28
  };
@@ -37,7 +34,6 @@ export const Sample = {
37
34
 
38
35
  export const OpenWithButton = {
39
36
  render: (args) => {
40
- const [, setArgs] = useArgs();
41
37
  return {
42
38
  components: {
43
39
  Modal,
@@ -56,10 +52,10 @@ export const OpenWithButton = {
56
52
  `,
57
53
  methods: {
58
54
  closeLoginModal() {
59
- setArgs({ ...args, visible: false });
55
+ this.visible = false;
60
56
  },
61
57
  onButtonClick() {
62
- setArgs({ ...args, visible: true });
58
+ this.visible = true;
63
59
  },
64
60
  },
65
61
  };
@@ -71,7 +67,6 @@ export const OpenWithButton = {
71
67
 
72
68
  export const Simple = {
73
69
  render: (args) => {
74
- const [, setArgs] = useArgs();
75
70
  return {
76
71
  components: {
77
72
  Modal,
@@ -90,7 +85,7 @@ export const Simple = {
90
85
  `,
91
86
  methods: {
92
87
  closeLoginModal() {
93
- setArgs({ ...args, visible: false });
88
+ this.visible = false;
94
89
  },
95
90
  },
96
91
  };
@@ -102,7 +97,6 @@ export const Simple = {
102
97
 
103
98
  export const MandatorySample = {
104
99
  render: (args) => {
105
- const [, setArgs] = useArgs();
106
100
  return {
107
101
  components: {
108
102
  Modal,
@@ -117,7 +111,7 @@ export const MandatorySample = {
117
111
  `,
118
112
  methods: {
119
113
  closeLoginModal() {
120
- setArgs({ ...args, visible: false });
114
+ this.visible = false;
121
115
  },
122
116
  },
123
117
  };
@@ -129,7 +123,6 @@ export const MandatorySample = {
129
123
 
130
124
  export const InnerOverflowSample = {
131
125
  render: (args) => {
132
- const [, setArgs] = useArgs();
133
126
  return {
134
127
  components: {
135
128
  Modal,
@@ -150,7 +143,7 @@ export const InnerOverflowSample = {
150
143
  `,
151
144
  methods: {
152
145
  closeLoginModal() {
153
- setArgs({ ...args, visible: false });
146
+ this.visible = false;
154
147
  },
155
148
  },
156
149
  };
@@ -162,7 +155,6 @@ export const InnerOverflowSample = {
162
155
 
163
156
  export const HeaderFooterSample = {
164
157
  render: (args) => {
165
- const [, setArgs] = useArgs();
166
158
  return {
167
159
  components: {
168
160
  Modal,
@@ -197,7 +189,7 @@ export const HeaderFooterSample = {
197
189
  `,
198
190
  methods: {
199
191
  closeLoginModal() {
200
- setArgs({ ...args, visible: false });
192
+ this.visible = false;
201
193
  },
202
194
  },
203
195
  };
@@ -209,7 +201,6 @@ export const HeaderFooterSample = {
209
201
 
210
202
  export const FullscreenBreakpointSample = {
211
203
  render: (args) => {
212
- const [, setArgs] = useArgs();
213
204
  return {
214
205
  components: {
215
206
  Modal,
@@ -241,7 +232,7 @@ export const FullscreenBreakpointSample = {
241
232
  `,
242
233
  methods: {
243
234
  closeLoginModal() {
244
- setArgs({ ...args, visible: false });
235
+ this.visible = false;
245
236
  },
246
237
  },
247
238
  };
@@ -253,7 +244,6 @@ export const FullscreenBreakpointSample = {
253
244
 
254
245
  export const Image = {
255
246
  render: (args) => {
256
- const [, setArgs] = useArgs();
257
247
  return {
258
248
  components: {
259
249
  Modal,
@@ -268,7 +258,7 @@ export const Image = {
268
258
  `,
269
259
  methods: {
270
260
  closeLoginModal() {
271
- setArgs({ ...args, visible: false });
261
+ this.visible = false;
272
262
  },
273
263
  },
274
264
  };
@@ -1,5 +1,33 @@
1
1
  {
2
2
  "publishModal": {
3
3
  "test": "EN-Publish Brand Page"
4
+ },
5
+ "uploadYourLogo": {
6
+ "uploadYourLogoText": "Upload your logo-",
7
+ "disclaimerText": "Please ensure you have the right to use any image you upload.-",
8
+ "generatingDesigns": "Generating Designs...-",
9
+ "uploadingAndConverting": "Uploading and converting your logo...-",
10
+ "stepOf": "Step {current} of {total}-",
11
+ "uploadError": "Upload Error-",
12
+ "cancel": "Cancel-",
13
+ "continue": "Continue-",
14
+ "back": "Back-",
15
+ "no": "No-",
16
+ "yes": "Yes-",
17
+ "businessName": "Business Name-",
18
+ "businessNameDescription": "Enter your logo text or business name-",
19
+ "cropYourLogo": "Crop your logo-",
20
+ "cropDescription": "Crop your logo design to fit our logo maker canvas-",
21
+ "logoPreview": "Logo preview-",
22
+ "logoPreviewDescription": "Your logo looks great! Help us setup your logo by completing the next steps.-",
23
+ "primaryTextColor": "Primary text color-",
24
+ "primaryTextColorDescription": "Help us setup your logo by confirming the primary text color. Choose from the available colors or click the plus icon to add another.-",
25
+ "backgroundColor": "Background color-",
26
+ "backgroundColorDescription": "Help us setup your logo by confirming the background color. Choose from the available colors or click the plus icon to add another.-",
27
+ "colorsWarning": "Your text and background colors are too similar. Please choose a more distinct pairing to ensure they create quality designs.-",
28
+ "exitConfirmationTitle": "Are you sure you want to exit?-",
29
+ "exitConfirmationDescription": "Your logo upload progress in this session will be lost-",
30
+ "maxByoFileErrorMessage": "Your file exceeds the maximum size of 25MB. Please choose a smaller file.-",
31
+ "genericByoErrorMessage": "An unexpected error occured. Please try again.-"
4
32
  }
5
33
  }
@@ -402,7 +402,7 @@ export default {
402
402
  brandPageType: {
403
403
  type: String,
404
404
  required: true,
405
- default: false,
405
+ default: '',
406
406
  },
407
407
  },
408
408
  emits: [
@@ -169,6 +169,7 @@ export default {
169
169
  this.domainNameItems = [];
170
170
  } finally {
171
171
  this.isBusy = false;
172
+ this.$emit('on-search-results-loaded');
172
173
  }
173
174
  },
174
175
  onBuyNowClick() {
@@ -4,13 +4,13 @@
4
4
  <HelloBar
5
5
  v-if="areColorsTooClose"
6
6
  label=""
7
- description="Your text and background colors are too similar. Please choose a more distinct pairing to ensure they create quality designs."
7
+ :description="uploadYourLogoTr('colorsWarning')"
8
8
  variant="warning"
9
9
  class="tw-m-5 tw-mt-3"
10
10
  />
11
11
  <div class="tw-pb-8 tw-px-8 tw-text-center">
12
12
  <p class="tw-text-grayscale-600 tw-font-bold tw-text-xs tw-mb-2 tw-uppercase">
13
- Step {{ activeStep.number }} of {{ totalNumSteps }}
13
+ {{ stepCounter }}
14
14
  </p>
15
15
  <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">
16
16
  {{ activeStep.title }}
@@ -80,7 +80,7 @@
80
80
  >
81
81
  <Button
82
82
  v-if="activeStep.index === 1"
83
- label="Back"
83
+ :label="uploadYourLogoTr('back')"
84
84
  size="large"
85
85
  variant="outline"
86
86
  container-classes="tw-mx-2"
@@ -89,7 +89,7 @@
89
89
  />
90
90
  <Button
91
91
  v-if="activeStep.index === 2"
92
- label="Back"
92
+ :label="uploadYourLogoTr('back')"
93
93
  size="large"
94
94
  variant="outline"
95
95
  container-classes="tw-mx-2"
@@ -98,7 +98,7 @@
98
98
  />
99
99
  <Button
100
100
  v-if="activeStep.index === 1"
101
- label="Continue"
101
+ :label="uploadYourLogoTr('continue')"
102
102
  size="large"
103
103
  variant="primary-with-icon"
104
104
  icon="chevron-right-wide"
@@ -108,7 +108,7 @@
108
108
  />
109
109
  <Button
110
110
  v-if="activeStep.index === 2"
111
- label="Continue"
111
+ :label="uploadYourLogoTr('continue')"
112
112
  size="large"
113
113
  variant="primary-with-icon"
114
114
  icon="chevron-right-wide"
@@ -126,6 +126,7 @@ import Icon from '../../../../src/atoms/components/Icon/Icon.vue';
126
126
  import HelloBar from '../../../../src/atoms/components/HelloBar/HelloBar.vue';
127
127
  import trackEvent from '../../helpers/tracking';
128
128
  import hexDiff from '../../helpers/hex-diff';
129
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
129
130
 
130
131
  export default {
131
132
  components: {
@@ -153,6 +154,11 @@ export default {
153
154
  required: true,
154
155
  },
155
156
  },
157
+ setup() {
158
+ return {
159
+ uploadYourLogoTr,
160
+ };
161
+ },
156
162
  data() {
157
163
  return {
158
164
  currentStep: null,
@@ -171,9 +177,8 @@ export default {
171
177
  index: 1,
172
178
  number: this.totalNumSteps - 1,
173
179
  active: false,
174
- title: 'Primary text color',
175
- description:
176
- 'Help us setup your logo by confirming the primary text color. Choose from the available colors or click the plus icon to add another.',
180
+ title: uploadYourLogoTr('primaryTextColor'),
181
+ description: uploadYourLogoTr('primaryTextColorDescription'),
177
182
  colourData: this.logoData.logoImageDetails.textColors,
178
183
  colours: [],
179
184
  },
@@ -181,9 +186,8 @@ export default {
181
186
  index: 2,
182
187
  number: this.totalNumSteps,
183
188
  active: false,
184
- title: 'Background color',
185
- description:
186
- 'Help us setup your logo by confirming the background color. Choose from the available colors or click the plus icon to add another.',
189
+ title: uploadYourLogoTr('backgroundColor'),
190
+ description: uploadYourLogoTr('backgroundColorDescription'),
187
191
  colourData: this.logoData.logoImageDetails.backgroundColors,
188
192
  colours: [],
189
193
  },
@@ -202,6 +206,12 @@ export default {
202
206
  this.activeStep.index === 2 && hexDiff(selectedTextColour.hex, selectedBackgroundColour.hex) !== 'Different'
203
207
  );
204
208
  },
209
+ stepCounter() {
210
+ return this.uploadYourLogoTr('stepOf', {
211
+ current: this.activeStep.number,
212
+ total: this.totalNumSteps,
213
+ });
214
+ },
205
215
  },
206
216
  mounted() {
207
217
  const keys = Object.keys(this.steps);
@@ -5,8 +5,8 @@
5
5
  <p class="tw-text-grayscale-600 tw-font-bold tw-text-xs tw-mb-2 tw-uppercase">
6
6
  {{ progressLabel }}
7
7
  </p>
8
- <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">Business Name</h2>
9
- <p class="tw-mt-0">Enter your logo text or business name</p>
8
+ <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">{{ uploadYourLogoTr('businessName') }}</h2>
9
+ <p class="tw-mt-0">{{ uploadYourLogoTr('businessNameDescription') }}</p>
10
10
  </div>
11
11
 
12
12
  <div class="tw-pb-8 tw-px-8">
@@ -37,7 +37,7 @@
37
37
  class="tw-fixed tw-rounded-b tw-bottom-0 tw-left-0 tw-z-10 tw-bg-grayscale-200 lg:tw-static tw-flex tw-w-full tw-items-center tw-justify-center tw-border-0 tw-border-t tw-border-black/10 tw-border-solid tw-py-4 tw-px-8 tw-box-border"
38
38
  >
39
39
  <Button
40
- label="Back"
40
+ :label="uploadYourLogoTr('back')"
41
41
  size="large"
42
42
  variant="outline"
43
43
  container-classes="tw-mx-2"
@@ -45,7 +45,7 @@
45
45
  @on-click="back"
46
46
  />
47
47
  <Button
48
- label="Continue"
48
+ :label="uploadYourLogoTr('continue')"
49
49
  size="large"
50
50
  variant="primary-with-icon"
51
51
  icon="chevron-right-wide"
@@ -57,8 +57,9 @@
57
57
  </div>
58
58
  </template>
59
59
  <script>
60
- import Button from '../../../../src/atoms/components/Button/Button.vue';
60
+ import Button from '../../../atoms/components/Button/Button.vue';
61
61
  import trackEvent from '../../helpers/tracking';
62
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
62
63
 
63
64
  export default {
64
65
  components: {
@@ -84,6 +85,11 @@ export default {
84
85
  required: true,
85
86
  },
86
87
  },
88
+ setup() {
89
+ return {
90
+ uploadYourLogoTr,
91
+ };
92
+ },
87
93
  data() {
88
94
  return {
89
95
  businessText: null,
@@ -5,8 +5,8 @@
5
5
  <p class="tw-text-grayscale-600 tw-font-bold tw-text-xs tw-mb-2 tw-uppercase">
6
6
  {{ progressLabel }}
7
7
  </p>
8
- <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">Crop your logo</h2>
9
- <p class="tw-mt-0">Crop your logo design to fit our logo maker canvas</p>
8
+ <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">{{ uploadYourLogoTr('cropYourLogo') }}</h2>
9
+ <p class="tw-mt-0">{{ uploadYourLogoTr('cropDescription') }}</p>
10
10
  </div>
11
11
 
12
12
  <div class="c-byo-cropper__container lg:tw-pb-8 tw-mx-auto" :class="{ 'tw-opacity-0': !cropperToolReady }">
@@ -27,7 +27,7 @@
27
27
  class="tw-fixed tw-rounded-b tw-bottom-0 tw-left-0 tw-z-10 tw-bg-grayscale-200 lg:tw-static tw-flex tw-w-full tw-items-center tw-justify-center tw-border-0 tw-border-t tw-border-black/10 tw-border-solid tw-py-4 tw-px-8 tw-box-border"
28
28
  >
29
29
  <Button
30
- label="Cancel"
30
+ :label="uploadYourLogoTr('cancel')"
31
31
  size="large"
32
32
  variant="outline"
33
33
  container-classes="tw-mx-2"
@@ -35,7 +35,7 @@
35
35
  @on-click="cancel"
36
36
  />
37
37
  <Button
38
- label="Continue"
38
+ :label="uploadYourLogoTr('continue')"
39
39
  size="large"
40
40
  variant="primary-with-icon"
41
41
  icon="chevron-right-wide"
@@ -51,6 +51,7 @@ import Button from '../../../../src/atoms/components/Button/Button.vue';
51
51
  import VueCropper from 'vue-cropperjs';
52
52
 
53
53
  import trackEvent from '../../helpers/tracking';
54
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
54
55
 
55
56
  export default {
56
57
  components: {
@@ -72,6 +73,11 @@ export default {
72
73
  required: true,
73
74
  },
74
75
  },
76
+ setup() {
77
+ return {
78
+ uploadYourLogoTr,
79
+ };
80
+ },
75
81
  data() {
76
82
  return {
77
83
  cropperToolReady: false,
@@ -5,8 +5,8 @@
5
5
  <p class="tw-text-grayscale-600 tw-font-bold tw-text-xs tw-mb-2 tw-uppercase">
6
6
  {{ progressLabel }}
7
7
  </p>
8
- <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">Logo preview</h2>
9
- <p class="tw-mt-0">Your logo looks great! Help us setup your logo by completing the next steps.</p>
8
+ <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">{{ uploadYourLogoTr('logoPreview') }}</h2>
9
+ <p class="tw-mt-0">{{ uploadYourLogoTr('logoPreviewDescription') }}</p>
10
10
  </div>
11
11
 
12
12
  <div class="lg:tw-pb-8 lg:tw-px-8">
@@ -24,7 +24,7 @@
24
24
  class="tw-fixed tw-rounded-b tw-bottom-0 tw-left-0 tw-z-10 tw-bg-grayscale-200 lg:tw-static tw-flex tw-w-full tw-items-center tw-justify-center tw-border-0 tw-border-t tw-border-black/10 tw-border-solid tw-py-4 tw-px-8 tw-box-border"
25
25
  >
26
26
  <Button
27
- label="Cancel"
27
+ :label="uploadYourLogoTr('cancel')"
28
28
  size="large"
29
29
  variant="outline"
30
30
  container-classes="tw-mx-2"
@@ -32,7 +32,7 @@
32
32
  @on-click="cancel"
33
33
  />
34
34
  <Button
35
- label="Continue"
35
+ :label="uploadYourLogoTr('continue')"
36
36
  size="large"
37
37
  variant="primary-with-icon"
38
38
  icon="chevron-right-wide"
@@ -44,8 +44,9 @@
44
44
  </div>
45
45
  </template>
46
46
  <script>
47
- import Button from '../../../../src/atoms/components/Button/Button.vue';
47
+ import Button from '../../../atoms/components/Button/Button.vue';
48
48
  import trackEvent from '../../helpers/tracking';
49
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
49
50
 
50
51
  export default {
51
52
  components: {
@@ -66,6 +67,11 @@ export default {
66
67
  required: true,
67
68
  },
68
69
  },
70
+ setup() {
71
+ return {
72
+ uploadYourLogoTr,
73
+ };
74
+ },
69
75
  methods: {
70
76
  cropImage() {
71
77
  if (!this.$refs.preview.complete) return;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="tw-w-full">
3
3
  <div class="tw-px-8 tw-pb-8">
4
- <h2 class="tw-mb-8 tw-text-4xl tw-font-bold">Upload Error</h2>
4
+ <h2 class="tw-mb-8 tw-text-4xl tw-font-bold">{{ uploadYourLogoTr('uploadError') }}</h2>
5
5
  <p class="tw-mt-0 tw-text-grayscale-600 tw-text-base tw-text-center">
6
6
  {{ errorMessage }}
7
7
  </p>
@@ -11,7 +11,7 @@
11
11
  class="tw-flex tw-w-full tw-items-center tw-justify-center tw-border-0 tw-border-t tw-border-black/10 tw-border-solid tw-py-4 tw-px-8"
12
12
  >
13
13
  <Button
14
- label="Cancel"
14
+ :label="uploadYourLogoTr('cancel')"
15
15
  size="large"
16
16
  variant="outline"
17
17
  container-classes="tw-mx-2"
@@ -28,7 +28,7 @@
28
28
  />
29
29
 
30
30
  <Button
31
- label="Upload your logo"
31
+ :label="uploadYourLogoTr('uploadYourLogoText')"
32
32
  size="large"
33
33
  variant="primary-with-icon"
34
34
  icon="chevron-right-wide"
@@ -39,7 +39,8 @@
39
39
  </div>
40
40
  </template>
41
41
  <script>
42
- import Button from '../../../../src/atoms/components/Button/Button.vue';
42
+ import Button from '../../../atoms/components/Button/Button.vue';
43
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
43
44
 
44
45
  export default {
45
46
  components: {
@@ -52,6 +53,11 @@ export default {
52
53
  default: null,
53
54
  },
54
55
  },
56
+ setup() {
57
+ return {
58
+ uploadYourLogoTr,
59
+ };
60
+ },
55
61
  methods: {
56
62
  cancel() {
57
63
  this.$emit('on-cancel');
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="tw-w-full">
3
3
  <div class="tw-px-8 tw-pb-8">
4
- <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">Are you sure you want to exit?</h2>
4
+ <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">{{ uploadYourLogoTr('exitConfirmationTitle') }}</h2>
5
5
  <p class="tw-mt-0 tw-text-grayscale-600 tw-text-base tw-text-center">
6
- Your logo upload progress in this session will be lost
6
+ {{ uploadYourLogoTr('exitConfirmationDescription') }}
7
7
  </p>
8
8
  </div>
9
9
 
@@ -11,7 +11,7 @@
11
11
  class="tw-flex tw-w-full tw-items-center tw-justify-center tw-border-0 tw-border-t tw-border-black/10 tw-border-solid tw-py-4 tw-px-8"
12
12
  >
13
13
  <Button
14
- label="No"
14
+ :label="uploadYourLogoTr('no')"
15
15
  size="large"
16
16
  variant="outline"
17
17
  container-classes="tw-mx-2"
@@ -19,7 +19,7 @@
19
19
  @on-click="goBack"
20
20
  />
21
21
  <Button
22
- label="Yes"
22
+ :label="uploadYourLogoTr('yes')"
23
23
  size="large"
24
24
  variant="primary-with-icon"
25
25
  icon="chevron-right-wide"
@@ -31,12 +31,18 @@
31
31
  </div>
32
32
  </template>
33
33
  <script>
34
- import Button from '../../../../src/atoms/components/Button/Button.vue';
34
+ import Button from '../../../atoms/components/Button/Button.vue';
35
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
35
36
 
36
37
  export default {
37
38
  components: {
38
39
  Button,
39
40
  },
41
+ setup() {
42
+ return {
43
+ uploadYourLogoTr,
44
+ };
45
+ },
40
46
  methods: {
41
47
  goBack() {
42
48
  this.$emit('on-go-back');
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <LogoUploadingLoader loading-text="Uploading and converting your logo..." />
2
+ <LogoUploadingLoader :loading-text="uploadYourLogoTr('uploadingAndConverting')" />
3
3
  </template>
4
4
  <script>
5
5
  import brandCrowdClient from '../../clients/brand-crowd-api.client';
@@ -7,6 +7,7 @@ import LogoUploadingLoader from './LogoUploadingLoader.vue';
7
7
 
8
8
  import trackEvent from '../../helpers/tracking';
9
9
  import hexDiff from '../../helpers/hex-diff';
10
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
10
11
 
11
12
  export default {
12
13
  components: {
@@ -23,6 +24,11 @@ export default {
23
24
  required: true,
24
25
  },
25
26
  },
27
+ setup() {
28
+ return {
29
+ uploadYourLogoTr,
30
+ };
31
+ },
26
32
  data() {
27
33
  return {
28
34
  isRunning: false,
@@ -12,8 +12,8 @@
12
12
  <p class="tw-text-grayscale-600 tw-font-bold tw-text-xs tw-mb-2 tw-uppercase">
13
13
  {{ currentStepProgressLabel }}
14
14
  </p>
15
- <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">Upload your logo</h2>
16
- <p class="tw-mt-0 tw-pb-8">Please ensure you have the right to use any image you upload.</p>
15
+ <h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">{{ uploadYourLogoTr('uploadYourLogoText') }}</h2>
16
+ <p class="tw-mt-0 tw-pb-8">{{ uploadYourLogoTr('disclaimerText') }}</p>
17
17
  <UploadYourLogoDropzone :is-modal="true" @on-upload-success="onLogoFileChange"> </UploadYourLogoDropzone>
18
18
  </div>
19
19
 
@@ -70,7 +70,7 @@
70
70
  @on-logo-file-change="onLogoFileChange"
71
71
  />
72
72
 
73
- <LogoUploadingLoader v-if="isCurrentlySaving" loading-text="Generating Designs..." />
73
+ <LogoUploadingLoader v-if="isCurrentlySaving" :loading-text="uploadYourLogoTr('generatingDesigns')" />
74
74
 
75
75
  <LogoUploadExitConfirmation
76
76
  v-if="isAttemptingToExit && currentStep > 1"
@@ -85,6 +85,7 @@
85
85
  import brandCrowdClient from '../../clients/brand-crowd-api.client';
86
86
  import Errors from '../../constants/error-constants';
87
87
  import trackEvent from '../../helpers/tracking';
88
+ import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
88
89
 
89
90
  import LogoUploadModal from './LogoUploadModal.vue';
90
91
  import UploadYourLogoDropzone from '../UploadYourLogoDropzone/UploadYourLogoDropzone.vue';
@@ -127,6 +128,11 @@ export default {
127
128
  default: false,
128
129
  },
129
130
  },
131
+ setup() {
132
+ return {
133
+ uploadYourLogoTr,
134
+ };
135
+ },
130
136
  data() {
131
137
  return {
132
138
  currentStep: this.useDropzone ? 0 : 1,
@@ -145,9 +151,9 @@ export default {
145
151
  currentStepProgressLabel() {
146
152
  if (this.includeDropzoneInModal) {
147
153
  const currentStepDisplay = this.currentStep === 0 ? 1 : this.currentStep;
148
- return `Step ${currentStepDisplay} of 5`;
154
+ return this.uploadYourLogoTr('stepOf', { current: currentStepDisplay, total: 5 });
149
155
  }
150
- return `Step ${this.currentStep - 1} of 4`;
156
+ return this.uploadYourLogoTr('stepOf', { current: this.currentStep - 1, total: 4 });
151
157
  },
152
158
  hasError() {
153
159
  return !!this.errorMessage;
@@ -175,7 +181,7 @@ export default {
175
181
  handler() {
176
182
  if (this.logoFile) {
177
183
  this.errorMessage =
178
- this.logoFile.file.size > Errors.MAX_BYO_FILE_SIZE ? Errors.MAX_BYO_FILE_SIZE_EXCEEDED_MSG : null;
184
+ this.logoFile.file.size > Errors.MAX_BYO_FILE_SIZE ? uploadYourLogoTr('maxByoFileErrorMessage') : null;
179
185
  }
180
186
  },
181
187
  },
@@ -191,7 +197,7 @@ export default {
191
197
  if (typeof err.response?.data?.errorMessage === 'string' && err.response?.data?.errorMessage !== '') {
192
198
  this.errorMessage = err.response.data.errorMessage;
193
199
  } else {
194
- this.errorMessage = Errors.GENERIC_BYO_ERROR;
200
+ this.errorMessage = uploadYourLogoTr('genericByoErrorMessage');
195
201
  }
196
202
  this.currentStep = null;
197
203
  },
@@ -0,0 +1,30 @@
1
+ {
2
+ "uploadYourLogo": {
3
+ "uploadYourLogoText": "Upload your logo-",
4
+ "disclaimerText": "Please ensure you have the right to use any image you upload.-",
5
+ "generatingDesigns": "Generating Designs...-",
6
+ "uploadingAndConverting": "Uploading and converting your logo...-",
7
+ "stepOf": "Step {current} of {total}-",
8
+ "uploadError": "Upload Error-",
9
+ "cancel": "Cancel-",
10
+ "continue": "Continue-",
11
+ "back": "Back-",
12
+ "no": "No-",
13
+ "yes": "Yes-",
14
+ "businessName": "Business Name-",
15
+ "businessNameDescription": "Enter your logo text or business name-",
16
+ "cropYourLogo": "Crop your logo-",
17
+ "cropDescription": "Crop your logo design to fit our logo maker canvas-",
18
+ "logoPreview": "Logo preview-",
19
+ "logoPreviewDescription": "Your logo looks great! Help us setup your logo by completing the next steps.-",
20
+ "primaryTextColor": "Primary text color-",
21
+ "primaryTextColorDescription": "Help us setup your logo by confirming the primary text color. Choose from the available colors or click the plus icon to add another.-",
22
+ "backgroundColor": "Background color-",
23
+ "backgroundColorDescription": "Help us setup your logo by confirming the background color. Choose from the available colors or click the plus icon to add another.-",
24
+ "colorsWarning": "Your text and background colors are too similar. Please choose a more distinct pairing to ensure they create quality designs.-",
25
+ "exitConfirmationTitle": "Are you sure you want to exit?-",
26
+ "exitConfirmationDescription": "Your logo upload progress in this session will be lost-",
27
+ "maxByoFileErrorMessage": "Your file exceeds the maximum size of 25MB. Please choose a smaller file.-",
28
+ "genericByoErrorMessage": "An unexpected error occured. Please try again.-"
29
+ }
30
+ }
@@ -35,4 +35,6 @@ const tr = (key, valuesToInterpolate = {}) => {
35
35
  return translated;
36
36
  };
37
37
 
38
- export { setLocaleAsync, tr };
38
+ const uploadYourLogoTr = (key, valuesToInterpolate = {}) => tr(`uploadYourLogo.${key}`, valuesToInterpolate);
39
+
40
+ export { setLocaleAsync, tr, uploadYourLogoTr };