@designcrowd/fe-shared-lib 1.2.0-tr-2 → 1.2.0-tr-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/Dockerfile +2 -0
- package/nodemon.translation.json +7 -0
- package/package.json +6 -2
- package/public/css/tailwind-brandCrowd.css +0 -26
- package/public/css/tailwind-brandPage.css +0 -22
- package/public/css/tailwind-crazyDomains.css +0 -26
- package/public/css/tailwind-designCom.css +0 -26
- package/public/css/tailwind-designCrowd.css +0 -26
- package/src/bundleTranslation.js +79 -0
- package/src/bundles/bundled-translations.json +5 -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_pt-PT.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +11 -10
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-translation.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-translation_de-DE.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-translation_es-ES.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-translation_fr-FR.json +5 -0
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-translation_pt-PT.json +5 -0
- package/src/useSharedLibTranslate.js +12 -4
- package/dist/css/tailwind-brandCrowd.css +0 -2419
- package/dist/css/tailwind-brandPage.css +0 -2107
- package/dist/css/tailwind-crazyDomains.css +0 -2419
- package/dist/css/tailwind-designCom.css +0 -2419
- package/dist/css/tailwind-designCrowd.css +0 -2419
package/Dockerfile
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcrowd/fe-shared-lib",
|
|
3
|
-
"version": "1.2.0-tr-
|
|
3
|
+
"version": "1.2.0-tr-4",
|
|
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",
|
|
@@ -63,6 +65,8 @@
|
|
|
63
65
|
"eslint-plugin-vue": "9.21.1",
|
|
64
66
|
"husky": "9.0.10",
|
|
65
67
|
"lint-staged": "15.2.1",
|
|
68
|
+
"nodemon": "3.0.3",
|
|
69
|
+
"npm-run-all": "4.1.5",
|
|
66
70
|
"postcss": "8.4.33",
|
|
67
71
|
"postcss-cli": "11.0.0",
|
|
68
72
|
"postcss-import": "16.0.0",
|
|
@@ -719,9 +719,6 @@ video {
|
|
|
719
719
|
.theme-brandCrowd .tw-ml-auto {
|
|
720
720
|
margin-left: auto;
|
|
721
721
|
}
|
|
722
|
-
.theme-brandCrowd .tw-mr-1 {
|
|
723
|
-
margin-right: 0.25rem;
|
|
724
|
-
}
|
|
725
722
|
.theme-brandCrowd .tw-mr-2 {
|
|
726
723
|
margin-right: 0.5rem;
|
|
727
724
|
}
|
|
@@ -830,10 +827,6 @@ video {
|
|
|
830
827
|
.theme-brandCrowd .tw-h-auto {
|
|
831
828
|
height: auto;
|
|
832
829
|
}
|
|
833
|
-
.theme-brandCrowd .tw-h-fit {
|
|
834
|
-
height: -moz-fit-content;
|
|
835
|
-
height: fit-content;
|
|
836
|
-
}
|
|
837
830
|
.theme-brandCrowd .tw-h-full {
|
|
838
831
|
height: 100%;
|
|
839
832
|
}
|
|
@@ -1453,17 +1446,6 @@ video {
|
|
|
1453
1446
|
.theme-brandCrowd .tw-bg-opacity-80 {
|
|
1454
1447
|
--tw-bg-opacity: 0.8;
|
|
1455
1448
|
}
|
|
1456
|
-
.theme-brandCrowd .tw-bg-gradient-to-t {
|
|
1457
|
-
background-image: linear-gradient(to top, var(--tw-gradient-stops));
|
|
1458
|
-
}
|
|
1459
|
-
.theme-brandCrowd .tw-from-\[\#d946ef\] {
|
|
1460
|
-
--tw-gradient-from: #d946ef var(--tw-gradient-from-position);
|
|
1461
|
-
--tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
|
|
1462
|
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1463
|
-
}
|
|
1464
|
-
.theme-brandCrowd .tw-to-\[\#8b5cf6\] {
|
|
1465
|
-
--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
|
|
1466
|
-
}
|
|
1467
1449
|
.theme-brandCrowd .tw-bg-no-repeat {
|
|
1468
1450
|
background-repeat: no-repeat;
|
|
1469
1451
|
}
|
|
@@ -2041,10 +2023,6 @@ video {
|
|
|
2041
2023
|
--tw-bg-opacity: 1;
|
|
2042
2024
|
background-color: rgb(0 121 172 / var(--tw-bg-opacity));
|
|
2043
2025
|
}
|
|
2044
|
-
.theme-brandCrowd .hover\:tw-bg-primary-100:hover {
|
|
2045
|
-
--tw-bg-opacity: 1;
|
|
2046
|
-
background-color: rgb(252 209 217 / var(--tw-bg-opacity));
|
|
2047
|
-
}
|
|
2048
2026
|
.theme-brandCrowd .hover\:tw-bg-primary-400:hover {
|
|
2049
2027
|
--tw-bg-opacity: 1;
|
|
2050
2028
|
background-color: rgb(245 73 101 / var(--tw-bg-opacity));
|
|
@@ -2109,10 +2087,6 @@ video {
|
|
|
2109
2087
|
--tw-shadow-color: #0097D7 !important;
|
|
2110
2088
|
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
2111
2089
|
}
|
|
2112
|
-
.theme-brandCrowd .hover\:tw-brightness-\[0\.85\]:hover {
|
|
2113
|
-
--tw-brightness: brightness(0.85);
|
|
2114
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2115
|
-
}
|
|
2116
2090
|
.theme-brandCrowd .focus\:tw-border-error-600:focus {
|
|
2117
2091
|
--tw-border-opacity: 1;
|
|
2118
2092
|
border-color: rgb(194 22 50 / var(--tw-border-opacity));
|
|
@@ -719,9 +719,6 @@ video {
|
|
|
719
719
|
.theme-brandPage .tw-ml-auto {
|
|
720
720
|
margin-left: auto;
|
|
721
721
|
}
|
|
722
|
-
.theme-brandPage .tw-mr-1 {
|
|
723
|
-
margin-right: 0.25rem;
|
|
724
|
-
}
|
|
725
722
|
.theme-brandPage .tw-mr-2 {
|
|
726
723
|
margin-right: 0.5rem;
|
|
727
724
|
}
|
|
@@ -830,10 +827,6 @@ video {
|
|
|
830
827
|
.theme-brandPage .tw-h-auto {
|
|
831
828
|
height: auto;
|
|
832
829
|
}
|
|
833
|
-
.theme-brandPage .tw-h-fit {
|
|
834
|
-
height: -moz-fit-content;
|
|
835
|
-
height: fit-content;
|
|
836
|
-
}
|
|
837
830
|
.theme-brandPage .tw-h-full {
|
|
838
831
|
height: 100%;
|
|
839
832
|
}
|
|
@@ -1301,17 +1294,6 @@ video {
|
|
|
1301
1294
|
.theme-brandPage .tw-bg-opacity-80 {
|
|
1302
1295
|
--tw-bg-opacity: 0.8;
|
|
1303
1296
|
}
|
|
1304
|
-
.theme-brandPage .tw-bg-gradient-to-t {
|
|
1305
|
-
background-image: linear-gradient(to top, var(--tw-gradient-stops));
|
|
1306
|
-
}
|
|
1307
|
-
.theme-brandPage .tw-from-\[\#d946ef\] {
|
|
1308
|
-
--tw-gradient-from: #d946ef var(--tw-gradient-from-position);
|
|
1309
|
-
--tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
|
|
1310
|
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1311
|
-
}
|
|
1312
|
-
.theme-brandPage .tw-to-\[\#8b5cf6\] {
|
|
1313
|
-
--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
|
|
1314
|
-
}
|
|
1315
1297
|
.theme-brandPage .tw-bg-no-repeat {
|
|
1316
1298
|
background-repeat: no-repeat;
|
|
1317
1299
|
}
|
|
@@ -1809,10 +1791,6 @@ video {
|
|
|
1809
1791
|
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
1810
1792
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1811
1793
|
}
|
|
1812
|
-
.theme-brandPage .hover\:tw-brightness-\[0\.85\]:hover {
|
|
1813
|
-
--tw-brightness: brightness(0.85);
|
|
1814
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
1815
|
-
}
|
|
1816
1794
|
.theme-brandPage .focus\:tw-border-grayscale-600:focus {
|
|
1817
1795
|
--tw-border-opacity: 1;
|
|
1818
1796
|
border-color: rgb(94 94 94 / var(--tw-border-opacity));
|
|
@@ -719,9 +719,6 @@ video {
|
|
|
719
719
|
.theme-crazyDomains .tw-ml-auto {
|
|
720
720
|
margin-left: auto;
|
|
721
721
|
}
|
|
722
|
-
.theme-crazyDomains .tw-mr-1 {
|
|
723
|
-
margin-right: 0.25rem;
|
|
724
|
-
}
|
|
725
722
|
.theme-crazyDomains .tw-mr-2 {
|
|
726
723
|
margin-right: 0.5rem;
|
|
727
724
|
}
|
|
@@ -830,10 +827,6 @@ video {
|
|
|
830
827
|
.theme-crazyDomains .tw-h-auto {
|
|
831
828
|
height: auto;
|
|
832
829
|
}
|
|
833
|
-
.theme-crazyDomains .tw-h-fit {
|
|
834
|
-
height: -moz-fit-content;
|
|
835
|
-
height: fit-content;
|
|
836
|
-
}
|
|
837
830
|
.theme-crazyDomains .tw-h-full {
|
|
838
831
|
height: 100%;
|
|
839
832
|
}
|
|
@@ -1453,17 +1446,6 @@ video {
|
|
|
1453
1446
|
.theme-crazyDomains .tw-bg-opacity-80 {
|
|
1454
1447
|
--tw-bg-opacity: 0.8;
|
|
1455
1448
|
}
|
|
1456
|
-
.theme-crazyDomains .tw-bg-gradient-to-t {
|
|
1457
|
-
background-image: linear-gradient(to top, var(--tw-gradient-stops));
|
|
1458
|
-
}
|
|
1459
|
-
.theme-crazyDomains .tw-from-\[\#d946ef\] {
|
|
1460
|
-
--tw-gradient-from: #d946ef var(--tw-gradient-from-position);
|
|
1461
|
-
--tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
|
|
1462
|
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1463
|
-
}
|
|
1464
|
-
.theme-crazyDomains .tw-to-\[\#8b5cf6\] {
|
|
1465
|
-
--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
|
|
1466
|
-
}
|
|
1467
1449
|
.theme-crazyDomains .tw-bg-no-repeat {
|
|
1468
1450
|
background-repeat: no-repeat;
|
|
1469
1451
|
}
|
|
@@ -2041,10 +2023,6 @@ video {
|
|
|
2041
2023
|
--tw-bg-opacity: 1;
|
|
2042
2024
|
background-color: rgb(0 129 191 / var(--tw-bg-opacity));
|
|
2043
2025
|
}
|
|
2044
|
-
.theme-crazyDomains .hover\:tw-bg-primary-100:hover {
|
|
2045
|
-
--tw-bg-opacity: 1;
|
|
2046
|
-
background-color: rgb(226 238 213 / var(--tw-bg-opacity));
|
|
2047
|
-
}
|
|
2048
2026
|
.theme-crazyDomains .hover\:tw-bg-primary-400:hover {
|
|
2049
2027
|
--tw-bg-opacity: 1;
|
|
2050
2028
|
background-color: rgb(140 189 89 / var(--tw-bg-opacity));
|
|
@@ -2109,10 +2087,6 @@ video {
|
|
|
2109
2087
|
--tw-shadow-color: #00A1EF !important;
|
|
2110
2088
|
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
2111
2089
|
}
|
|
2112
|
-
.theme-crazyDomains .hover\:tw-brightness-\[0\.85\]:hover {
|
|
2113
|
-
--tw-brightness: brightness(0.85);
|
|
2114
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2115
|
-
}
|
|
2116
2090
|
.theme-crazyDomains .focus\:tw-border-error-600:focus {
|
|
2117
2091
|
--tw-border-opacity: 1;
|
|
2118
2092
|
border-color: rgb(186 24 79 / var(--tw-border-opacity));
|
|
@@ -719,9 +719,6 @@ video {
|
|
|
719
719
|
.theme-designCom .tw-ml-auto {
|
|
720
720
|
margin-left: auto;
|
|
721
721
|
}
|
|
722
|
-
.theme-designCom .tw-mr-1 {
|
|
723
|
-
margin-right: 0.25rem;
|
|
724
|
-
}
|
|
725
722
|
.theme-designCom .tw-mr-2 {
|
|
726
723
|
margin-right: 0.5rem;
|
|
727
724
|
}
|
|
@@ -830,10 +827,6 @@ video {
|
|
|
830
827
|
.theme-designCom .tw-h-auto {
|
|
831
828
|
height: auto;
|
|
832
829
|
}
|
|
833
|
-
.theme-designCom .tw-h-fit {
|
|
834
|
-
height: -moz-fit-content;
|
|
835
|
-
height: fit-content;
|
|
836
|
-
}
|
|
837
830
|
.theme-designCom .tw-h-full {
|
|
838
831
|
height: 100%;
|
|
839
832
|
}
|
|
@@ -1453,17 +1446,6 @@ video {
|
|
|
1453
1446
|
.theme-designCom .tw-bg-opacity-80 {
|
|
1454
1447
|
--tw-bg-opacity: 0.8;
|
|
1455
1448
|
}
|
|
1456
|
-
.theme-designCom .tw-bg-gradient-to-t {
|
|
1457
|
-
background-image: linear-gradient(to top, var(--tw-gradient-stops));
|
|
1458
|
-
}
|
|
1459
|
-
.theme-designCom .tw-from-\[\#d946ef\] {
|
|
1460
|
-
--tw-gradient-from: #d946ef var(--tw-gradient-from-position);
|
|
1461
|
-
--tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
|
|
1462
|
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1463
|
-
}
|
|
1464
|
-
.theme-designCom .tw-to-\[\#8b5cf6\] {
|
|
1465
|
-
--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
|
|
1466
|
-
}
|
|
1467
1449
|
.theme-designCom .tw-bg-no-repeat {
|
|
1468
1450
|
background-repeat: no-repeat;
|
|
1469
1451
|
}
|
|
@@ -2041,10 +2023,6 @@ video {
|
|
|
2041
2023
|
--tw-bg-opacity: 1;
|
|
2042
2024
|
background-color: rgb(50 71 197 / var(--tw-bg-opacity));
|
|
2043
2025
|
}
|
|
2044
|
-
.theme-designCom .hover\:tw-bg-primary-100:hover {
|
|
2045
|
-
--tw-bg-opacity: 1;
|
|
2046
|
-
background-color: rgb(236 238 254 / var(--tw-bg-opacity));
|
|
2047
|
-
}
|
|
2048
2026
|
.theme-designCom .hover\:tw-bg-primary-400:hover {
|
|
2049
2027
|
--tw-bg-opacity: 1;
|
|
2050
2028
|
background-color: rgb(121 139 249 / var(--tw-bg-opacity));
|
|
@@ -2109,10 +2087,6 @@ video {
|
|
|
2109
2087
|
--tw-shadow-color: #3f59f6 !important;
|
|
2110
2088
|
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
2111
2089
|
}
|
|
2112
|
-
.theme-designCom .hover\:tw-brightness-\[0\.85\]:hover {
|
|
2113
|
-
--tw-brightness: brightness(0.85);
|
|
2114
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2115
|
-
}
|
|
2116
2090
|
.theme-designCom .focus\:tw-border-error-600:focus {
|
|
2117
2091
|
--tw-border-opacity: 1;
|
|
2118
2092
|
border-color: rgb(182 58 42 / var(--tw-border-opacity));
|
|
@@ -719,9 +719,6 @@ video {
|
|
|
719
719
|
.theme-designCrowd .tw-ml-auto {
|
|
720
720
|
margin-left: auto;
|
|
721
721
|
}
|
|
722
|
-
.theme-designCrowd .tw-mr-1 {
|
|
723
|
-
margin-right: 0.25rem;
|
|
724
|
-
}
|
|
725
722
|
.theme-designCrowd .tw-mr-2 {
|
|
726
723
|
margin-right: 0.5rem;
|
|
727
724
|
}
|
|
@@ -830,10 +827,6 @@ video {
|
|
|
830
827
|
.theme-designCrowd .tw-h-auto {
|
|
831
828
|
height: auto;
|
|
832
829
|
}
|
|
833
|
-
.theme-designCrowd .tw-h-fit {
|
|
834
|
-
height: -moz-fit-content;
|
|
835
|
-
height: fit-content;
|
|
836
|
-
}
|
|
837
830
|
.theme-designCrowd .tw-h-full {
|
|
838
831
|
height: 100%;
|
|
839
832
|
}
|
|
@@ -1453,17 +1446,6 @@ video {
|
|
|
1453
1446
|
.theme-designCrowd .tw-bg-opacity-80 {
|
|
1454
1447
|
--tw-bg-opacity: 0.8;
|
|
1455
1448
|
}
|
|
1456
|
-
.theme-designCrowd .tw-bg-gradient-to-t {
|
|
1457
|
-
background-image: linear-gradient(to top, var(--tw-gradient-stops));
|
|
1458
|
-
}
|
|
1459
|
-
.theme-designCrowd .tw-from-\[\#d946ef\] {
|
|
1460
|
-
--tw-gradient-from: #d946ef var(--tw-gradient-from-position);
|
|
1461
|
-
--tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
|
|
1462
|
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1463
|
-
}
|
|
1464
|
-
.theme-designCrowd .tw-to-\[\#8b5cf6\] {
|
|
1465
|
-
--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
|
|
1466
|
-
}
|
|
1467
1449
|
.theme-designCrowd .tw-bg-no-repeat {
|
|
1468
1450
|
background-repeat: no-repeat;
|
|
1469
1451
|
}
|
|
@@ -2041,10 +2023,6 @@ video {
|
|
|
2041
2023
|
--tw-bg-opacity: 1;
|
|
2042
2024
|
background-color: rgb(14 121 188 / var(--tw-bg-opacity));
|
|
2043
2025
|
}
|
|
2044
|
-
.theme-designCrowd .hover\:tw-bg-primary-100:hover {
|
|
2045
|
-
--tw-bg-opacity: 1;
|
|
2046
|
-
background-color: rgb(207 234 251 / var(--tw-bg-opacity));
|
|
2047
|
-
}
|
|
2048
2026
|
.theme-designCrowd .hover\:tw-bg-primary-400:hover {
|
|
2049
2027
|
--tw-bg-opacity: 1;
|
|
2050
2028
|
background-color: rgb(65 172 239 / var(--tw-bg-opacity));
|
|
@@ -2109,10 +2087,6 @@ video {
|
|
|
2109
2087
|
--tw-shadow-color: #1197EB !important;
|
|
2110
2088
|
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
2111
2089
|
}
|
|
2112
|
-
.theme-designCrowd .hover\:tw-brightness-\[0\.85\]:hover {
|
|
2113
|
-
--tw-brightness: brightness(0.85);
|
|
2114
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2115
|
-
}
|
|
2116
2090
|
.theme-designCrowd .focus\:tw-border-error-600:focus {
|
|
2117
2091
|
--tw-border-opacity: 1;
|
|
2118
2092
|
border-color: rgb(195 50 48 / var(--tw-border-opacity));
|
|
@@ -0,0 +1,79 @@
|
|
|
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) => file.endsWith(`translation${localeString}.json`))
|
|
19
|
+
.map((file) => path.join(fullPath, file)),
|
|
20
|
+
);
|
|
21
|
+
} else {
|
|
22
|
+
// Recursively find translation files in nested folders
|
|
23
|
+
files.push(...findTranslationFiles(fullPath, localeString));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return files;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const bundle = () => {
|
|
32
|
+
console.log('Bundling translations...', __dirname);
|
|
33
|
+
|
|
34
|
+
const bundlesDir = path.resolve(__dirname, './bundles');
|
|
35
|
+
|
|
36
|
+
console.log('bundlesDir', bundlesDir);
|
|
37
|
+
|
|
38
|
+
if (!fs.existsSync(bundlesDir)) {
|
|
39
|
+
console.log('Creating bundles dir');
|
|
40
|
+
fs.mkdirSync(bundlesDir);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const rootDir = path.resolve(__dirname, '../src');
|
|
44
|
+
|
|
45
|
+
localeSuffixes.forEach((locale) => {
|
|
46
|
+
const outputFile = path.resolve(bundlesDir, `bundled-translations${locale}.json`);
|
|
47
|
+
|
|
48
|
+
const translationFiles = findTranslationFiles(rootDir, locale);
|
|
49
|
+
|
|
50
|
+
console.log(
|
|
51
|
+
`Found ${translationFiles.length} translation files in BrandPage for file prefix: ${`bundled-translations${locale}.json`}`,
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const translations = {};
|
|
55
|
+
|
|
56
|
+
translationFiles.forEach((file) => {
|
|
57
|
+
const fileContent = fs.readFileSync(file, 'utf-8');
|
|
58
|
+
|
|
59
|
+
Object.assign(translations, JSON.parse(fileContent));
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
console.log(`Writing bundled translations to: ${outputFile}`);
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const potentiallyExistingFile = fs.readFileSync(outputFile, 'utf-8');
|
|
66
|
+
|
|
67
|
+
if (potentiallyExistingFile === JSON.stringify(translations, null, 2)) {
|
|
68
|
+
console.log('Current translations are the same as the existing file - skipping write');
|
|
69
|
+
} else {
|
|
70
|
+
fs.writeFileSync(outputFile, JSON.stringify(translations, null, 2));
|
|
71
|
+
}
|
|
72
|
+
} catch (e) {
|
|
73
|
+
console.log("Translation file doesn't exist, creating new one");
|
|
74
|
+
fs.writeFileSync(outputFile, JSON.stringify(translations, null, 2));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
bundle();
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
@close-modal="onCloseModal"
|
|
11
11
|
>
|
|
12
12
|
<template #header>
|
|
13
|
-
Here: {{ tr('testmessage') }}
|
|
14
13
|
<div v-if="isNotPublished || isSlugEditMode" class="tw-text-center tw-font-bold tw-mb-8 tw-mt-8 tw-text-4xl">
|
|
15
14
|
<span>Set the URL for your {{ brandPageDisplayName }}</span>
|
|
16
15
|
</div>
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
<div v-if="isNotPublished || isSlugEditMode" class="tw-mt-4">
|
|
52
51
|
<PublishBrandPageCard
|
|
53
52
|
v-if="!hasPurchasedDomains"
|
|
54
|
-
:
|
|
53
|
+
:img-url="iconUrl"
|
|
55
54
|
title="Free Address"
|
|
56
55
|
description="Choose a free address to publish now. You can always edit the URL later"
|
|
57
56
|
:is-design-com="isDesignCom"
|
|
@@ -85,11 +84,11 @@
|
|
|
85
84
|
data-test-brand-page-publish-button
|
|
86
85
|
variant="primary"
|
|
87
86
|
size="small-medium"
|
|
88
|
-
@on-click="onPublish"
|
|
89
87
|
:full-width="isMobile"
|
|
90
88
|
:class="{
|
|
91
89
|
'tw-uppercase': !isDesignCom,
|
|
92
90
|
}"
|
|
91
|
+
@on-click="onPublish"
|
|
93
92
|
/>
|
|
94
93
|
</div>
|
|
95
94
|
</template>
|
|
@@ -246,13 +245,14 @@
|
|
|
246
245
|
</div>
|
|
247
246
|
</template>
|
|
248
247
|
<script>
|
|
249
|
-
import
|
|
248
|
+
import { computed } from 'vue';
|
|
249
|
+
import Modal from '../../../atoms/components/Modal/Modal.vue';
|
|
250
250
|
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 '
|
|
251
|
+
import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
|
|
252
|
+
import Dropdown from '../../../atoms/components/Dropdown/Dropdown.vue';
|
|
253
|
+
import DropdownItem from '../../../atoms/components/Dropdown/DropdownItem.vue';
|
|
254
|
+
import Button from '../../../atoms/components/Button/Button.vue';
|
|
255
|
+
import TextCopyField from '../../../atoms/components/TextCopyField/TextCopyField.vue';
|
|
256
256
|
|
|
257
257
|
import SellDomainNameSearchWithResults from '../SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue';
|
|
258
258
|
import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameListModal.vue';
|
|
@@ -415,9 +415,9 @@ export default {
|
|
|
415
415
|
'on-slug-changed',
|
|
416
416
|
],
|
|
417
417
|
setup() {
|
|
418
|
-
console.log('tttr', tr, tr('testmessage'));
|
|
419
418
|
return {
|
|
420
419
|
tr,
|
|
420
|
+
testMessage: computed(() => tr('publishModal.testMessage')),
|
|
421
421
|
};
|
|
422
422
|
},
|
|
423
423
|
data() {
|
|
@@ -493,6 +493,7 @@ export default {
|
|
|
493
493
|
this.$emit('radio-button-changed', domain);
|
|
494
494
|
},
|
|
495
495
|
onCloseModal() {
|
|
496
|
+
console.log(this.testMessage);
|
|
496
497
|
this.$emit('close-modal');
|
|
497
498
|
this.$emit('on-hide-domain-modal');
|
|
498
499
|
},
|
|
@@ -3,7 +3,15 @@ import i18next from 'i18next';
|
|
|
3
3
|
|
|
4
4
|
const fallbackLocale = 'en-US';
|
|
5
5
|
|
|
6
|
-
const
|
|
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') => {
|
|
7
15
|
const localeToUse = locale;
|
|
8
16
|
|
|
9
17
|
if (!i18next.isInitialized) {
|
|
@@ -14,10 +22,10 @@ const setLocaleAsync = async (locale) => {
|
|
|
14
22
|
});
|
|
15
23
|
}
|
|
16
24
|
|
|
25
|
+
const languageFile = (await relativePathsToTranslationFiles[localeToUse]()).default;
|
|
26
|
+
|
|
17
27
|
await i18next.addResourceBundle(localeToUse, 'fe-shared-lib', {
|
|
18
|
-
...
|
|
19
|
-
testmessage: 'This is a test message from i18',
|
|
20
|
-
},
|
|
28
|
+
...languageFile,
|
|
21
29
|
});
|
|
22
30
|
};
|
|
23
31
|
|