@designcrowd/fe-shared-lib 1.2.0-tr-9 → 1.2.0-tr-10

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 (18) hide show
  1. package/package.json +1 -1
  2. package/src/atoms/components/Icon/Icon.vue +3 -3
  3. package/src/bundleTranslation.js +2 -2
  4. package/src/bundles/bundled-translations.json +1 -1
  5. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +6 -3
  6. package/src/experiences/components/SellDomainNameList/SellDomainNameList.vue +1 -0
  7. package/src/experiences/components/SellDomainNameSearchResult/SellDomainNameListSearchResult.vue +4 -0
  8. package/src/experiences/components/SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue +4 -0
  9. package/src/useSharedLibTranslate.js +4 -13
  10. /package/src/bundles/{bundled-translations_de-DE.json → bundled-translations.de-DE.json} +0 -0
  11. /package/src/bundles/{bundled-translations_es-ES.json → bundled-translations.es-ES.json} +0 -0
  12. /package/src/bundles/{bundled-translations_fr-FR.json → bundled-translations.fr-FR.json} +0 -0
  13. /package/src/bundles/{bundled-translations_pt-PT.json → bundled-translations.pt-PT.json} +0 -0
  14. /package/src/experiences/components/PublishBrandPageModal/i18n/{publish-translation_de-DE.json → publish-modal.de-DE.json} +0 -0
  15. /package/src/experiences/components/PublishBrandPageModal/i18n/{publish-translation_es-ES.json → publish-modal.es-ES.json} +0 -0
  16. /package/src/experiences/components/PublishBrandPageModal/i18n/{publish-translation_fr-FR.json → publish-modal.fr-FR.json} +0 -0
  17. /package/src/experiences/components/PublishBrandPageModal/i18n/{publish-translation.json → publish-modal.json} +0 -0
  18. /package/src/experiences/components/PublishBrandPageModal/i18n/{publish-translation_pt-PT.json → publish-modal.pt-PT.json} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.0-tr-9",
