Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[i18n] fix traduction internationalization i18n + add fr #313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/presentation/fashion/Banner/Banner.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { VueperSlides, VueperSlide } from 'vueperslides';
import 'vueperslides/dist/vueperslides.css';
import { useI18n } from 'vue-i18n';
import localMessages from './Banner.json'

export default {
setup() {
const { t } = useI18n({
inheritLocale: true,
useScope: 'local',
messages: localMessages
});
return {
t,
Expand Down
23 changes: 23 additions & 0 deletions src/presentation/fashion/Banner/Banner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"en": {
"midSeasonSale": "MID-SEASON SALE",
"up50": "UP TO 50%",
"shopNow": "SHOP NOW",
"checkout": "CHECK OUT",
"newCollection": "NEW COLLECTION"
},
"fr": {
"midSeasonSale": "PROMO MI-SAISON",
"up50": "JUSQU'A 50%",
"shopNow": "ACHETE MAINTENANT",
"checkout": "PANIER",
"newCollection": "NOUVELLE COLLECTION"
},
"de": {
"midSeasonSale": "SOMMERSCHLUSSVERKAUF",
"up50": "BIS ZU 50%",
"shopNow": "JETZT SHOPPEN",
"checkout": "checkout",
"newCollection": "NEUE KOLLEKTION"
}
}
12 changes: 0 additions & 12 deletions src/presentation/fashion/Banner/Banner.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/presentation/fashion/Banner/Banner.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script src="./Banner.js" />
<style src="./Banner.scss" lang="scss"></style>
<i18n src="./Banner.txt" lang="yaml"></i18n>

<template>
<transition name="slide-fade" appear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import BaseInput from 'presentation/components/BaseInput/BaseInput.vue';
import { useI18n } from 'vue-i18n';
import useCartTools from 'hooks/useCartTools';
import useDiscountCode from 'hooks/useDiscountCode';
import localMessages from './AddDiscountCodeForm.json'

export default {
components: {
Expand All @@ -13,7 +14,7 @@ export default {
ServerError,
},
setup() {
const { t } = useI18n();
const { t } = useI18n({messages: localMessages});
const { applyDiscount: ad } = useCartTools();
const { form, v } = useDiscountCode();
const applyDiscount = () => ad(form.value.code);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"en": {
"code": "Discount code",
"apply": "Apply",
"nonApplicable": "This discount code is non applicable"
},
"fr": {
"code": "Code Promo",
"apply": "Appliquer",
"nonApplicable": "Ce code n'est pas applicable"
},
"de": {
"code": "Rabattcode",
"apply": "Anwenden",
"nonApplicable": "Dieser Rabattcode ist nicht anwendbar"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<style src="./AddDiscountCodeForm.scss" lang="scss"></style>
<i18n src="./AddDiscountCodeForm.txt" lang="yaml"></i18n>
<script src="./AddDiscountCodeForm.js"></script>

<template>
Expand Down
3 changes: 2 additions & 1 deletion src/presentation/fashion/CartDetail/CartDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import AddDiscountCodeForm from './AddDiscountCodeForm/AddDiscountCodeForm.vue';
import CartLikePriceDetail from './CartLikePriceDetail/CartLikePriceDetail.vue';
import useCartTools from 'hooks/useCartTools';
import useCart from 'hooks/useCart';
import localMessages from './CartDetail.json'

// import AddDiscountCodeForm from '../AddDiscountCodeForm/AddDiscountCodeForm.vue';
export default {
Expand All @@ -16,7 +17,7 @@ export default {
CartLikePriceDetail,
},
setup() {
const { t } = useI18n();
const { t } = useI18n({messages: localMessages});
const { cart, loading, error } = useCart();
return {
t,
Expand Down
26 changes: 26 additions & 0 deletions src/presentation/fashion/CartDetail/CartDetail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"en": {
"yourCart": "Your Cart",
"itemsTotal": "{n} item in total | {n} items in total",
"empty": "Your cart is currently empty",
"continueShopping": "Continue Shopping",
"shopNow": "Shop now",
"startCheckout": "Start Checkout"
},
"fr": {
"yourCart": "Votre panier",
"itemsTotal": "{n} objet au total | {n} objets au total",
"empty": "Votre panier est vide",
"continueShopping": "Condinuer mes achats",
"shopNow": "Acheter maintenant",
"startCheckout": "Démarrer l'achat"
},
"de": {
"yourCart": "Ihr Warenkorb",
"itemsTotal": "{n} Artikel im Warenkorb",
"empty": "Ihr Warenkorb ist derzeit leer",
"continueShopping": "Weiter einkaufen",
"shopNow": "Jetzt einkaufen",
"startCheckout": "Zur Kasse"
}
}
14 changes: 0 additions & 14 deletions src/presentation/fashion/CartDetail/CartDetail.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/presentation/fashion/CartDetail/CartDetail.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<style src="./CartDetail.scss" lang="scss"></style>
<i18n src="./CartDetail.txt" lang="yaml"></i18n>
<script src="./CartDetail.js"></script>

<template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useI18n } from 'vue-i18n';
import LineItemInfo from './LineItemInfo/LineItemInfo.vue';
import { shallowRef } from 'vue';
import localMessages from './CartLikeContentDetail.json'
export default {
components: {
LineItemInfo,
Expand All @@ -24,7 +25,7 @@ export default {
},
},
setup(_, { emit }) {
const { t } = useI18n();
const { t } = useI18n({messages: localMessages});
const selectedReturnItems = shallowRef([]);
const selectReturnItem = (item) => {
selectedReturnItems.value = selectedReturnItems.value
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"en": {
"description": "Description",
"quantity": "Quantity",
"price": "Price",
"total": "Total",
"returnStatus": "Status"
},
"fr": {
"description": "Description",
"quantity": "Quantité",
"price": "Prix",
"total": "Total",
"returnStatus": "Statut"
},
"de": {
"description": "Beschreibung",
"quantity": "Menge",
"price": "Preis",
"total": "Gesamtpreis",
"returnStatus": "Status"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
src="./CartLikeContentDetail.scss"
lang="scss"
></style>
<i18n src="./CartLikeContentDetail.txt" lang="yaml"></i18n>
<script src="./CartLikeContentDetail.js"></script>

<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import DiscountTag from 'presentation/components/DiscountTag/DiscountTag.vue';

import Remove from 'presentation/components/LineItemQuantityForm/Remove/Remove.vue';
import useCartTools from 'hooks/useCartTools';
import localMessages from './LineItemInfo.json'
import { useI18n } from 'vue-i18n';
export default {
components: {
LineItemQuantityForm,
Expand Down Expand Up @@ -70,11 +72,13 @@ export default {
emit('unselect-return-item', item.value);
}
});
const { t } = useI18n({messages: localMessages});
return {
selected,
item,
quantity,
...useCartTools(),
t,
};
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"en": {
"available": "Available"
},
"fr": {
"available": "Disponible"
},
"de": {
"available": "Verfügbar"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<style src="./LineItemInfo.scss" lang="scss"></style>
<script src="./LineItemInfo.js"></script>
<i18n src="./LineItemInfo.txt" lang="yaml"></i18n>

<template>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useI18n } from 'vue-i18n';
import BasePrice from 'presentation/components/BasePrice/BasePrice.vue';
import DiscountCodes from './DiscountCodes/DiscountCodes.vue';
import useCartTools from 'hooks/useCartTools';
import localMessages from './CartLikePriceDetail.json'

export default {
components: {
Expand All @@ -19,7 +20,7 @@ export default {
},
},
setup() {
const { t } = useI18n();
const { t } = useI18n({messages: localMessages});
return { t, ...useCartTools() };
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"en": {
"cartTotals": "Cart totals",
"subtotal": "Subtotal",
"shipping": "Shipping",
"salesTax": "Sales Tax",
"total": "Total",
"discount": "Discount",
"checkout": "Checkout"
},
"fr": {
"cartTotals": "Total Panier",
"subtotal": "Sous-total",
"shipping": "Expedition",
"salesTax": "Taxes",
"total": "Total",
"discount": "Réduction",
"checkout": "Panier"
},
"de": {
"cartTotals": "Warenkorbsummen",
"subtotal": "Zwischensumme",
"shipping": "Versand",
"salesTax": "MwSt.",
"total": "Gesamtpreis",
"discount": "Rabatt",
"checkout": "Zur Kasse"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<style src="./style.css" scoped></style>
<i18n src="./CartLikePriceDetail.txt" lang="yaml"></i18n>
<script src="./CartLikePriceDetail.js"></script>
<template>
<div v-if="cart" class="grand-total-wrap">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useI18n } from 'vue-i18n';
import RemoveDiscountCodeForm from './RemoveDiscountCodeForm/RemoveDiscountCodeForm.vue';
import localMessages from './DiscountCodes.json'

export default {
components: { RemoveDiscountCodeForm },
Expand All @@ -14,7 +15,7 @@ export default {
},
},
setup() {
const { t } = useI18n();
const { t } = useI18n({messages: localMessages});
return { t };
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"en": {
"appliedDiscounts": "Applied discounts"
},
"fr": {
"appliedDiscounts": "Promotions appliquées"
},
"de": {
"appliedDiscounts": "Angewandte Rabatte"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<style src="./style.css" scoped></style>
<i18n src="./DiscountCodes.txt" lang="yaml"></i18n>
<script src="./DiscountCodes.js"></script>

<template>
Expand Down
Loading