@designcrowd/fe-shared-lib 1.2.0-ml-jj-9 → 1.2.0-ml-jj-12

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.
Files changed (59) hide show
  1. package/Dockerfile +2 -0
  2. package/index.js +1 -1
  3. package/nodemon.translation.json +7 -0
  4. package/package.json +11 -3
  5. package/src/atoms/components/Icon/Icon.vue +3 -3
  6. package/src/bundleTranslation.js +79 -0
  7. package/src/bundles/bundled-translations.de-DE.json +51 -0
  8. package/src/bundles/bundled-translations.es-ES.json +51 -0
  9. package/src/bundles/bundled-translations.fr-FR.json +51 -0
  10. package/src/bundles/bundled-translations.json +51 -0
  11. package/src/bundles/bundled-translations.pt-PT.json +51 -0
  12. package/src/experiences/components/PaymentConfigList/PaymentConfig.mixin.js +1 -1
  13. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageCard.vue +3 -3
  14. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +42 -25
  15. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.de-DE.json +21 -0
  16. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.es-ES.json +21 -0
  17. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.fr-FR.json +21 -0
  18. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.json +21 -0
  19. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.pt-PT.json +21 -0
  20. package/src/experiences/components/SellDomainNameList/SellDomainNameList.vue +6 -8
  21. package/src/experiences/components/SellDomainNameList/i18n/sell-domain-name-list.de-DE.json +8 -0
  22. package/src/experiences/components/SellDomainNameList/i18n/sell-domain-name-list.es-ES.json +8 -0
  23. package/src/experiences/components/SellDomainNameList/i18n/sell-domain-name-list.fr-FR.json +8 -0
  24. package/src/experiences/components/SellDomainNameList/i18n/sell-domain-name-list.json +8 -0
  25. package/src/experiences/components/SellDomainNameList/i18n/sell-domain-name-list.pt-PT.json +8 -0
  26. package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.stories.js +0 -15
  27. package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.vue +3 -7
  28. package/src/experiences/components/SellDomainNameListModal/i18n/sell-domain-name-list-modal.de-DE.json +6 -0
  29. package/src/experiences/components/SellDomainNameListModal/i18n/sell-domain-name-list-modal.es-ES.json +6 -0
  30. package/src/experiences/components/SellDomainNameListModal/i18n/sell-domain-name-list-modal.fr-FR.json +6 -0
  31. package/src/experiences/components/SellDomainNameListModal/i18n/sell-domain-name-list-modal.json +6 -0
  32. package/src/experiences/components/SellDomainNameListModal/i18n/sell-domain-name-list-modal.pt-PT.json +6 -0
  33. package/src/experiences/components/SellDomainNameModalApplication/SellDomainNameModalApplication.vue +3 -6
  34. package/src/experiences/components/SellDomainNameModalApplication/i18n/sell-domain-name-modal-application.de-DE.json +6 -0
  35. package/src/experiences/components/SellDomainNameModalApplication/i18n/sell-domain-name-modal-application.es-ES.json +6 -0
  36. package/src/experiences/components/SellDomainNameModalApplication/i18n/sell-domain-name-modal-application.fr-FR.json +6 -0
  37. package/src/experiences/components/SellDomainNameModalApplication/i18n/sell-domain-name-modal-application.json +6 -0
  38. package/src/experiences/components/SellDomainNameModalApplication/i18n/sell-domain-name-modal-application.pt-PT.json +6 -0
  39. package/src/experiences/components/SellDomainNameSearch/SellDomainNameSearch.vue +6 -10
  40. package/src/experiences/components/SellDomainNameSearch/i18n/sell-domain-name-search.de-DE.json +8 -0
  41. package/src/experiences/components/SellDomainNameSearch/i18n/sell-domain-name-search.es-ES.json +8 -0
  42. package/src/experiences/components/SellDomainNameSearch/i18n/sell-domain-name-search.fr-FR.json +8 -0
  43. package/src/experiences/components/SellDomainNameSearch/i18n/sell-domain-name-search.json +8 -0
  44. package/src/experiences/components/SellDomainNameSearch/i18n/sell-domain-name-search.pt-PT.json +8 -0
  45. package/src/experiences/components/SellDomainNameSearchResult/SellDomainNameListSearchResult.vue +11 -9
  46. package/src/experiences/components/SellDomainNameSearchResult/i18n/sell-domain-name-list-search-result.de-DE.json +6 -0
  47. package/src/experiences/components/SellDomainNameSearchResult/i18n/sell-domain-name-list-search-result.es-ES.json +6 -0
  48. package/src/experiences/components/SellDomainNameSearchResult/i18n/sell-domain-name-list-search-result.fr-FR.json +6 -0
  49. package/src/experiences/components/SellDomainNameSearchResult/i18n/sell-domain-name-list-search-result.json +6 -0
  50. package/src/experiences/components/SellDomainNameSearchResult/i18n/sell-domain-name-list-search-result.pt-PT.json +6 -0
  51. package/src/experiences/components/SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue +4 -5
  52. package/src/experiences/components/SellDomainNameWidget/SellDomainNameWidget.vue +5 -8
  53. package/src/experiences/components/SellDomainNameWidget/i18n/sell-domain-name-widget.de-DE.json +8 -0
  54. package/src/experiences/components/SellDomainNameWidget/i18n/sell-domain-name-widget.es-ES.json +8 -0
  55. package/src/experiences/components/SellDomainNameWidget/i18n/sell-domain-name-widget.fr-FR.json +8 -0
  56. package/src/experiences/components/SellDomainNameWidget/i18n/sell-domain-name-widget.json +8 -0
  57. package/src/experiences/components/SellDomainNameWidget/i18n/sell-domain-name-widget.pt-PT.json +8 -0
  58. package/src/useSharedLibTranslate.js +38 -0
  59. package/src/experiences/components/SellDomainNameSearch/useSellDomainContent.js +0 -46
