Skip to content

Commit

Permalink
Add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
tzhf committed Aug 19, 2024
1 parent b8bebd6 commit 686deef
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 22 deletions.
8 changes: 4 additions & 4 deletions woonuxt_base/app/components/shopElements/NoProductsFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ const clearAll = () => {
<div class="w-full my-16 lg:my-24">
<div class="flex flex-col items-center justify-center w-full text-center text-pretty">
<Icon name="ion:sad-outline" size="156" class="opacity-25 mb-10" />
<h2 class="text-2xl font-bold">No products found</h2>
<h2 class="text-2xl font-bold">{{ $t('messages.shop.noProductsFound.title') }}</h2>
<p class="mt-4 max-w-md">
<slot>Try adjusting your search or filter to find what you're looking for.</slot>
<slot>{{ $t('messages.shop.noProductsFound.subText') }}</slot>
</p>
<div>
<button
v-if="allProducts.length"
class="bg-primary rounded-lg font-bold mt-8 text-center text-white text-sm w-full p-2 px-3 inline-block hover:bg-primary-dark"
title="Clear all filters and search"
:title="$t('messages.shop.noProductsFound.clearFiltersAndSearch')"
aria-label="Clear all filters and search"
@click="clearAll">
Clear all
{{ $t('messages.shop.noProductsFound.clearFiltersAndSearch') }}
</button>
</div>
</div>
Expand Down
19 changes: 8 additions & 11 deletions woonuxt_base/app/components/shopElements/ProductResultCount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ const page = ref(parseInt(route.params.pageNumber as string) || 1);
</script>

<template>
<span class="text-sm font-light">
<span>Showing </span>
<span v-if="products.length === 0" class="font-normal">No products</span>
<template v-else>
<span class="font-normal"> {{ (page - 1) * productsPerPage + 1 }} </span>
<span> to </span>
<span class="font-normal">{{ Math.min(page * productsPerPage, products.length) }} </span>
<span> of </span>
<span class="font-normal"> {{ products.length }} </span>
</template>
</span>
<div class="text-sm font-light" v-if="products.length !== 0">
<span>{{ $t('messages.shop.productResultCount.showing') + ' ' }}</span>
<span class="font-normal">{{ (page - 1) * productsPerPage + 1 + ' ' }}</span>
<span>{{ $t('messages.shop.productResultCount.to') + ' ' }}</span>
<span class="font-normal">{{ Math.min(page * productsPerPage, products.length) + ' ' }}</span>
(<span>{{ $t('messages.shop.productResultCount.of') }}</span> <span class="font-normal">{{ products.length }}</span
>)
</div>
</template>
13 changes: 12 additions & 1 deletion woonuxt_base/app/locales/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"shop": {
"shopByCategory": "Kategorien",
"popularProducts": "Beliebte Produkte",
"availability": "Verfügbarkeit",
"inStock": "auf Lager",
"outOfStock": "ausverkauft",
Expand Down Expand Up @@ -122,7 +123,17 @@
"couponCode": "Gutscheincode",
"downloadsRemaining": "Verbleibende Downloads",
"expires": "Läuft ab",
"productNotFound": "Produkt nicht gefunden"
"productNotFound": "Produkt nicht gefunden",
"productResultCount": {
"showing": "Anzeige",
"to": "bis",
"of": "von"
},
"noProductsFound": {
"title": "Keine Produkte gefunden",
"subText": "Versuchen Sie, Ihre Suche oder Filter anzupassen, um das zu finden, was Sie suchen.",
"clearFiltersAndSearch": "Alle Filter und die Suche zurücksetzen"
}
},
"billing": {
"billing": "Rechnung",
Expand Down
13 changes: 12 additions & 1 deletion woonuxt_base/app/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"shop": {
"shopByCategory": "Shop by Category",
"popularProducts": "Popular Products",
"availability": "Availability",
"inStock": "In Stock",
"outOfStock": "Out of Stock",
Expand Down Expand Up @@ -122,7 +123,17 @@
"couponCode": "Coupon Code",
"downloadsRemaining": "Downloads remaining",
"expires": "Expires",
"productNotFound": "Product not found"
"productNotFound": "Product not found",
"productResultCount": {
"showing": "Showing",
"to": "to",
"of": "of"
},
"noProductsFound": {
"title": "No products found",
"subText": "Try adjusting your search or filter to find what you're looking for.",
"clearFiltersAndSearch": "Clear all filters and search"
}
},
"billing": {
"billing": "Billing",
Expand Down
13 changes: 12 additions & 1 deletion woonuxt_base/app/locales/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"shop": {
"shopByCategory": "Comprar por categoría",
"popularProducts": "Productos populares",
"availability": "Disponibilidad",
"inStock": "En stock",
"outOfStock": "Agotado",
Expand Down Expand Up @@ -122,7 +123,17 @@
"couponCode": "Código de cupón",
"downloadsRemaining": "Descargas restantes",
"expires": "Expira",
"productNotFound": "Producto no encontrado"
"productNotFound": "Producto no encontrado",
"productResultCount": {
"showing": "Mostrando de",
"to": "a",
"of": "de"
},
"noProductsFound": {
"title": "No se encontraron productos",
"subText": "Intente ajustar su búsqueda o filtro para encontrar lo que está buscando.",
"clearFiltersAndSearch": "Borrar todos los filtros y la búsqueda"
}
},
"billing": {
"billing": "Facturación",
Expand Down
13 changes: 12 additions & 1 deletion woonuxt_base/app/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"shop": {
"shopByCategory": "Acheter par catégorie",
"popularProducts": "Produits populaires",
"availability": "Disponibilité",
"inStock": "En stock",
"outOfStock": "Rupture de stock",
Expand Down Expand Up @@ -122,7 +123,17 @@
"couponCode": "Code du coupon de réduction",
"downloadsRemaining": "Téléchargements restants",
"expires": "Expire le",
"productNotFound": "Ce produit n'existe pas"
"productNotFound": "Ce produit n'existe pas",
"productResultCount": {
"showing": "Affichage de",
"to": "à",
"of": "sur"
},
"noProductsFound": {
"title": "Aucun produit trouvé",
"subText": "Essayez d'ajuster votre recherche ou vos filtres pour trouver ce que vous cherchez.",
"clearFiltersAndSearch": "Effacer tous les filtres et la recherche"
}
},
"billing": {
"billing": "Facturation",
Expand Down
13 changes: 12 additions & 1 deletion woonuxt_base/app/locales/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"shop": {
"shopByCategory": "Acquista per categoria",
"popularProducts": "Prodotti popolari",
"availability": "Disponibilità",
"inStock": "Disponibile",
"outOfStock": "Non disponibile",
Expand Down Expand Up @@ -122,7 +123,17 @@
"couponCode": "Codice coupon",
"downloadsRemaining": "Download rimanenti",
"expires": "Scade",
"productNotFound": "Prodotto non trovato"
"productNotFound": "Prodotto non trovato",
"productResultCount": {
"showing": "Visualizzazione di",
"to": "-",
"of": "di"
},
"noProductsFound": {
"title": "Nessun prodotto trovato",
"subText": "Prova ad aggiustare la tua ricerca o i filtri per trovare quello che stai cercando.",
"clearFiltersAndSearch": "Cancella tutti i filtri e la ricerca"
}
},
"billing": {
"billing": "Fatturazione",
Expand Down
13 changes: 12 additions & 1 deletion woonuxt_base/app/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"shop": {
"shopByCategory": "Comprar por Categoria",
"popularProducts": "Produtos Populares",
"availability": "Disponibilidade",
"inStock": "Em Estoque",
"outOfStock": "Fora de Estoque",
Expand Down Expand Up @@ -122,7 +123,17 @@
"couponCode": "Código do Cupom",
"downloadsRemaining": "Downloads restantes",
"expires": "Expira",
"productNotFound": "Produto não encontrado"
"productNotFound": "Produto não encontrado",
"productResultCount": {
"showing": "Mostrando de",
"to": "a",
"of": "de"
},
"noProductsFound": {
"title": "Nenhum produto encontrado",
"subText": "Tente ajustar sua pesquisa ou filtro para encontrar o que você está procurando.",
"clearFiltersAndSearch": "Limpar todos os filtros e a pesquisa"
}
},
"billing": {
"billing": "Cobrança",
Expand Down
2 changes: 1 addition & 1 deletion woonuxt_base/app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ useSeoMeta({

<section class="container my-16" v-if="popularProducts">
<div class="flex items-end justify-between">
<h2 class="text-lg font-semibold md:text-2xl">Popular Products</h2>
<h2 class="text-lg font-semibold md:text-2xl">{{ $t('messages.shop.popularProducts') }}</h2>
<NuxtLink class="text-primary" to="/products">{{ $t('messages.general.viewAll') }}</NuxtLink>
</div>
<ProductRow :products="popularProducts" class="grid-cols-2 md:grid-cols-4 lg:grid-cols-5 mt-8" />
Expand Down

0 comments on commit 686deef

Please sign in to comment.