@designcrowd/fe-shared-lib 1.2.0-ml-jj-10 → 1.2.0-ml-jj-13

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 +7 -2
  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 -27
  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 -12
  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-10",
3
+ "version": "1.2.0-ml-jj-13",
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",
@@ -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: {
@@ -195,8 +195,8 @@
195
195
  :currency="userCurrency"
196
196
  :display-result-limit="4"
197
197
  :domain-search-location="sitePublishedModal"
198
- :search-button-label="content.searchButtonLabel"
199
198
  @on-change-search="onSearchTextChanged"
199
+ @on-buy-now-click="onBuyNowClick"
200
200
  />
201
201
  </div>
202
202
  <Button
@@ -241,12 +241,11 @@
241
241
  :domain-name-items="domainNameItems"
242
242
  :previous-search-text="previousSearchText"
243
243
  :visible="isModalVisible"
244
- :search-button-label="content.searchButtonLabel"
245
244
  :domain-search-location="sitePublishedModal"
246
245
  @close-modal="onSellDomainNameListCloseModal"
247
246
  @search="searchDomainName(true)"
248
247
  />
249
- </div>
248
+ </div>
250
249
  </template>
251
250
  <script>
252
251
  import Modal from '../../../atoms/components/Modal/Modal.vue';
@@ -262,6 +261,7 @@ import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameLi
262
261
  import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
263
262
  import Events, { sitePublishedModal } from '../../constants/event-constants';
264
263
  import mediaQueryMixin from '../../mixins/mediaQueryMixin';
264
+ import { tr } from '../../../useSharedLibTranslate';
265
265
 
266
266
  const DOMAIN_TYPES = {
267
267
  slug: 'slug',
@@ -403,10 +403,6 @@ export default {
403
403
  required: true,
404
404
  default: '',
405
405
  },
406
- content: {
407
- type: Object,
408
- required: true,
409
- },
410
406
  },
411
407
  emits: [
412
408
  'close-modal',
@@ -418,27 +414,27 @@ export default {
418
414
  'on-view-more-domains',
419
415
  'on-slug-changed',
420
416
  ],
417
+ setup() {
418
+ return {
419
+ tr,
420
+ sitePublishedLabel: tr('publishBrandPageModal.sitePublishedLabel'),
421
+ freePublishCardTitleLabel: tr('publishBrandPageModal.freePublishCardTitleLabel'),
422
+ freePublishCardDescriptionLabel: tr('publishBrandPageModal.freePublishCardDescriptionLabel'),
423
+ slugInputPlaceholderYourNameLabel: tr('publishBrandPageModal.slugInputPlaceholderYourNameLabel'),
424
+ slugInputPlaceholderYourBusinessNameLabel: tr('publishBrandPageModal.slugInputPlaceholderYourBusinessNameLabel'),
425
+ freeDomainLabel: tr('publishBrandPageModal.freeDomainLabel'),
426
+ purchasedDomainLabel: tr('publishBrandPageModal.purchasedDomainLabel'),
427
+ setUrlLabel: tr('publishBrandPageModal.setUrlLabel'),
428
+ publishLabel: tr('publishBrandPageModal.publishLabel'),
429
+ viewMoreDomainLabel: tr('publishBrandPageModal.viewMoreDomainLabel'),
430
+ copyLabel: tr('publishBrandPageModal.copyLabel'),
431
+ copySuccessLabel: tr('publishBrandPageModal.copySuccessLabel'),
432
+ hasAlreadyPurchasedDomainCloseButtonLabel: tr('publishBrandPageModal.hasAlreadyPurchasedDomainCloseButtonLabel'),
433
+ publishedSuccessDescriptionLabel: tr('publishBrandPageModal.publishedSuccessDescriptionLabel'),
434
+ };
435
+ },
421
436
  data() {
422
437
  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
438
  DOMAIN_TYPES,
443
439
  domainTypeValue: this.radioValue,
444
440
  internalSlug: this.brandPageSlug,
@@ -453,6 +449,21 @@ export default {
453
449
  };
454
450
  },
455
451
  computed: {
452
+ firstTimePublishHeaderLabel() {
453
+ return this.tr('publishBrandPageModal.firstTimePublishHeaderLabel', {
454
+ brandPageDisplayName: this.brandPageDisplayName,
455
+ });
456
+ },
457
+ publishSuccessLabel() {
458
+ return this.tr('publishBrandPageModal.publishSuccessLabel', {
459
+ brandPageDisplayName: this.brandPageDisplayName,
460
+ });
461
+ },
462
+ viewMyWebsiteLabel() {
463
+ return this.tr('publishBrandPageModal.viewMyWebsiteLabel', {
464
+ brandPageDisplayName: this.brandPageDisplayName,
465
+ });
466
+ },
456
467
  allowPublish() {
457
468
  if (this.domainTypeValue === DOMAIN_TYPES.slug) {
458
469
  return this.internalSlug && !this.slugValidationError;
@@ -515,7 +526,7 @@ export default {
515
526
  this.$emit('on-hide-domain-modal');
516
527
  },
517
528
  onCopyUrlClick() {
518
- this.$emit('copy-url-click');
529
+ this.$emit('copy-url-clicked');
519
530
  },
520
531
  onSlugChanged(e) {
521
532
  this.searchText = e;
@@ -535,6 +546,7 @@ export default {
535
546
  },
536
547
  onSearchTextChanged(val) {
537
548
  this.searchText = val;
549
+ this.$emit('on-change-search', val);
538
550
  },
539
551
  onSelectPurchasedDomain(newVal) {
540
552
  this.selectedCustomDomain = newVal;
@@ -550,6 +562,9 @@ export default {
550
562
  onSellDomainNameListCloseModal() {
551
563
  this.$emit('on-hide-domain-modal');
552
564
  },
565
+ onBuyNowClick() {
566
+ this.$emit('on-buy-now-clicked');
567
+ },
553
568
  async searchDomainName(isUserTriggered) {
554
569
  this.isLoading = true;
555
570
  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
+ }