package/Dockerfile CHANGED
@@ -26,6 +26,8 @@ COPY . .
26
26
 
27
27
  COPY .npmignore ./
28
28
 
29
+ RUN npm run bundle-translation
30
+
29
31
  RUN mkdir artifacts
30
32
  RUN npm publish || touch artifacts/npm_publish_failed
31
33
  RUN cp package.json artifacts/
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 { default as useSellDomainContent } from './src/experiences/components/SellDomainNameSearch/useSellDomainContent';
22
+ export { setLocaleAsync, tr } 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';
@@ -0,0 +1,7 @@
1
+ {
2
+ "exec": "npm run bundle-translation",
3
+ "ext": ".json",
4
+ "watch": [
5
+ "./src"
6
+ ]
7
+ }
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.0-ml-jj-9",
3
+ "version": "1.2.0-ml-jj-12",
4
4
  "scripts": {
5
- "start": "npm run storybook",
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",
@@ -76,6 +81,9 @@
76
81
  "vue-style-loader": "4.1.3",
77
82
  "yargs": "17.7.2"
78
83
  },
84
+ "peerDependencies": {
85
+ "vue": "3.5.15"
86
+ },
79
87
  "browserslist": [
80
88
  "> 1%",
81
89
  "last 2 versions",
@@ -108,4 +116,4 @@
108
116
  "overrides": {
109
117
  "storybook": "$storybook"
110
118
  }
111
- }
119
+ }
@@ -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 || `${this.titleCase(this.name)}`;
802
+ return this.altText;
803
803
  },