3
+ "version": "1.2.0-tr-10",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -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`;
@@ -1,7 +1,7 @@
1
1
  const path = require('path');
2
2
  const fs = require('fs');
3
3
 
4
- const localeSuffixes = ['_de-DE', '_fr-FR', '_es-ES', '_pt-PT', ''];
4
+ const localeSuffixes = ['.de-DE', '.fr-FR', '.es-ES', '.pt-PT', ''];
5
5
 
6
6
  const findTranslationFiles = (dir, localeString) => {
7
7
  const files = [];
@@ -15,7 +15,7 @@ const findTranslationFiles = (dir, localeString) => {
15
15
  files.push(
16
16
  ...fs
17
17
  .readdirSync(fullPath)
18
- .filter((file) => file.endsWith(`translation${localeString}.json`))
18
+ .filter((file) => file.endsWith(`${localeString}.json`))
19
19
  .map((file) => path.join(fullPath, file)),
20
20
  );
21
21
  } else {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "publishModal": {
3
- "test": "EN-Publish Brand Page"
3
+ "test": "PT-Publish Brand Page"
4
4
  }
5
5
  }
@@ -196,6 +196,7 @@
196
196
  :display-result-limit="4"
197
197
  :domain-search-location="sitePublishedModal"
198
198
  @on-change-search="onSearchTextChanged"
199
+ @on-buy-now-click="onBuyNowClick"
199
200
  />
200
201
  </div>
201
202
  <Button
@@ -493,15 +494,13 @@ export default {
493
494
  this.$emit('radio-button-changed', domain);
494
495
  },
495
496
  onCloseModal() {
496
- console.log(this.testMessage);
497
-
498
497
  console.log('closing the modal with', this.tr('publishModal.test'));
499
498
 
500
499
  this.$emit('close-modal');
501
500
  this.$emit('on-hide-domain-modal');
502
501
  },
503
502
  onCopyUrlClick() {
504
- this.$emit('copy-url-click');
503
+ this.$emit('copy-url-clicked');
505
504
  },
506
505
  onSlugChanged(e) {
507
506
  this.searchText = e;
@@ -521,6 +520,7 @@ export default {
521
520
  },
522
521
  onSearchTextChanged(val) {
523
522
  this.searchText = val;
523
+ this.$emit('on-change-search', val);
524
524
  },
525
525
  onSelectPurchasedDomain(newVal) {
526
526
  this.selectedCustomDomain = newVal;
@@ -536,6 +536,9 @@ export default {
536
536
  onSellDomainNameListCloseModal() {
537
537
  this.$emit('on-hide-domain-modal');
538
538
  },
539
+ onBuyNowClick() {
540
+ this.$emit('on-buy-now-clicked');
541
+ },
539
542
  async searchDomainName(isUserTriggered) {
540
543
  this.isLoading = true;
541
544
  let searchSlug = '';
@@ -114,6 +114,7 @@ export default {
114
114
  if (typeof this.domainSearchLocation !== 'undefined') {
115
115
  request.domainSearchLocation = this.domainSearchLocation;
116
116
  }
117
+ this.$emit('on-buy-now-click');
117
118
  window.dispatchEvent(
118
119
  new CustomEvent(Events.DomainSelectedEvent, {
119
120
  detail: request,
@@ -25,6 +25,7 @@
25
25
  :load-more-domains-button-text="loadMoreDomainsButtonText"
26
26
  :domain-search-location="domainSearchLocation"
27
27
  @load-more-domains="onLoadMoreDomains"
28
+ @on-buy-now-click="onBuyNowClick"
28
29
  />
29
30
  <div v-else-if="shouldShowDomainNameNotFound" class="tw-flex tw-justify-center tw-text-center">
30
31
  Sorry, we couldn't find any domain for "{{ previousSearchText }}".
@@ -145,6 +146,9 @@ export default {
145
146
  window.dispatchEvent(new CustomEvent(Events.DomainLoadMoreEvent));
146
147
  this.domainNameItemsInView += this.domainNameItemsPerPage;
147
148
  },
149
+ onBuyNowClick() {
150
+ this.$emit('on-buy-now-click');
151
+ },
148
152
  resetDomainNameItemsInView() {
149
153
  this.domainNameItemsInView = this.domainNameItemsPerPage;
150
154
  },
@@ -20,6 +20,7 @@
20
20
  :domain-name-items-per-page="domainNameItemsPerPage"
21
21
  :load-more-domains-button-text="loadMoreDomainsButtonText"
22
22
  :domain-search-location="domainSearchLocation"
23
+ @on-buy-now-click="onBuyNowClick"
23
24
  />
24
25
  </div>
25
26
  </template>
@@ -170,6 +171,9 @@ export default {
170
171
  this.isBusy = false;
171
172
  }
172
173
  },
174
+ onBuyNowClick() {
175
+ this.$emit('on-buy-now-click');
176
+ },
173
177
  cleanText(inputText) {
174
178
  // In this function, we use the Unicode property escapes \p{L} and \p{N} to match any Unicode letters (characters from various scripts) and Unicode numbers, respectively.
175
179
  const cleanedText = inputText.replace(/[^\p{L}\p{N}\-.]+/gu, '');
@@ -5,10 +5,10 @@ const fallbackLocale = 'en-US';
5
5
 
6
6
  const relativePathsToTranslationFiles = {
7
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'),
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
12
  };
13
13
 
14
14
  const setLocaleAsync = async (locale = 'en-US') => {
@@ -24,21 +24,12 @@ const setLocaleAsync = async (locale = 'en-US') => {
24
24
 
25
25
  const languageFile = (await relativePathsToTranslationFiles[localeToUse]()).default;
26
26
 
27
- console.log('initialising language file for feshared');
28
-
29
- console.log(languageFile);
30
27
  await i18next.addResourceBundle(localeToUse, 'fe-shared-lib', {
31
28
  ...languageFile,
32
29
  });
33
-
34
- console.log('finished initialising language file for feshared');
35
30
  };
36
31
 
37
32
  const tr = (key, valuesToInterpolate = {}) => {
38
- const languages = i18next.getDataByLanguage('en-US');
39
-
40
- console.log('languages in the fesharedlib', languages);
41
-
42
33
  const translated = i18next.t(key, { ns: 'fe-shared-lib', ...valuesToInterpolate });
43
34
 
44
35
  return translated;