Skip to content

Commit

Permalink
Merge pull request #94 from PrestaShopCorp/fix/segment
Browse files Browse the repository at this point in the history
do not create segment if already exist + remove unused trads
  • Loading branch information
atourneriePresta authored Jul 27, 2021
2 parents 0bf842f + af43121 commit 3d5291f
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 62 deletions.
19 changes: 13 additions & 6 deletions src/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ const install = function(vue, opts = {}) {
Object.keys(Components).forEach((name) => {
vue.component(name, Components[name]);
});
if (!window?.analytics) {
vue.use(Segment, {
id: contextPsAccounts.segmentApiKey,
pageCategory: "ps_accounts-ui"
});
}
};

Vue.use(Segment, {
id: contextPsAccounts.segmentApiKey,
pageCategory: "ps_accounts-ui"
})

const Components = {
PsAccounts,
Account,
Expand All @@ -35,11 +36,17 @@ const Components = {
};

if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
install(window.Vue, { locale: window.iso_user || 'en' });
} else {
Object.keys(Components).forEach((name) => {
Vue.component(name, Components[name]);
});
if (!window?.analytics) {
Vue.use(Segment, {
id: contextPsAccounts.segmentApiKey,
pageCategory: "ps_accounts-ui"
});
}
}

export default {
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Installation des Moduls Prestashop Event Bus in Arbeit...",
"installButton": "Installationsprogramm"
},
"multiShopSelector": {
"title": "Modus Multi-Boutiquen aktiviert",
"subtitle": "Für diesen Dienst müssen Sie Ihre Filialen einzeln konfigurieren, können jedoch dasselbe Konto verwenden.",
"selectStore": "Bitte wählen Sie eine Premierenboutique zum Anspruch an der unten stehenden Liste",
"tips": "In der ersten konfigurierten Boutique können Sie sich bei der Auswahl der weiteren Boutiquen ebenso wie bei der Auswahl der Boutiquen mit horizontaler Menüführung an die weiteren Boutiquen wenden.",
"configure": "Konfigurator"
},
"account": {
"title": "Verknüpfen Sie Ihren Shop mit einem PrestaShop-Konto",
"authorize": "Sie können Ihren Shop nur mit einem Konto verknüpfen. Wählen Sie das richtige Konto!",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"installButton": "Install",
"loading": "The Prestashop Event Bus module is currently being installed..."
},
"multiShopSelector": {
"title": "Multi-store mode activated",
"subtitle": "You must configure your stores one by one for this service but you will be able to use the same account.",
"selectStore": "Please select the first store to configure from the list below",
"tips": "After you are done with the first shop, you can configure the others by selecting them one by one in the shop selector, in the horizontal menu",
"configure": "Configure"
},
"account": {
"title": "Associate your shop with a PrestaShop account",
"authorize": "You can only associate your shop with one account. So be sure to choose the right one!",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Instalación del módulo Prestashop Event Bus en curso...",
"installButton": "Instalar"
},
"multiShopSelector": {
"title": "Modo multitienda activado",
"subtitle": "Para este servicio, necesitas configurar tus tiendas una por una, pero podrás usar la misma cuenta.",
"selectStore": "Selecciona una tienda de la siguiente lista",
"tips": "Una vez configurada la primera tienda, puedes continuar con las demás seleccionándolas una a una en el selector de tiendas del menú horizontal.",
"configure": "Configurar"
},
"account": {
"title": "Vincula tu tienda a una cuenta PrestaShop",
"authorize": "Solo puedes vincular tu tienda a una cuenta. ¡Elígela bien!",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Installation du module Prestashop Event Bus en cours...",
"installButton": "Installer"
},
"multiShopSelector": {
"title": "Mode multi-boutiques activé",
"subtitle": "Pour ce service, vous devez configurer vos boutiques une par une, mais vous pourrez utiliser le même compte.",
"selectStore": "Merci de sélectionner une première boutique à partir de la liste ci-dessous",
"tips": "Une fois la première boutique configurée, vous pouvez poursuivre avec les autres en les sélectionnant une par une dans le sélecteur de boutiques du menu horizontal.",
"configure": "Configurer"
},
"account": {
"title": "Associez votre boutique à un compte PrestaShop",
"authorize": "Vous ne pouvez associer votre boutique qu'à un seul compte. Choisissez le bien !",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Installazione del modulo Prestashop Event Bus in corso...",
"installButton": "Installare"
},
"multiShopSelector": {
"title": "Modalità multi-negozio attiva",
"subtitle": "Per usufruirne, dovrai configurare i tuoi negozi uno alla volta, tuttavia, potrai farlo usando lo stesso account.",
"selectStore": "Seleziona il primo negozio nella lista qui sotto",
"tips": "Una volta configurato il primo negozio, potrai continuare con gli altri, selezionandoli uno per volta tramite il selettore del menu orizzontale.",
"configure": "Configura"
},
"account": {
"title": "Associa il tuo negozio a un account PrestaShop",
"authorize": "Puoi associare il tuo negozio a un solo account. Sceglilo con cura!",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Installatie van de module Prestashop Event Bus aan de gang...",
"installButton": "Installeer"
},
"multiShopSelector": {
"title": "Multi-shop modus geactiveerd",
"subtitle": "Voor deze dienst moet u uw winkels één voor één configureren, maar u kunt wel hetzelfde account gebruiken.",
"selectStore": "Selecteer alstublieft een eerste winkel uit onderstaande lijst",
"tips": "Zodra de eerste winkel is geconfigureerd, kunt u verder gaan met de andere winkels door ze één voor één te selecteren in de winkelselector van het horizontale menu.",
"configure": "Configureren"
},
"account": {
"title": "Koppel uw winkel aan een PrestaShop account",
"authorize": "U kunt uw winkel maar aan één account koppelen. Kies het goed!",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Aktywacja modułu Prestashop Event Bus w toku...",
"installButton": "Zainstaluj"
},
"multiShopSelector": {
"title": "Włączony tryb Multi-shop",
"subtitle": "Choć dla tej usługi należy skonfigurować swoje sklepy jeden po drugim, będzie można korzystać z tego samego konta.",
"selectStore": "Wybierz pierwszy sklep z poniższej listy",
"tips": "Po skonfigurowaniu pierwszego sklepu można kontynuować pracę z pozostałymi, wybierając je jeden po drugim w selektorze sklepów w menu poziomym.",
"configure": "Konfiguruj"
},
"account": {
"title": "Połącz swój sklep z kontem PrestaShop",
"authorize": "Możesz powiązać swój sklep tylko z jednym kontem. Dokonaj dobrego wyboru!",
Expand Down
7 changes: 0 additions & 7 deletions src/locale/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"loading": "Instalação do módulo Prestashop Event Bus em curso...",
"installButton": "Instalar"
},
"multiShopSelector": {
"title": "Modo multi-loja ativado",
"subtitle": "Para este serviço, é necessário configurar as suas lojas uma a uma, mas pode usar a mesma conta.",
"selectStore": "Selecione uma primeira loja da lista abaixo",
"tips": "Uma vez configurada a primeira loja, pode continuar com as outras selecionando-as uma a uma no seletor de lojas do menu horizontal.",
"configure": "Configurar"
},
"account": {
"title": "Associe a sua loja a uma conta PrestaShop",
"authorize": "Apenas pode associar a sua loja a uma conta. Escolha bem!",
Expand Down

0 comments on commit 3d5291f

Please sign in to comment.