added translation for product page
This commit is contained in:
@@ -25,6 +25,8 @@
|
|||||||
"outOfStock": "Ausverkauft",
|
"outOfStock": "Ausverkauft",
|
||||||
"pageDoesNotExist": "Ups! Diese Seite existiert nicht.",
|
"pageDoesNotExist": "Ups! Diese Seite existiert nicht.",
|
||||||
"phone": "Telefon",
|
"phone": "Telefon",
|
||||||
|
"productDoesNotExist": "Dieses Produkt existiert nicht oder wurde bereits gelöscht.",
|
||||||
|
"productNotFound": "Produkt nicht gefunden!",
|
||||||
"quantity": "Anzahl",
|
"quantity": "Anzahl",
|
||||||
"rateThisProduct": "Dieses Produkt bewerten",
|
"rateThisProduct": "Dieses Produkt bewerten",
|
||||||
"ratingFrom": "Bewertung vom",
|
"ratingFrom": "Bewertung vom",
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
"outOfStock": "Out of stock",
|
"outOfStock": "Out of stock",
|
||||||
"pageDoesNotExist": "Oops! The page you're looking for doesn't exist.",
|
"pageDoesNotExist": "Oops! The page you're looking for doesn't exist.",
|
||||||
"phone": "Phone number",
|
"phone": "Phone number",
|
||||||
|
"productDoesNotExist": "It seems you are locking for a product that doesn't exist or has been removed.",
|
||||||
|
"productNotFound": "Product not found!",
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
"rateThisProduct": "Rate this product",
|
"rateThisProduct": "Rate this product",
|
||||||
"ratingFrom": "Rating from",
|
"ratingFrom": "Rating from",
|
||||||
|
|||||||
@@ -9,9 +9,12 @@ import { useLocation, useNavigate } from 'react-router-dom';
|
|||||||
import Item from '../components/Item';
|
import Item from '../components/Item';
|
||||||
import ProductInfo from '../helper/productpage/ProductInfo';
|
import ProductInfo from '../helper/productpage/ProductInfo';
|
||||||
import Ratings from '../helper/productpage/Ratings';
|
import Ratings from '../helper/productpage/Ratings';
|
||||||
|
import {useTranslation} from "react-i18next";
|
||||||
|
|
||||||
|
|
||||||
export default function Product() {
|
export default function Product() {
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const item = location.state?.item as Item;
|
const item = location.state?.item as Item;
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -25,10 +28,10 @@ export default function Product() {
|
|||||||
return (
|
return (
|
||||||
<Box className="no-page-container">
|
<Box className="no-page-container">
|
||||||
<Typography variant="h1" className="no-page-title">
|
<Typography variant="h1" className="no-page-title">
|
||||||
Product not found
|
{t('productNotFound')}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="h5" className="no-page-description">
|
<Typography variant="h5" className="no-page-description">
|
||||||
It seems you are locking for a product that doesn't exist or has been removed.
|
{t('productDoesNotExist')}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -37,7 +40,7 @@ export default function Product() {
|
|||||||
className="no-page-button"
|
className="no-page-button"
|
||||||
onClick={handleGoHome}
|
onClick={handleGoHome}
|
||||||
>
|
>
|
||||||
Go Back to Home
|
{t('backToHome')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user