804
804
  description() {
805
805
  return `${this.title} Icon`;
@@ -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(`${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();
@@ -0,0 +1,51 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Legen Sie die URL für Ihre {brandPageDisplayName} fest",
4
+ "sitePublishedLabel": "Seite veröffentlicht!",
5
+ "publishSuccessLabel": "Ihre {brandPageDisplayName} ist live! Beginnen Sie mit der Nutzung Ihres Links:",
6
+ "freePublishCardTitleLabel": "Freie Adresse",
7
+ "freePublishCardDescriptionLabel": "Wählen Sie jetzt eine kostenlose Adresse zur Veröffentlichung aus. Sie können die URL später jederzeit bearbeiten",
8
+ "slugInputPlaceholderYourNameLabel": "ihr-name",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "ihr-firmen-name",
10
+ "freeDomainLabel": "Kostenlose Domain",
11
+ "purchasedDomainLabel": "Erworbene Domain",
12
+ "setUrlLabel": "URL festlegen",
13
+ "publishLabel": "Veröffentlichen",
14
+ "viewMoreDomainLabel": "WEITERE DOMAINS ANZEIGEN",
15
+ "viewMyWebsiteLabel": "{brandPageDisplayName} anzeigen",
16
+ "copyLabel": "Kopieren",
17
+ "copySuccessLabel": "Kopiert!",
18
+ "publishedSuccessDescriptionLabel": "Kaufen Sie eine passende Domain für Ihre Marke",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "Nein, danke, vielleicht später"
20
+ },
21
+ "sellDomainNameList": {
22
+ "freeDomainButtonLabel": "Kostenlose Domain",
23
+ "buyNowButtonLabel": "Jetzt kaufen",
24
+ "pricePerYearLabel": "/yr",
25
+ "costPriceLabel": "Kostenpreis:"
26
+ },
27
+ "sellDomainNameListModal": {
28
+ "domainSearchHeaderTitle": "Domainname suchen",
29
+ "domainSearchHeaderSubtitle": "Kaufen Sie eine passende Domain für Ihre Marke"
30
+ },
31
+ "sellDomainNameModalApplication": {
32
+ "domainSearchHeaderTitle": "Domainname suchen",
33
+ "domainSearchHeaderSubtitle": "Kaufen Sie eine passende Domain für Ihre Marke"
34
+ },
35
+ "sellDomainNameSearch": {
36
+ "searchButtonLabel": "Suche",
37
+ "searchBarLabel": "Suche",
38
+ "searchBarPlaceholder": "Domainnamen suchen",
39
+ "searchBarPreText": "Domainname"
40
+ },
41
+ "sellDomainNameListSearchResult": {
42
+ "domainSearchEmptyMessage": "Leider konnten wir keine Domain für \"{domainNameSearchTerm}\" finden.",
43
+ "searchAnotherDomainMessage": "Versuchen Sie, mit einer anderen Domain zu suchen."
44
+ },
45
+ "sellDomainNameWidget": {
46
+ "searchButtonLabel": "Suche",
47
+ "searchBarLabel": "Suche",
48
+ "searchBarPlaceholder": "Domainnamen suchen",
49
+ "domainSearchOrConnectHeaderSubtitle": "Kaufen Sie passende Domains für Ihre Marke oder verknüpfen Sie Ihre bestehende Domain"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Define la URL de tu sitio {brandPageDisplayName}",
4
+ "sitePublishedLabel": "¡Sitio publicado!",
5
+ "publishSuccessLabel": "¡Tu sitio {brandPageDisplayName} está online! Comienza a usar el enlace:",
6
+ "freePublishCardTitleLabel": "Dirección gratuita",
7
+ "freePublishCardDescriptionLabel": "Elige una dirección gratuita para publicar ahora. Siempre puedes editar la URL más tarde",
8
+ "slugInputPlaceholderYourNameLabel": "tu-nombre",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "nombre-de-tu-negocio",
10
+ "freeDomainLabel": "Dominio gratis",
11
+ "purchasedDomainLabel": "Dominio adquirido",
12
+ "setUrlLabel": "Establece URL",
13
+ "publishLabel": "Publicar",
14
+ "viewMoreDomainLabel": "VER MÁS DOMINIOS",
15
+ "viewMyWebsiteLabel": "Ver sitio {brandPageDisplayName}",
16
+ "copyLabel": "Copiar",
17
+ "copySuccessLabel": "¡Copiado!",
18
+ "publishedSuccessDescriptionLabel": "Compra un nombre de dominio que coincida con tu marca",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "No gracias, quizás más tarde"
20
+ },
21
+ "sellDomainNameList": {
22
+ "freeDomainButtonLabel": "Dominio gratis",
23
+ "buyNowButtonLabel": "Comprar ahora",
24
+ "pricePerYearLabel": "/yr",
25
+ "costPriceLabel": "Precio de coste:"
26
+ },
27
+ "sellDomainNameListModal": {
28
+ "domainSearchHeaderTitle": "Busca un nombre de dominio",
29
+ "domainSearchHeaderSubtitle": "Compra un nombre de dominio que coincida con tu marca"
30
+ },
31
+ "sellDomainNameModalApplication": {
32
+ "domainSearchHeaderTitle": "Busca un nombre de dominio",
33
+ "domainSearchHeaderSubtitle": "Compra un nombre de dominio que coincida con tu marca"
34
+ },
35
+ "sellDomainNameSearch": {
36
+ "searchButtonLabel": "Buscar",
37
+ "searchBarLabel": "Buscar",
38
+ "searchBarPlaceholder": "Busca nombres de dominio",
39
+ "searchBarPreText": "Nombre de dominio"
40
+ },
41
+ "sellDomainNameListSearchResult": {
42
+ "domainSearchEmptyMessage": "Lo siento, no hemos podido encontrar ningún dominio para \"{domainNameSearchTerm}\".",
43
+ "searchAnotherDomainMessage": "Prueba a buscar con otro nombre de dominio."
44
+ },
45
+ "sellDomainNameWidget": {
46
+ "searchButtonLabel": "Buscar",
47
+ "searchBarLabel": "Buscar",
48
+ "searchBarPlaceholder": "Busca nombres de dominio",
49
+ "domainSearchOrConnectHeaderSubtitle": "Compra un nombre de dominio que coincida con tu marca o conecta tu dominio existente"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Définissez l'URL de votre site {brandPageDisplayName}",
4
+ "sitePublishedLabel": "Site publié !",
5
+ "publishSuccessLabel": "Votre site {brandPageDisplayName} est en ligne! Commencez à utiliser votre lien:",
6
+ "freePublishCardTitleLabel": "Adresse libre",
7
+ "freePublishCardDescriptionLabel": "Choisissez une adresse gratuite pour publier maintenant. Vous pouvez toujours modifier l'URL plus tard",
8
+ "slugInputPlaceholderYourNameLabel": "your-name",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "nom-de-votre-entreprise",
10
+ "freeDomainLabel": "Domaine gratuit",
11
+ "purchasedDomainLabel": "Domaine acheté",
12
+ "setUrlLabel": "Définir l'URL",
13
+ "publishLabel": "Publier",
14
+ "viewMoreDomainLabel": "VOIR PLUS DE NOMS DE DOMAINE",
15
+ "viewMyWebsiteLabel": "Voir le site {brandPageDisplayName}",
16
+ "copyLabel": "Copier",
17
+ "copySuccessLabel": "Copié!",
18
+ "publishedSuccessDescriptionLabel": "Achetez un nom de domaine correspondant à votre marque",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "Non merci, peut-être plus tard"
20
+ },
21
+ "sellDomainNameList": {
22
+ "freeDomainButtonLabel": "Domaine gratuit",
23
+ "buyNowButtonLabel": "Acheter",
24
+ "pricePerYearLabel": "/yr",
25
+ "costPriceLabel": "Prix de revient:"
26
+ },
27
+ "sellDomainNameListModal": {
28
+ "domainSearchHeaderTitle": "Rechercher un nom de domaine",
29
+ "domainSearchHeaderSubtitle": "Achetez un nom de domaine correspondant à votre marque"
30
+ },
31
+ "sellDomainNameModalApplication": {
32
+ "domainSearchHeaderTitle": "Rechercher un nom de domaine",
33
+ "domainSearchHeaderSubtitle": "Achetez un nom de domaine correspondant à votre marque"
34
+ },
35
+ "sellDomainNameSearch": {
36
+ "searchButtonLabel": "Rechercher",
37
+ "searchBarLabel": "Rechercher",
38
+ "searchBarPlaceholder": "Rechercher des noms de domaine",
39
+ "searchBarPreText": "Nom de domaine"
40
+ },
41
+ "sellDomainNameListSearchResult": {
42
+ "domainSearchEmptyMessage": "Désolé, nous n’avons pas trouvé de nom de domaine pour \"{domainNameSearchTerm}\".",
43
+ "searchAnotherDomainMessage": "Essayez de faire une recherche avec un autre nom de domaine."
44
+ },
45
+ "sellDomainNameWidget": {
46
+ "searchButtonLabel": "Rechercher",
47
+ "searchBarLabel": "Rechercher",
48
+ "searchBarPlaceholder": "Rechercher des noms de domaine",
49
+ "domainSearchOrConnectHeaderSubtitle": "Achetez un nom de domaine correspondant à votre marque ou connectez votre domaine existant"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Defina o URL do seu {brandPageDisplayName}",
4
+ "sitePublishedLabel": "Site publicado!",
5
+ "publishSuccessLabel": "O seu {brandPageDisplayName} está ativo! Comece a usar o seu link:",
6
+ "freePublishCardTitleLabel": "Endereço gratuito",
7
+ "freePublishCardDescriptionLabel": "Escolha um endereço gratuito para publicar agora. Pode sempre editar o URL mais tarde",
8
+ "slugInputPlaceholderYourNameLabel": "o-seu-nome",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "nome-da-sua-empresa",
10
+ "freeDomainLabel": "Domínio gratuito",
11
+ "purchasedDomainLabel": "Domínio comprado",
12
+ "setUrlLabel": "Definir URL",
13
+ "publishLabel": "Publicar",
14
+ "viewMoreDomainLabel": "VER MAIS DOMÍNIOS",
15
+ "viewMyWebsiteLabel": "Ver {brandPageDisplayName}",
16
+ "copyLabel": "Copiar",
17
+ "copySuccessLabel": "Copiado!",
18
+ "publishedSuccessDescriptionLabel": "Compre um nome de domínio que corresponda à sua marca",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "Não, obrigado, talvez mais tarde"
20
+ },
21
+ "sellDomainNameList": {
22
+ "freeDomainButtonLabel": "Domínio gratuito",
23
+ "buyNowButtonLabel": "Comprar Agora",
24
+ "pricePerYearLabel": "/yr",
25
+ "costPriceLabel": "Preço de Custo:"
26
+ },
27
+ "sellDomainNameListModal": {
28
+ "domainSearchHeaderTitle": "Pesquisar um nome de domínio",
29
+ "domainSearchHeaderSubtitle": "Compre um nome de domínio que corresponda à sua marca"
30
+ },
31
+ "sellDomainNameModalApplication": {
32
+ "domainSearchHeaderTitle": "Pesquisar um nome de domínio",
33
+ "domainSearchHeaderSubtitle": "Compre um nome de domínio que corresponda à sua marca"
34
+ },
35
+ "sellDomainNameSearch": {
36
+ "searchButtonLabel": "Pesquisar",
37
+ "searchBarLabel": "Pesquisar",
38
+ "searchBarPlaceholder": "Pesquisar nomes de domínio",
39
+ "searchBarPreText": "Nome de domínio"
40
+ },
41
+ "sellDomainNameListSearchResult": {
42
+ "domainSearchEmptyMessage": "Não conseguimos encontrar nenhum domínio para \"{domainNameSearchTerm}\".",
43
+ "searchAnotherDomainMessage": "Experimente pesquisar outro nome de domínio."
44
+ },
45
+ "sellDomainNameWidget": {
46
+ "searchButtonLabel": "Pesquisar",
47
+ "searchBarLabel": "Pesquisar",
48
+ "searchBarPlaceholder": "Pesquisar nomes de domínio",
49
+ "domainSearchOrConnectHeaderSubtitle": "Compre um nome de domínio que corresponda à sua marca ou associe ao domínio que já tem"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Defina o URL do seu {brandPageDisplayName}",
4
+ "sitePublishedLabel": "Site publicado!",
5
+ "publishSuccessLabel": "O seu {brandPageDisplayName} está ativo! Comece a usar o seu link:",
6
+ "freePublishCardTitleLabel": "Endereço gratuito",
7
+ "freePublishCardDescriptionLabel": "Escolha um endereço gratuito para publicar agora. Pode sempre editar o URL mais tarde",
8
+ "slugInputPlaceholderYourNameLabel": "o-seu-nome",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "nome-da-sua-empresa",
10
+ "freeDomainLabel": "Domínio gratuito",
11
+ "purchasedDomainLabel": "Domínio comprado",
12
+ "setUrlLabel": "Definir URL",
13
+ "publishLabel": "Publicar",
14
+ "viewMoreDomainLabel": "VER MAIS DOMÍNIOS",
15
+ "viewMyWebsiteLabel": "Ver {brandPageDisplayName}",
16
+ "copyLabel": "Copiar",
17
+ "copySuccessLabel": "Copiado!",
18
+ "publishedSuccessDescriptionLabel": "Compre um nome de domínio que corresponda à sua marca",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "Não, obrigado, talvez mais tarde"
20
+ },
21
+ "sellDomainNameList": {
22
+ "freeDomainButtonLabel": "Domínio gratuito",
23
+ "buyNowButtonLabel": "Comprar Agora",
24
+ "pricePerYearLabel": "/yr",
25
+ "costPriceLabel": "Preço de Custo:"
26
+ },
27
+ "sellDomainNameListModal": {
28
+ "domainSearchHeaderTitle": "Pesquisar um nome de domínio",
29
+ "domainSearchHeaderSubtitle": "Compre um nome de domínio que corresponda à sua marca"
30
+ },
31
+ "sellDomainNameModalApplication": {
32
+ "domainSearchHeaderTitle": "Pesquisar um nome de domínio",
33
+ "domainSearchHeaderSubtitle": "Compre um nome de domínio que corresponda à sua marca"
34
+ },
35
+ "sellDomainNameSearch": {
36
+ "searchButtonLabel": "Pesquisar",
37
+ "searchBarLabel": "Pesquisar",
38
+ "searchBarPlaceholder": "Pesquisar nomes de domínio",
39
+ "searchBarPreText": "Nome de domínio"
40
+ },
41
+ "sellDomainNameListSearchResult": {
42
+ "domainSearchEmptyMessage": "Não conseguimos encontrar nenhum domínio para \"{domainNameSearchTerm}\".",
43
+ "searchAnotherDomainMessage": "Experimente pesquisar outro nome de domínio."
44
+ },
45
+ "sellDomainNameWidget": {
46
+ "searchButtonLabel": "Pesquisar",
47
+ "searchBarLabel": "Pesquisar",
48
+ "searchBarPlaceholder": "Pesquisar nomes de domínio",
49
+ "domainSearchOrConnectHeaderSubtitle": "Compre um nome de domínio que corresponda à sua marca ou associe ao domínio que já tem"
50
+ }
51
+ }
@@ -1,5 +1,5 @@
1
- import brandPageApiClient from '../../clients/brand-page-api.client';
2
1
  import vClickOutside from 'click-outside-vue3';
2
+ import brandPageApiClient from '../../clients/brand-page-api.client';
3
3
 
4
4
  export const paymentConfigStatuses = Object.freeze({
5
5
  active: 'Active',
@@ -32,10 +32,10 @@
32
32
  data-test-brand-page-search-button
33
33
  variant="primary"
34
34
  size="small-medium"
35
- @on-click="onClick"
36
35
  :class="{
37
36
  'tw-uppercase': !isDesignCom,
38
37
  }"
38
+ @on-click="onClick"
39
39
  />
40
40
  </div>
41
41
  </div>
@@ -53,17 +53,17 @@
53
53
  variant="primary"
54
54
  size="small-medium"
55
55
  :full-width="true"
56
- @on-click="onClick"
57
56
  :class="{
58
57
  'tw-uppercase': !isDesignCom,
59
58
  }"
59
+ @on-click="onClick"
60
60
  />
61
61
  </div>
62
62
  </div>
63
63
  </div>
64
64
  </template>
65
65
  <script setup lang="ts">
66
- import Button from '../../../../src/atoms/components/Button/Button.vue';
66
+ import Button from '../../../atoms/components/Button/Button.vue';
67
67
 
68
68
  const props = defineProps({
69
69
  title: {
@@ -197,6 +197,7 @@
197
197
  :domain-search-location="sitePublishedModal"
198
198
  :search-button-label="content.searchButtonLabel"
199
199
  @on-change-search="onSearchTextChanged"
200
+ @on-buy-now-click="onBuyNowClick"
200
201
  />
201
202
  </div>
202
203
  <Button
@@ -246,7 +247,7 @@
246
247
  @close-modal="onSellDomainNameListCloseModal"
247
248
  @search="searchDomainName(true)"
248
249
  />
249
- </div>
250
+ </div>
250
251
  </template>
251
252
  <script>
252
253
  import Modal from '../../../atoms/components/Modal/Modal.vue';
@@ -262,6 +263,7 @@ import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameLi
262
263
  import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
263
264
  import Events, { sitePublishedModal } from '../../constants/event-constants';
264
265
  import mediaQueryMixin from '../../mixins/mediaQueryMixin';
266
+ import { tr } from '../../../useSharedLibTranslate';
265
267
 
266
268
  const DOMAIN_TYPES = {
267
269
  slug: 'slug',
@@ -403,10 +405,6 @@ export default {
403
405
  required: true,
404
406
  default: '',
405
407
  },
406
- content: {
407
- type: Object,
408
- required: true,
409
- },
410
408
  },
411
409
  emits: [
412
410
  'close-modal',
@@ -418,27 +416,27 @@ export default {
418
416
  'on-view-more-domains',
419
417
  'on-slug-changed',
420
418
  ],
419
+ setup() {
420
+ return {
421
+ tr,
422
+ sitePublishedLabel: tr('publishBrandPageModal.sitePublishedLabel'),
423
+ freePublishCardTitleLabel: tr('publishBrandPageModal.freePublishCardTitleLabel'),
424
+ freePublishCardDescriptionLabel: tr('publishBrandPageModal.freePublishCardDescriptionLabel'),
425
+ slugInputPlaceholderYourNameLabel: tr('publishBrandPageModal.slugInputPlaceholderYourNameLabel'),
426
+ slugInputPlaceholderYourBusinessNameLabel: tr('publishBrandPageModal.slugInputPlaceholderYourBusinessNameLabel'),
427
+ freeDomainLabel: tr('publishBrandPageModal.freeDomainLabel'),
428
+ purchasedDomainLabel: tr('publishBrandPageModal.purchasedDomainLabel'),
429
+ setUrlLabel: tr('publishBrandPageModal.setUrlLabel'),
430
+ publishLabel: tr('publishBrandPageModal.publishLabel'),
431
+ viewMoreDomainLabel: tr('publishBrandPageModal.viewMoreDomainLabel'),
432
+ copyLabel: tr('publishBrandPageModal.copyLabel'),
433
+ copySuccessLabel: tr('publishBrandPageModal.copySuccessLabel'),
434
+ hasAlreadyPurchasedDomainCloseButtonLabel: tr('publishBrandPageModal.hasAlreadyPurchasedDomainCloseButtonLabel'),
435
+ publishedSuccessDescriptionLabel: tr('publishBrandPageModal.publishedSuccessDescriptionLabel'),
436
+ };
437
+ },
421
438
  data() {
422
439
  return {
423
- firstTimePublishHeaderLabel: this.content.publishBrandPageModalContent.firstTimePublishHeaderLabel,
424
- sitePublishedLabel: this.content.publishBrandPageModalContent.sitePublishedLabel,
425
- publishSuccessLabel: this.content.publishBrandPageModalContent.publishSuccessLabel,
426
- freePublishCardTitleLabel: this.content.publishBrandPageModalContent.freePublishCardTitleLabel,
427
- freePublishCardDescriptionLabel: this.content.publishBrandPageModalContent.freePublishCardDescriptionLabel,
428
- slugInputPlaceholderYourNameLabel: this.content.publishBrandPageModalContent.slugInputPlaceholderYourNameLabel,
429
- slugInputPlaceholderYourBusinessNameLabel:
430
- this.content.publishBrandPageModalContent.slugInputPlaceholderYourBusinessNameLabel,
431
- freeDomainLabel: this.content.publishBrandPageModalContent.freeDomainLabel,
432
- purchasedDomainLabel: this.content.publishBrandPageModalContent.purchasedDomainLabel,
433
- setUrlLabel: this.content.publishBrandPageModalContent.setUrlLabel,
434
- publishLabel: this.content.publishBrandPageModalContent.publishLabel,
435
- viewMoreDomainLabel: this.content.publishBrandPageModalContent.viewMoreDomainLabel,
436
- viewMyWebsiteLabel: this.content.publishBrandPageModalContent.viewMyWebsiteLabel,
437
- copyLabel: this.content.publishBrandPageModalContent.copyLabel,
438
- copySuccessLabel: this.content.publishBrandPageModalContent.copySuccessLabel,
439
- hasAlreadyPurchasedDomainCloseButtonLabel:
440
- this.content.publishBrandPageModalContent.hasAlreadyPurchasedDomainCloseButtonLabel,
441
- publishedSuccessDescriptionLabel: this.content.publishBrandPageModalContent.publishedSuccessDescriptionLabel,
442
440
  DOMAIN_TYPES,
443
441
  domainTypeValue: this.radioValue,
444
442
  internalSlug: this.brandPageSlug,
@@ -453,6 +451,21 @@ export default {
453
451
  };
454
452
  },
455
453
  computed: {
454
+ firstTimePublishHeaderLabel() {
455
+ return this.tr('publishBrandPageModal.firstTimePublishHeaderLabel', {
456
+ brandPageDisplayName: this.brandPageDisplayName,
457
+ });
458
+ },
459
+ publishSuccessLabel() {
460
+ return this.tr('publishBrandPageModal.publishSuccessLabel', {
461
+ brandPageDisplayName: this.brandPageDisplayName,
462
+ });
463
+ },
464
+ viewMyWebsiteLabel() {
465
+ return this.tr('publishBrandPageModal.viewMyWebsiteLabel', {
466
+ brandPageDisplayName: this.brandPageDisplayName,
467
+ });
468
+ },
456
469
  allowPublish() {
457
470
  if (this.domainTypeValue === DOMAIN_TYPES.slug) {
458
471
  return this.internalSlug && !this.slugValidationError;
@@ -515,7 +528,7 @@ export default {
515
528
  this.$emit('on-hide-domain-modal');
516
529
  },
517
530
  onCopyUrlClick() {
518
- this.$emit('copy-url-click');
531
+ this.$emit('copy-url-clicked');
519
532
  },
520
533
  onSlugChanged(e) {
521
534
  this.searchText = e;
@@ -535,6 +548,7 @@ export default {
535
548
  },
536
549
  onSearchTextChanged(val) {
537
550
  this.searchText = val;
551
+ this.$emit('on-change-search', val);
538
552
  },
539
553
  onSelectPurchasedDomain(newVal) {
540
554
  this.selectedCustomDomain = newVal;
@@ -550,6 +564,9 @@ export default {
550
564
  onSellDomainNameListCloseModal() {
551
565
  this.$emit('on-hide-domain-modal');
552
566
  },
567
+ onBuyNowClick() {
568
+ this.$emit('on-buy-now-clicked');
569
+ },
553
570
  async searchDomainName(isUserTriggered) {
554
571
  this.isLoading = true;
555
572
  let searchSlug = '';
@@ -0,0 +1,21 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Legen Sie die URL für Ihre {brandPageDisplayName} fest",
4
+ "sitePublishedLabel": "Seite veröffentlicht!",
5
+ "publishSuccessLabel": "Ihre {brandPageDisplayName} ist live! Beginnen Sie mit der Nutzung Ihres Links:",
6
+ "freePublishCardTitleLabel": "Freie Adresse",
7
+ "freePublishCardDescriptionLabel": "Wählen Sie jetzt eine kostenlose Adresse zur Veröffentlichung aus. Sie können die URL später jederzeit bearbeiten",
8
+ "slugInputPlaceholderYourNameLabel": "ihr-name",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "ihr-firmen-name",
10
+ "freeDomainLabel": "Kostenlose Domain",
11
+ "purchasedDomainLabel": "Erworbene Domain",
12
+ "setUrlLabel": "URL festlegen",
13
+ "publishLabel": "Veröffentlichen",
14
+ "viewMoreDomainLabel": "WEITERE DOMAINS ANZEIGEN",
15
+ "viewMyWebsiteLabel": "{brandPageDisplayName} anzeigen",
16
+ "copyLabel": "Kopieren",
17
+ "copySuccessLabel": "Kopiert!",
18
+ "publishedSuccessDescriptionLabel": "Kaufen Sie eine passende Domain für Ihre Marke",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "Nein, danke, vielleicht später"
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Define la URL de tu sitio {brandPageDisplayName}",
4
+ "sitePublishedLabel": "¡Sitio publicado!",
5
+ "publishSuccessLabel": "¡Tu sitio {brandPageDisplayName} está online! Comienza a usar el enlace:",
6
+ "freePublishCardTitleLabel": "Dirección gratuita",
7
+ "freePublishCardDescriptionLabel": "Elige una dirección gratuita para publicar ahora. Siempre puedes editar la URL más tarde",
8
+ "slugInputPlaceholderYourNameLabel": "tu-nombre",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "nombre-de-tu-negocio",
10
+ "freeDomainLabel": "Dominio gratis",
11
+ "purchasedDomainLabel": "Dominio adquirido",
12
+ "setUrlLabel": "Establece URL",
13
+ "publishLabel": "Publicar",
14
+ "viewMoreDomainLabel": "VER MÁS DOMINIOS",
15
+ "viewMyWebsiteLabel": "Ver sitio {brandPageDisplayName}",
16
+ "copyLabel": "Copiar",
17
+ "copySuccessLabel": "¡Copiado!",
18
+ "publishedSuccessDescriptionLabel": "Compra un nombre de dominio que coincida con tu marca",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "No gracias, quizás más tarde"
20
+ }
21
+ }