@designcrowd/fe-shared-lib 1.2.16-ast-upsell-3 → 1.2.16-ast-upsell-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.16-ast-upsell-3",
3
+ "version": "1.2.16-ast-upsell-4",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -20,7 +20,7 @@
20
20
  </template>
21
21
  <script>
22
22
  import Button from '../../../atoms/components/Button/Button.vue';
23
- import { useI18n } from 'vue-i18n';
23
+ import { upsellModalComponentsTr, getCurrentLocale } from '../../../useSharedLibTranslate';
24
24
 
25
25
  export default {
26
26
  components: {
@@ -32,32 +32,22 @@ export default {
32
32
  required: true,
33
33
  },
34
34
  },
35
- setup() {
36
- const { t, te, locale } = useI18n();
37
- const lowerCaseLocal = locale.value.toLowerCase();
38
-
39
- return {
40
- t,
41
- te,
42
- lowerCaseLocal,
43
- };
44
- },
45
35
  computed: {
46
36
  title() {
47
- return this.te('digitalBusinessCardTitle')
48
- ? this.t('digitalBusinessCardTitle')
49
- : 'Create your digital business card';
37
+ return upsellModalComponentsTr('digitalBusinessCardTitle') || 'Create your digital business card';
50
38
  },
51
39
  subtitle() {
52
- return this.te('digitalBusinessCardSubtitle')
53
- ? this.t('digitalBusinessCardSubtitle')
54
- : 'Launch a digital business card that drives connections and elevates your brand';
40
+ return (
41
+ upsellModalComponentsTr('digitalBusinessCardSubtitle') ||
42
+ 'Launch a digital business card that drives connections and elevates your brand'
43
+ );
55
44
  },
56
45
  imageUrl() {
57
- return `https://bcassetcdn.com/assets/images/modal/website-xsell-digital-business-card@2x.${this.lowerCaseLocal}.png`;
46
+ const locale = getCurrentLocale().toLowerCase();
47
+ return `https://bcassetcdn.com/assets/images/modal/website-xsell-digital-business-card@2x.${locale}.png`;
58
48
  },
59
49
  buttonLabel() {
60
- return this.te('getStartedLabel') ? this.t('getStartedLabel') : 'Get Started';
50
+ return upsellModalComponentsTr('getStartedLabel') || 'Get Started';
61
51
  },
62
52
  },
63
53
  methods: {
@@ -20,7 +20,7 @@
20
20
  </template>
21
21
  <script>
22
22
  import Button from '../../../atoms/components/Button/Button.vue';
23
- import { useI18n } from 'vue-i18n';
23
+ import { upsellModalComponentsTr, getCurrentLocale } from '../../../useSharedLibTranslate';
24
24
 
25
25
  export default {
26
26
  components: {
@@ -32,30 +32,21 @@ export default {
32
32
  required: true,
33
33
  },
34
34
  },
35
- setup() {
36
- const { t, te, locale } = useI18n();
37
- const lowerCaseLocal = locale.value.toLowerCase();
38
-
39
- return {
40
- t,
41
- te,
42
- lowerCaseLocal,
43
- };
44
- },
45
35
  computed: {
46
36
  title() {
47
- return this.te('linkInBioTitle') ? this.t('linkInBioTitle') : 'Create your Link in Bio';
37
+ return upsellModalComponentsTr('linkInBioTitle') || 'Create your Link in Bio';
48
38
  },
49
39
  subtitle() {
50
- return this.te('linkInBioSubtitle')
51
- ? this.t('linkInBioSubtitle')
52
- : 'Launch a link in bio that drives connections and elevates';
40
+ return (
41
+ upsellModalComponentsTr('linkInBioSubtitle') || 'Launch a link in bio that drives connections and elevates'
42
+ );
53
43
  },
54
44
  imageUrl() {
55
- return `https://bcassetcdn.com/assets/images/modal/website-xsell-link-in-bio@2x.${this.lowerCaseLocal}.png`;
45
+ const locale = getCurrentLocale().toLowerCase();
46
+ return `https://bcassetcdn.com/assets/images/modal/website-xsell-link-in-bio@2x.${locale}.png`;
56
47
  },
57
48
  buttonLabel() {
58
- return this.te('getStartedLabel') ? this.t('getStartedLabel') : 'Get Started';
49
+ return upsellModalComponentsTr('getStartedLabel') || 'Get Started';
59
50
  },
60
51
  },
61
52
  methods: {
@@ -20,7 +20,7 @@
20
20
  </template>
21
21
  <script>
22
22
  import Button from '../../../atoms/components/Button/Button.vue';
23
- import { useI18n } from 'vue-i18n';
23
+ import { upsellModalComponentsTr, getCurrentLocale } from '../../../useSharedLibTranslate';
24
24
 
25
25
  export default {
26
26
  components: {
@@ -32,30 +32,19 @@ export default {
32
32
  required: true,
33
33
  },
34
34
  },
35
- setup() {
36
- const { t, te, locale } = useI18n();
37
- const lowerCaseLocal = locale.value.toLowerCase();
38
-
39
- return {
40
- t,
41
- te,
42
- lowerCaseLocal,
43
- };
44
- },
45
35
  computed: {
46
36
  title() {
47
- return this.te('upgradeWebsiteTitle') ? this.t('upgradeWebsiteTitle') : 'Upgrade to premium website';
37
+ return upsellModalComponentsTr('upgradeWebsiteTitle') || 'Upgrade to premium website';
48
38
  },
49
39
  subtitle() {
50
- return this.te('upgradeWebsiteSubtitle')
51
- ? this.t('upgradeWebsiteSubtitle')
52
- : 'Unlock all advanced features for more flexibility';
40
+ return upsellModalComponentsTr('upgradeWebsiteSubtitle') || 'Unlock all advanced features for more flexibility';
53
41
  },
54
42
  imageUrl() {
55
- return `https://bcassetcdn.com/assets/images/modal/onboarding-upsell-website@2x.${this.lowerCaseLocal}.png`;
43
+ const locale = getCurrentLocale().toLowerCase();
44
+ return `https://bcassetcdn.com/assets/images/modal/onboarding-upsell-website@2x.${locale}.png`;
56
45
  },
57
46
  buttonLabel() {
58
- return this.te('upgradeNowLabel') ? this.t('upgradeNowLabel') : 'Upgrade Now';
47
+ return upsellModalComponentsTr('upgradeNowLabel') || 'Upgrade Now';
59
48
  },
60
49
  },
61
50
  methods: {
@@ -20,7 +20,7 @@
20
20
  </template>
21
21
  <script>
22
22
  import Button from '../../../atoms/components/Button/Button.vue';
23
- import { useI18n } from 'vue-i18n';
23
+ import { upsellModalComponentsTr, getCurrentLocale } from '../../../useSharedLibTranslate';
24
24
 
25
25
  export default {
26
26
  components: {
@@ -32,30 +32,19 @@ export default {
32
32
  required: true,
33
33
  },
34
34
  },
35
- setup() {
36
- const { t, te, locale } = useI18n();
37
- const lowerCaseLocal = locale.value.toLowerCase();
38
-
39
- return {
40
- t,
41
- te,
42
- lowerCaseLocal,
43
- };
44
- },
45
35
  computed: {
46
36
  title() {
47
- return this.te('webSupportTitle') ? this.t('webSupportTitle') : 'Get Professional Web Design Support';
37
+ return upsellModalComponentsTr('webSupportTitle') || 'Get Professional Web Design Support';
48
38
  },
49
39
  subtitle() {
50
- return this.te('webSupportSubtitle')
51
- ? this.t('webSupportSubtitle')
52
- : 'Our professional web design team will help you build and get the most out of your website';
40
+ return upsellModalComponentsTr('webSupportSubtitle') || 'Our professional web design team will help you build and get the most out of your website';
53
41
  },
54
42
  imageUrl() {
55
- return `https://bcassetcdn.com/assets/images/modal/brandpage-design-support@2x.${this.lowerCaseLocal}.png`;
43
+ const locale = getCurrentLocale().toLowerCase();
44
+ return `https://bcassetcdn.com/assets/images/modal/brandpage-design-support@2x.${locale}.png`;
56
45
  },
57
46
  buttonLabel() {
58
- return this.te('webDesignButtonLabel') ? this.t('webDesignButtonLabel') : 'Get Web Design Support';
47
+ return upsellModalComponentsTr('webDesignButtonLabel') || 'Get Web Design Support';
59
48
  },
60
49
  },
61
50
  methods: {
@@ -69,9 +58,3 @@ export default {
69
58
  },
70
59
  };
71
60
  </script>
72
-
73
- <i18n locale="en-US" src="../i18n/upsell-modal-components.json" />
74
- <!-- <i18n locale="fr-FR" src="../i18n/upsell-modal-components.fr-FR.json" />
75
- <i18n locale="de-DE" src="../i18n/upsell-modal-components.de-DE.json" />
76
- <i18n locale="es-ES" src="../i18n/upsell-modal-components.es-ES.json" />
77
- <i18n locale="pt-PT" src="../i18n/upsell-modal-components.pt-PT.json" /> -->
@@ -1,15 +1,17 @@
1
1
  {
2
- "getStartedLabel": "Get Started",
3
- "upgradeNowLabel": "Upgrade Now",
4
- "linkInBioTitle": "Create your Link in Bio",
5
- "linkInBioSubtitle": "Launch a link in bio that drives connections and elevates",
6
- "webSupportTitle": "Get Professional Web Design Support",
7
- "webSupportSubtitle": "Our professional web design team will help you build and get the most out of your website",
8
- "webDesignButtonLabel": "Get Web Design Support",
9
- "digitalBusinessCardTitle": "Create your digital business card",
10
- "digitalBusinessCardSubtitle": "Launch a digital business card that drives connections and elevates your brand",
11
- "upgradeWebsiteTitle": "Upgrade to premium website",
12
- "upgradeWebsiteSubtitle": "Unlock all advanced features for more flexibility",
13
- "legalZoomTitle": "Start your LLC for free",
14
- "legalZoomSubtitle": "In partnership with LegalZoom, kickstart your LLC for free"
2
+ "upsellModalComponents": {
3
+ "getStartedLabel": "Get Started",
4
+ "upgradeNowLabel": "Upgrade Now",
5
+ "linkInBioTitle": "Create your Link in Bio",
6
+ "linkInBioSubtitle": "Launch a link in bio that drives connections and elevates",
7
+ "webSupportTitle": "Get Professional Web Design Support",
8
+ "webSupportSubtitle": "Our professional web design team will help you build and get the most out of your website",
9
+ "webDesignButtonLabel": "Get Web Design Support",
10
+ "digitalBusinessCardTitle": "Create your digital business card",
11
+ "digitalBusinessCardSubtitle": "Launch a digital business card that drives connections and elevates your brand",
12
+ "upgradeWebsiteTitle": "Upgrade to premium website",
13
+ "upgradeWebsiteSubtitle": "Unlock all advanced features for more flexibility",
14
+ "legalZoomTitle": "Start your LLC for free",
15
+ "legalZoomSubtitle": "In partnership with LegalZoom, kickstart your LLC for free"
16
+ }
15
17
  }
@@ -3,19 +3,21 @@
3
3
  "domainCreditUsed": "Domain credit used",
4
4
  "free": "Free"
5
5
  },
6
- "getStartedLabel": "Get Started",
7
- "upgradeNowLabel": "Upgrade Now",
8
- "linkInBioTitle": "Create your Link in Bio",
9
- "linkInBioSubtitle": "Launch a link in bio that drives connections and elevates",
10
- "webSupportTitle": "Get Professional Web Design Support",
11
- "webSupportSubtitle": "Our professional web design team will help you build and get the most out of your website",
12
- "webDesignButtonLabel": "Get Web Design Support",
13
- "digitalBusinessCardTitle": "Create your digital business card",
14
- "digitalBusinessCardSubtitle": "Launch a digital business card that drives connections and elevates your brand",
15
- "upgradeWebsiteTitle": "Upgrade to premium website",
16
- "upgradeWebsiteSubtitle": "Unlock all advanced features for more flexibility",
17
- "legalZoomTitle": "Start your LLC for free",
18
- "legalZoomSubtitle": "In partnership with LegalZoom, kickstart your LLC for free",
6
+ "upsellModalComponents": {
7
+ "getStartedLabel": "Get Started",
8
+ "upgradeNowLabel": "Upgrade Now",
9
+ "linkInBioTitle": "Create your Link in Bio",
10
+ "linkInBioSubtitle": "Launch a link in bio that drives connections and elevates",
11
+ "webSupportTitle": "Get Professional Web Design Support",
12
+ "webSupportSubtitle": "Our professional web design team will help you build and get the most out of your website",
13
+ "webDesignButtonLabel": "Get Web Design Support",
14
+ "digitalBusinessCardTitle": "Create your digital business card",
15
+ "digitalBusinessCardSubtitle": "Launch a digital business card that drives connections and elevates your brand",
16
+ "upgradeWebsiteTitle": "Upgrade to premium website",
17
+ "upgradeWebsiteSubtitle": "Unlock all advanced features for more flexibility",
18
+ "legalZoomTitle": "Start your LLC for free",
19
+ "legalZoomSubtitle": "In partnership with LegalZoom, kickstart your LLC for free"
20
+ },
19
21
  "sharedPaymentConfig": {
20
22
  "onboardingIncomplete": "Onboarding Incomplete",
21
23
  "pendingVerification": "Pending Verification",
@@ -61,6 +61,8 @@ const sharedPaymentConfigTr = (key, valuesToInterpolate = {}) => tr(`sharedPayme
61
61
 
62
62
  const priceTr = (key, valuesToInterpolate = {}) => tr(`price.${key}`, valuesToInterpolate);
63
63
 
64
+ const upsellModalComponentsTr = (key, valuesToInterpolate = {}) => tr(`upsellModalComponents.${key}`, valuesToInterpolate);
65
+
64
66
  const getCurrentLocale = () => {
65
67
  return i18next.language || 'en-US';
66
68
  };
@@ -78,4 +80,5 @@ export {
78
80
  sellDomainNameListTr,
79
81
  sharedPaymentConfigTr,
80
82
  priceTr,
83
+ upsellModalComponentsTr,
81
84
  };