@designcrowd/fe-shared-lib 1.2.2-pl-1 → 1.2.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/Dockerfile +2 -0
- package/index.js +2 -0
- package/nodemon.translation.json +7 -0
- package/package.json +8 -3
- package/public/css/tailwind-brandCrowd.css +0 -4
- package/public/css/tailwind-brandPage.css +0 -4
- package/public/css/tailwind-crazyDomains.css +0 -4
- package/public/css/tailwind-designCom.css +0 -4
- package/public/css/tailwind-designCrowd.css +0 -4
- package/src/atoms/components/Icon/Icon.vue +3 -3
- package/src/bundleTranslation.js +89 -0
- package/src/bundles/bundled-translations.de-DE.json +5 -0
- package/src/bundles/bundled-translations.es-ES.json +5 -0
- package/src/bundles/bundled-translations.fr-FR.json +5 -0
- package/src/bundles/bundled-translations.json +5 -0
- package/src/bundles/bundled-translations.pt-PT.json +5 -0
- package/src/experiences/components/AuthFlow/ResetPassword.vue +1 -9
- package/src/experiences/components/PaymentConfigList/PaymentConfig.mixin.js +1 -1
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +16 -8
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-modal.de-DE.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-modal.es-ES.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-modal.fr-FR.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-modal.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-modal.pt-PT.json +5 -0
- package/src/useSharedLibTranslate.js +38 -0
- package/.storybook-static/assets/Auth-Cog6hw8U.css +0 -1
- package/.storybook-static/assets/Auth.stories-CbTWisKB.js +0 -490
- package/.storybook-static/assets/AuthCrazyDomains.stories-Dsjxh-je.js +0 -73
- package/.storybook-static/assets/Button-Dt0lL0uX.css +0 -1
- package/.storybook-static/assets/Button-IgCxbLvL.js +0 -1
- package/.storybook-static/assets/ButtonGroup-JjgCZ8Bt.css +0 -1
- package/.storybook-static/assets/ButtonGroup.stories-yhUiem6j.js +0 -494
- package/.storybook-static/assets/ButtonPrimary-CFNYtrCi.css +0 -1
- package/.storybook-static/assets/ButtonPrimary-Ce51KkgM.js +0 -1
- package/.storybook-static/assets/Buttons.stories-C7AZ07ow.js +0 -699
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-DgtyyoFM.js +0 -199
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +0 -1
- package/.storybook-static/assets/Checkbox.stories-12upKauG.js +0 -203
- package/.storybook-static/assets/Checktile.stories-8H8_5ia-.js +0 -88
- package/.storybook-static/assets/CollapsiblePanel.stories-Cs6gaONK.js +0 -39
- package/.storybook-static/assets/Color-RQJUDNI5-B-WwomMi.js +0 -1
- package/.storybook-static/assets/ColorPicker.stories-DriJaUqB.js +0 -73
- package/.storybook-static/assets/CopyToClipboardText.stories-r9YFXGiX.js +0 -32
- package/.storybook-static/assets/DocsRenderer-K4EAMTCU-BflUCOHA.js +0 -513
- package/.storybook-static/assets/Dropdown.stories-D1RPdExw.js +0 -154
- package/.storybook-static/assets/DropdownItem-BQ0eJTHo.css +0 -1
- package/.storybook-static/assets/DropdownItem-C4PFbXSv.js +0 -1
- package/.storybook-static/assets/FormControl.mixin-BIPKWa5J.js +0 -1
- package/.storybook-static/assets/HashRouteModal.stories-jZo8F3lr.js +0 -64
- package/.storybook-static/assets/HelloBar-CXc7uecf.js +0 -1
- package/.storybook-static/assets/HelloBar.stories-DJPqn9T0.js +0 -342
- package/.storybook-static/assets/Icon-B8lXgcc0.js +0 -1
- package/.storybook-static/assets/Icon.stories-B2K3kKRW.js +0 -735
- package/.storybook-static/assets/Icon.stories-z4pz6mSi.js +0 -126
- package/.storybook-static/assets/Loader-D6_mUM4g.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-7RXxlPF7.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-8SUh_BWV.css +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-Cc65CQQK.js +0 -36
- package/.storybook-static/assets/Masonry-Q4MdMr0_.css +0 -1
- package/.storybook-static/assets/Masonry.stories-CB-rWe0y.js +0 -71
- package/.storybook-static/assets/Modal-BOHOQzO4.js +0 -1
- package/.storybook-static/assets/Modal-MZ2jF3mP.css +0 -1
- package/.storybook-static/assets/Modal.stories-Hbi4v2MQ.js +0 -380
- package/.storybook-static/assets/Notice.stories-ChRjh1h1.js +0 -222
- package/.storybook-static/assets/NumberStepper.stories-D4c10_Cl.js +0 -48
- package/.storybook-static/assets/PaymentConfigList.stories-EUp7r4Ga.js +0 -126
- package/.storybook-static/assets/Picture-AUjTe_FO.js +0 -1
- package/.storybook-static/assets/Picture.stories-7_37X1oI.js +0 -119
- package/.storybook-static/assets/Pill-DEH_ScBa.js +0 -1
- package/.storybook-static/assets/Pill.stories-CKakcDo1.js +0 -18
- package/.storybook-static/assets/PillBar-BeJSf_Pk.css +0 -1
- package/.storybook-static/assets/PillBar.stories-BNwlQM4p.js +0 -41
- package/.storybook-static/assets/Price-BzFp3dn5.js +0 -1
- package/.storybook-static/assets/Price.stories-m0jztoEd.js +0 -221
- package/.storybook-static/assets/PublishBrandPageModal-BOGSPjB0.css +0 -1
- package/.storybook-static/assets/PublishBrandPageModal.stories-Bt2eK5tM.js +0 -349
- package/.storybook-static/assets/SearchBar.stories-DE7D9jqF.js +0 -12
- package/.storybook-static/assets/Select-BkD_4Yie.css +0 -1
- package/.storybook-static/assets/Select.stories-vMzrjNuo.js +0 -108
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-DAV6wUWy.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-geQc7R-K.css +0 -1
- package/.storybook-static/assets/SellDomainNameListModal.stories-BOCkiwOR.js +0 -71
- package/.storybook-static/assets/SellDomainNameListSearchResult-DP3zr-UL.js +0 -1
- package/.storybook-static/assets/SellDomainNameListSearchResult-Dtf2vM3k.css +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults--W028-5L.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-CCYgVB46.js +0 -37
- package/.storybook-static/assets/SellDomainNameWidget.stories-ukdr-BaU.js +0 -36
- package/.storybook-static/assets/SignIn-B9RTmsHO.css +0 -1
- package/.storybook-static/assets/SignIn-yR2yVQBY.js +0 -1
- package/.storybook-static/assets/Slider-CQ7DbC3q.css +0 -1
- package/.storybook-static/assets/Slider.stories-CwIY_YjL.js +0 -129
- package/.storybook-static/assets/StarRating-BRQqs_py.css +0 -1
- package/.storybook-static/assets/StarRating.stories-B2ZK1FmW.js +0 -45
- package/.storybook-static/assets/TabMenu.stories-Cr3TQSxW.js +0 -47
- package/.storybook-static/assets/TextCopyField-BuZ5L-lt.js +0 -1
- package/.storybook-static/assets/TextCopyField.stories-ivRqKsNm.js +0 -47
- package/.storybook-static/assets/TextInput-BepJC9nE.js +0 -1
- package/.storybook-static/assets/TextInput.stories-BW4TEkLR.js +0 -233
- package/.storybook-static/assets/Textarea.stories-DWkB6BWG.js +0 -207
- package/.storybook-static/assets/Toggle.stories-C_GsxzOh.js +0 -161
- package/.storybook-static/assets/Tooltip-BHf5qq0n.css +0 -1
- package/.storybook-static/assets/Tooltip-BQfusa53.js +0 -1
- package/.storybook-static/assets/Tooltip.stories-CAIFG7b2.js +0 -953
- package/.storybook-static/assets/UploadYourLogoApplication-CeFWp7qz.css +0 -9
- package/.storybook-static/assets/UploadYourLogoApplication.stories-C-OLYLzi.js +0 -194
- package/.storybook-static/assets/UploadYourLogoDropzone-BZeSfjIk.css +0 -1
- package/.storybook-static/assets/UploadYourLogoDropzone-Cxgdqo37.js +0 -24
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-X-I5FYLu.js +0 -35
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-B2kj1FVv.js +0 -79
- package/.storybook-static/assets/WithTooltip-Y7J54OF7-DkTQ6h6H.js +0 -1
- package/.storybook-static/assets/_commonjsHelpers-BosuxZz1.js +0 -1
- package/.storybook-static/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/.storybook-static/assets/api-lSJGRrF2.js +0 -1
- package/.storybook-static/assets/axe-CeoKsdFO.js +0 -30
- package/.storybook-static/assets/axios-dxcvQi4N.js +0 -6
- package/.storybook-static/assets/brand-crowd-api.client-CfTgrTzo.js +0 -1
- package/.storybook-static/assets/carousel-B0jomWUs.css +0 -1
- package/.storybook-static/assets/carousel.stories-B1RxWT1u.js +0 -374
- package/.storybook-static/assets/entry-preview-CMasyaBj.js +0 -1
- package/.storybook-static/assets/entry-preview-docs-DfJD_mNC.js +0 -14
- package/.storybook-static/assets/event-constants-6ydiL1p5.js +0 -1
- package/.storybook-static/assets/formatter-B5HCVTEV-CmCZjaYl.js +0 -58
- package/.storybook-static/assets/iframe-B6RguKdJ.js +0 -7
- package/.storybook-static/assets/index-BqKh95Lf.js +0 -24
- package/.storybook-static/assets/index-BwDkhjyp.js +0 -9
- package/.storybook-static/assets/index-D-8MO0q_.js +0 -1
- package/.storybook-static/assets/index-DK28puIS.js +0 -3
- package/.storybook-static/assets/index-DlpNa54Y.js +0 -1
- package/.storybook-static/assets/index-DrFu-skq.js +0 -6
- package/.storybook-static/assets/preview-B4GcaC1c.js +0 -1
- package/.storybook-static/assets/preview-BAz7FMXc.js +0 -396
- package/.storybook-static/assets/preview-BJPLiuSt.js +0 -1
- package/.storybook-static/assets/preview-CBGjgnh2.js +0 -1
- package/.storybook-static/assets/preview-Cv3rAi2i.js +0 -7
- package/.storybook-static/assets/preview-CwqMn10d.js +0 -20
- package/.storybook-static/assets/preview-DF-d5FoE.js +0 -1
- package/.storybook-static/assets/preview-Db4Idchh.js +0 -1
- package/.storybook-static/assets/preview-DvOZkz_N.js +0 -7
- package/.storybook-static/assets/preview-G-5UVXmd.js +0 -1
- package/.storybook-static/assets/preview-efJowmDL.js +0 -7
- package/.storybook-static/assets/syntaxhighlighter-JOJW2KGS-DjsQUJyu.js +0 -1
- package/.storybook-static/assets/tracking-ATsLLehC.js +0 -1
- package/.storybook-static/assets/vue.esm-bundler-C7QvyiW1.js +0 -47
- package/.storybook-static/css/tailwind-brandCrowd.css +0 -2344
- package/.storybook-static/css/tailwind-brandPage.css +0 -2032
- package/.storybook-static/css/tailwind-crazyDomains.css +0 -2344
- package/.storybook-static/css/tailwind-designCom.css +0 -2344
- package/.storybook-static/css/tailwind-designCrowd.css +0 -2344
- package/.storybook-static/favicon.svg +0 -7
- package/.storybook-static/iframe.html +0 -501
- package/.storybook-static/index.html +0 -163
- package/.storybook-static/index.json +0 -1
- package/.storybook-static/project.json +0 -1
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/actions-2/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/controls-3/manager-bundle.js +0 -60
- package/.storybook-static/sb-addons/controls-3/manager-bundle.js.LEGAL.txt +0 -18
- package/.storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +0 -12
- package/.storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/links-9/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/links-9/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/themes-10/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/themes-10/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-common-assets/fonts.css +0 -31
- package/.storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/sb-manager/WithTooltip-Y7J54OF7-3AIPQNGM.js +0 -1
- package/.storybook-static/sb-manager/chunk-KCJCJECS.js +0 -234
- package/.storybook-static/sb-manager/chunk-TZAR34JC.js +0 -6
- package/.storybook-static/sb-manager/chunk-UOBNU442.js +0 -347
- package/.storybook-static/sb-manager/chunk-VCJ56UEM.js +0 -183
- package/.storybook-static/sb-manager/chunk-VMGB76WP.js +0 -9
- package/.storybook-static/sb-manager/chunk-XP3HGWTR.js +0 -1
- package/.storybook-static/sb-manager/formatter-B5HCVTEV-7DCBOGO6.js +0 -58
- package/.storybook-static/sb-manager/globals-module-info.js +0 -1
- package/.storybook-static/sb-manager/globals-runtime.js +0 -1
- package/.storybook-static/sb-manager/globals.js +0 -1
- package/.storybook-static/sb-manager/index.js +0 -1
- package/.storybook-static/sb-manager/runtime.js +0 -1
- package/.storybook-static/sb-manager/syntaxhighlighter-JOJW2KGS-7BF26SBB.js +0 -1
- package/.storybook-static/sb-preview/globals.js +0 -1
- package/.storybook-static/sb-preview/runtime.js +0 -128
- package/dist/css/tailwind-brandCrowd.css +0 -2459
- package/dist/css/tailwind-brandPage.css +0 -2147
- package/dist/css/tailwind-crazyDomains.css +0 -2459
- package/dist/css/tailwind-designCom.css +0 -2459
- package/dist/css/tailwind-designCrowd.css +0 -2459
package/Dockerfile
CHANGED
package/index.js
CHANGED
|
@@ -19,6 +19,8 @@ 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';
|
|
23
|
+
|
|
22
24
|
export { default as Button } from './src/atoms/components/Button/Button.vue';
|
|
23
25
|
export { default as ButtonGroup } from './src/atoms/components/ButtonGroup/ButtonGroup.vue';
|
|
24
26
|
export { default as Dropdown } from './src/atoms/components/Dropdown/Dropdown.vue';
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcrowd/fe-shared-lib",
|
|
3
|
-
"version": "1.2.2
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"start": "
|
|
5
|
+
"start": "run-p storybook watch:translation",
|
|
6
6
|
"build": "npm run build:css --production",
|
|
7
7
|
"storybook": "export NODE_ENV=development && npm run storybook:css && npm run storybook:themes && storybook dev -p 6006 public",
|
|
8
8
|
"build:css": "node ./tailwind.build.js",
|
|
9
9
|
"build:storybook": "mkdir -p public && mkdir -p public/css && npm run storybook:css && storybook build -c .storybook -o .storybook-static && cp -R ./public/css .storybook-static/",
|
|
10
|
+
"bundle-translation": "node ./src/bundleTranslation.js",
|
|
11
|
+
"watch:translation": "nodemon --config nodemon.translation.json",
|
|
10
12
|
"storybook:themes": "node ./tailwind.themes.js",
|
|
11
13
|
"storybook:css": "node ./tailwind.build.js --storybook",
|
|
12
14
|
"lint": "NODE_ENV=production eslint ./src/ --ext .ts,.js,.vue",
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
"cropperjs": "1.6.1",
|
|
27
29
|
"dropzone-vue3": "1.0.2",
|
|
28
30
|
"fs-extra": "11.2.0",
|
|
31
|
+
"i18next": "25.2.1",
|
|
29
32
|
"lodash.throttle": "4.1.1",
|
|
30
33
|
"postcss-loader": "8.1.0",
|
|
31
34
|
"swiper": "11.0.6",
|
|
@@ -62,6 +65,8 @@
|
|
|
62
65
|
"eslint-plugin-vue": "9.21.1",
|
|
63
66
|
"husky": "9.0.10",
|
|
64
67
|
"lint-staged": "15.2.1",
|
|
68
|
+
"nodemon": "3.0.3",
|
|
69
|
+
"npm-run-all": "4.1.5",
|
|
65
70
|
"postcss": "8.4.33",
|
|
66
71
|
"postcss-cli": "11.0.0",
|
|
67
72
|
"postcss-import": "16.0.0",
|
|
@@ -108,4 +113,4 @@
|
|
|
108
113
|
"overrides": {
|
|
109
114
|
"storybook": "$storybook"
|
|
110
115
|
}
|
|
111
|
-
}
|
|
116
|
+
}
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
aria-labelledby="title"
|
|
21
21
|
aria-describedby="desc"
|
|
22
22
|
>
|
|
23
|
-
<title :id="`${name}-${id}-title`" lang="en">{{ title }}</title>
|
|
24
|
-
<desc :id="`${name}-${id}-desc`" lang="en">{{ description }}</desc>
|
|
23
|
+
<title v-if="title" :id="`${name}-${id}-title`" lang="en">{{ title }}</title>
|
|
24
|
+
<desc v-if="description" :id="`${name}-${id}-desc`" lang="en">{{ description }}</desc>
|
|
25
25
|
<component :is="`icon-${iconName}`"></component>
|
|
26
26
|
</svg>
|
|
27
27
|
</div>
|
|
@@ -799,7 +799,7 @@ export default {
|
|
|
799
799
|
return css || null;
|
|
800
800
|
},
|
|
801
801
|
title() {
|
|
802
|
-
return this.altText
|
|
802
|
+
return this.altText;
|
|
803
803
|
},
|
|
804
804
|
description() {
|
|
805
805
|
return `${this.title} Icon`;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
const localeSuffixes = ['.de-DE', '.fr-FR', '.es-ES', '.pt-PT', ''];
|
|
5
|
+
|
|
6
|
+
const findTranslationFiles = (dir, localeString) => {
|
|
7
|
+
const files = [];
|
|
8
|
+
const entries = fs.readdirSync(dir);
|
|
9
|
+
|
|
10
|
+
entries.forEach((entry) => {
|
|
11
|
+
const fullPath = path.join(dir, entry);
|
|
12
|
+
|
|
13
|
+
if (fs.statSync(fullPath).isDirectory()) {
|
|
14
|
+
if (entry === 'i18n') {
|
|
15
|
+
files.push(
|
|
16
|
+
...fs
|
|
17
|
+
.readdirSync(fullPath)
|
|
18
|
+
.filter((file) => {
|
|
19
|
+
if (localeString === '') {
|
|
20
|
+
return (
|
|
21
|
+
!file.includes('.de-DE') &&
|
|
22
|
+
!file.includes('.fr-FR') &&
|
|
23
|
+
!file.includes('.es-ES') &&
|
|
24
|
+
!file.includes('.pt-PT')
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return file.endsWith(`${localeString}.json`);
|
|
28
|
+
})
|
|
29
|
+
.map((file) => path.join(fullPath, file)),
|
|
30
|
+
);
|
|
31
|
+
} else {
|
|
32
|
+
// Recursively find translation files in nested folders
|
|
33
|
+
files.push(...findTranslationFiles(fullPath, localeString));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
return files;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const bundle = () => {
|
|
42
|
+
console.log('Bundling translations...', __dirname);
|
|
43
|
+
|
|
44
|
+
const bundlesDir = path.resolve(__dirname, './bundles');
|
|
45
|
+
|
|
46
|
+
console.log('bundlesDir', bundlesDir);
|
|
47
|
+
|
|
48
|
+
if (!fs.existsSync(bundlesDir)) {
|
|
49
|
+
console.log('Creating bundles dir');
|
|
50
|
+
fs.mkdirSync(bundlesDir);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const rootDir = path.resolve(__dirname, '../src');
|
|
54
|
+
|
|
55
|
+
localeSuffixes.forEach((locale) => {
|
|
56
|
+
const outputFile = path.resolve(bundlesDir, `bundled-translations${locale}.json`);
|
|
57
|
+
|
|
58
|
+
const translationFiles = findTranslationFiles(rootDir, locale);
|
|
59
|
+
|
|
60
|
+
console.log(
|
|
61
|
+
`Found ${translationFiles.length} translation files in BrandPage for file prefix: ${`bundled-translations${locale}.json`}`,
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const translations = {};
|
|
65
|
+
|
|
66
|
+
translationFiles.forEach((file) => {
|
|
67
|
+
const fileContent = fs.readFileSync(file, 'utf-8');
|
|
68
|
+
|
|
69
|
+
Object.assign(translations, JSON.parse(fileContent));
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
console.log(`Writing bundled translations to: ${outputFile}`);
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
const potentiallyExistingFile = fs.readFileSync(outputFile, 'utf-8');
|
|
76
|
+
|
|
77
|
+
if (potentiallyExistingFile === JSON.stringify(translations, null, 2)) {
|
|
78
|
+
console.log('Current translations are the same as the existing file - skipping write');
|
|
79
|
+
} else {
|
|
80
|
+
fs.writeFileSync(outputFile, JSON.stringify(translations, null, 2));
|
|
81
|
+
}
|
|
82
|
+
} catch (e) {
|
|
83
|
+
console.log("Translation file doesn't exist, creating new one");
|
|
84
|
+
fs.writeFileSync(outputFile, JSON.stringify(translations, null, 2));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
bundle();
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{{ title }}
|
|
14
14
|
</h2>
|
|
15
15
|
<p class="tw-mb-8 tw-text-grayscale-600">{{ description }}</p>
|
|
16
|
-
<form id="resetPassword"
|
|
16
|
+
<form id="resetPassword" method="post" @submit="validate">
|
|
17
17
|
<input name="__RequestVerificationToken" type="hidden" :value="antiForgeryToken" />
|
|
18
18
|
<input name="userName" type="hidden" :value="userName" />
|
|
19
19
|
<input name="resetPasswordToken" type="hidden" :value="resetPasswordToken" />
|
|
@@ -104,11 +104,6 @@ export default {
|
|
|
104
104
|
required: false,
|
|
105
105
|
default: undefined,
|
|
106
106
|
},
|
|
107
|
-
submitAction: {
|
|
108
|
-
type: String,
|
|
109
|
-
required: false,
|
|
110
|
-
default: undefined,
|
|
111
|
-
},
|
|
112
107
|
},
|
|
113
108
|
data() {
|
|
114
109
|
return {
|
|
@@ -121,9 +116,6 @@ export default {
|
|
|
121
116
|
},
|
|
122
117
|
methods: {
|
|
123
118
|
validate(e) {
|
|
124
|
-
if (this.submitAction) {
|
|
125
|
-
this.$refs.resetPasswordForm.action = this.submitAction;
|
|
126
|
-
}
|
|
127
119
|
if (this.password && this.password === this.confirmPassword) {
|
|
128
120
|
this.isLoading = true;
|
|
129
121
|
return true;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<div v-if="isNotPublished || isSlugEditMode" class="tw-mt-4">
|
|
51
51
|
<PublishBrandPageCard
|
|
52
52
|
v-if="!hasPurchasedDomains"
|
|
53
|
-
:
|
|
53
|
+
:img-url="iconUrl"
|
|
54
54
|
title="Free Address"
|
|
55
55
|
description="Choose a free address to publish now. You can always edit the URL later"
|
|
56
56
|
:is-design-com="isDesignCom"
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
data-test-brand-page-publish-button
|
|
85
85
|
variant="primary"
|
|
86
86
|
size="small-medium"
|
|
87
|
-
@on-click="onPublish"
|
|
88
87
|
:full-width="isMobile"
|
|
89
88
|
:class="{
|
|
90
89
|
'tw-uppercase': !isDesignCom,
|
|
91
90
|
}"
|
|
91
|
+
@on-click="onPublish"
|
|
92
92
|
/>
|
|
93
93
|
</div>
|
|
94
94
|
</template>
|
|
@@ -246,19 +246,21 @@
|
|
|
246
246
|
</div>
|
|
247
247
|
</template>
|
|
248
248
|
<script>
|
|
249
|
-
import
|
|
249
|
+
import { computed } from 'vue';
|
|
250
|
+
import Modal from '../../../atoms/components/Modal/Modal.vue';
|
|
250
251
|
import PublishBrandPageCard from './PublishBrandPageCard.vue';
|
|
251
|
-
import TextInput from '
|
|
252
|
-
import Dropdown from '
|
|
253
|
-
import DropdownItem from '
|
|
254
|
-
import Button from '
|
|
255
|
-
import TextCopyField from '
|
|
252
|
+
import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
|
|
253
|
+
import Dropdown from '../../../atoms/components/Dropdown/Dropdown.vue';
|
|
254
|
+
import DropdownItem from '../../../atoms/components/Dropdown/DropdownItem.vue';
|
|
255
|
+
import Button from '../../../atoms/components/Button/Button.vue';
|
|
256
|
+
import TextCopyField from '../../../atoms/components/TextCopyField/TextCopyField.vue';
|
|
256
257
|
|
|
257
258
|
import SellDomainNameSearchWithResults from '../SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue';
|
|
258
259
|
import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameListModal.vue';
|
|
259
260
|
import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
|
|
260
261
|
import Events, { sitePublishedModal } from '../../constants/event-constants';
|
|
261
262
|
import mediaQueryMixin from '../../mixins/mediaQueryMixin';
|
|
263
|
+
import { tr } from '../../../useSharedLibTranslate';
|
|
262
264
|
|
|
263
265
|
const headerSubtitle = 'Buy matching domain name for your brand';
|
|
264
266
|
|
|
@@ -413,6 +415,12 @@ export default {
|
|
|
413
415
|
'on-view-more-domains',
|
|
414
416
|
'on-slug-changed',
|
|
415
417
|
],
|
|
418
|
+
setup() {
|
|
419
|
+
return {
|
|
420
|
+
tr,
|
|
421
|
+
testMessage: computed(() => tr('publishModal.test')),
|
|
422
|
+
};
|
|
423
|
+
},
|
|
416
424
|
data() {
|
|
417
425
|
return {
|
|
418
426
|
DOMAIN_TYPES,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
+
import i18next from 'i18next';
|
|
3
|
+
|
|
4
|
+
const fallbackLocale = 'en-US';
|
|
5
|
+
|
|
6
|
+
const relativePathsToTranslationFiles = {
|
|
7
|
+
'en-US': () => import('./bundles/bundled-translations.json'),
|
|
8
|
+
'de-DE': () => import('./bundles/bundled-translations.de-DE.json'),
|
|
9
|
+
'fr-FR': () => import('./bundles/bundled-translations.fr-FR.json'),
|
|
10
|
+
'es-ES': () => import('./bundles/bundled-translations.es-ES.json'),
|
|
11
|
+
'pt-PT': () => import('./bundles/bundled-translations.pt-PT.json'),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const setLocaleAsync = async (locale = 'en-US') => {
|
|
15
|
+
const localeToUse = locale;
|
|
16
|
+
|
|
17
|
+
if (!i18next.isInitialized) {
|
|
18
|
+
await i18next.init({
|
|
19
|
+
debug: false,
|
|
20
|
+
fallbackLng: fallbackLocale,
|
|
21
|
+
lng: localeToUse,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const languageFile = (await relativePathsToTranslationFiles[localeToUse]()).default;
|
|
26
|
+
|
|
27
|
+
await i18next.addResourceBundle(localeToUse, 'fe-shared-lib', {
|
|
28
|
+
...languageFile,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const tr = (key, valuesToInterpolate = {}) => {
|
|
33
|
+
const translated = i18next.t(key, { ns: 'fe-shared-lib', ...valuesToInterpolate });
|
|
34
|
+
|
|
35
|
+
return translated;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { setLocaleAsync, tr };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.email-input[data-v-ca06c217]{background-image:url(https://dcstatic.com/images/icons/forms/forms-email-58207f9a5c.svg);background-position:top 50% left .5rem}.password-input[data-v-ca06c217]{background-image:url(https://dcstatic.com/images/icons/forms/forms-password-ff538cd5e4.svg);background-position:top 50% left .5rem}.tw-pl-10-important[data-v-ca06c217]{padding-left:2.5rem!important}.email-input[data-v-decd2a1c]{background-image:url(https://dcstatic.com/images/icons/forms/forms-email-58207f9a5c.svg);background-position:top 50% left .5rem}.tw-pl-10-important[data-v-decd2a1c]{padding-left:2.5rem!important}.password-input[data-v-da12bb42]{background-image:url(https://dcstatic.com/images/icons/forms/forms-password-ff538cd5e4.svg);background-position:top 50% left .5rem}.tw-pl-10-important[data-v-da12bb42]{padding-left:2.5rem!important}
|