多语言词条

This commit is contained in:
sl 2022-08-19 18:03:39 +08:00
parent e1d01356b0
commit 6053e67915
8 changed files with 33 additions and 21 deletions

View File

@ -26,6 +26,7 @@ return [
'no' => '否',
'yes' => '是',
'delete' => '删除',
'sign_out' => '退出登录',
];

View File

@ -38,14 +38,14 @@ return [
],
'wishlist' => [
'index' => '收藏列表',
'index' => '我的收藏',
'product' => '产品',
'price' => '价格',
'check_details' => '查看详情',
],
'order' => [
'index' => '订单列表',
'index' => '我的订单',
'completed' => '已确认收货',
'order_details' => '订单详情',
'amount' => '金额',

View File

@ -11,4 +11,11 @@
return [
'search' => '搜索',
'add_to_favorites' => '加入收藏夹',
'add_to_cart' => '加入购物车',
'buy_now' => '立即购买',
'product_details' => '商品详情',
'in_stock' => '有货',
'out_stock' => '缺货',
'model' => '型号',
];

View File

@ -14,7 +14,7 @@
<div class="price">{{ $cart['price_format'] }} <span class="text-muted">x {{ $cart['quantity'] }}<span>
</div>
<span class="offcanvas-products-delete" data-id="{{ $cart['cart_id'] }}"><i class="bi bi-x-lg"></i>
{{ __('shop/carts.delete') }}</span>
{{ __('common.delete') }}</span>
</div>
</div>
</div>

View File

@ -12,21 +12,21 @@
<span>{{ __('shop/account.index') }}</span></a>
<a class="list-group-item d-flex justify-content-between align-items-center {{ equal_route('shop.account.edit.index') ? 'active' : '' }}"
href="{{ shop_route('account.edit.index') }}">
<span>修改个人信息</span></a>
<span>{{ __('shop/account.edit.index') }}</span></a>
<a class="list-group-item d-flex justify-content-between align-items-center {{ equal_route('shop.account.order.index') || equal_route('shop.account.order.show') ? 'active' : '' }}"
href="{{ shop_route('account.order.index') }}">
<span>我的订单</span></a>
<span>{{ __('shop/account.order.index') }}</span></a>
<a class="list-group-item d-flex justify-content-between align-items-center {{ equal_route('shop.account.addresses.index') ? 'active' : '' }}"
href="{{ shop_route('account.addresses.index') }}">
<span>我的地址</span></a>
<span>{{ __('shop/account.addresses.index') }}</span></a>
<a class="list-group-item d-flex justify-content-between align-items-center {{ equal_route('shop.account.wishlist.index') ? 'active' : '' }}"
href="{{ shop_route('account.wishlist.index') }}">
<span>我的收藏</span></a>
<span>{{ __('shop/account.wishlist.index') }}</span></a>
<a class="list-group-item d-flex justify-content-between align-items-center {{ equal_route('shop.account.rma.index') || equal_route('shop.account.rma.show') ? 'active' : '' }}"
href="{{ shop_route('account.rma.index') }}">
<span>我的售后</span></a>
<span>{{ __('shop/account.rma.index') }}</span></a>
<a class="list-group-item d-flex justify-content-between align-items-center" href="{{ shop_route('logout') }}">
<span>退出登录</span></a>
<span>{{ __('common.sign_out') }}</span></a>
</nav>
</div>
</div>

View File

@ -44,9 +44,13 @@
<div class="peoduct-info">
<h1 class="mb-4">{{ $product['name'] }}</h1>
<div class="stock-and-sku mb-4">
<span :class="product.quantity > 0 ? 'text-success' : 'text-secondary'">@{{ product.quantity > 0 ? 'In Stock' : 'Out Stock' }}</span>
<span :class="product.quantity > 0 ? 'text-success' : 'text-secondary'">
{{-- @{{ product.quantity > 0 ? 'In Stock' : 'Out Stock' }} --}}
<template v-if="product.quantity > 0">{{ __('shop/products.in_stock') }}</template>
<template v-else>{{ __('shop/products.out_stock') }}</template>
</span>
<span class="ms-3 text-muted">SKU: @{{ product.sku }}</span>
<span class="ms-3 text-muted">MODEL: @{{ product.model }}</span>
<span class="ms-3 text-muted">{{ __('shop/products.model') }}: @{{ product.model }}</span>
</div>
@if (0)
<div class="rating-wrap d-flex">
@ -90,18 +94,18 @@
class="btn btn-outline-dark ms-3 add-cart"
:disabled="!product.quantity"
@click="addCart(false, this)"
><i class="bi bi-cart-fill me-1"></i>加入购物车
><i class="bi bi-cart-fill me-1"></i>{{ __('shop/products.add_to_cart') }}
</button>
<button
class="btn btn-dark ms-3"
:disabled="!product.quantity"
@click="addCart(true, this)"
><i class="bi bi-bag-fill me-1"></i>立即购买
><i class="bi bi-bag-fill me-1"></i>{{ __('shop/products.buy_now') }}
</button>
</div>
<div class="add-wishlist">
<button class="btn btn-link ps-0 text-dark" data-in-wishlist="{{ $product['in_wishlist'] }}" onclick="bk.addWishlist('{{ $product['id'] }}', this)">
<i class="bi bi-heart{{ $product['in_wishlist'] ? '-fill' : '' }} me-1"></i> 加入收藏夹
<i class="bi bi-heart{{ $product['in_wishlist'] ? '-fill' : '' }} me-1"></i> {{ __('shop/products.add_to_favorites') }}
</button>
</div>
</div>
@ -111,7 +115,7 @@
<div class="product-description">
<div class="nav nav-tabs nav-overflow justify-content-start justify-content-md-center border-bottom">
<a class="nav-link fw-bold active" data-bs-toggle="tab" href="#product-description">
商品详情
{{ __('shop/products.product_details') }}
</a>
</div>
<div class="tab-content">

View File

@ -13,7 +13,7 @@
class="btn btn-dark text-light mx-1 rounded-3"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="加入收藏"
title="{{ __('shop/products.add_to_favorites') }}"
data-in-wishlist="{{ $product['in_wishlist'] }}"
onclick="bk.addWishlist('{{ $product['id'] }}', this)">
<i class="bi bi-heart{{ $product['in_wishlist'] ? '-fill' : '' }}"></i>
@ -22,7 +22,7 @@
class="btn btn-dark text-light mx-1 rounded-3"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="加入购物车"
title="{{ __('shop/products.add_to_cart') }}"
onclick="bk.addCart({sku_id: '{{ $product['sku_id'] }}'}, this)">
<i class="bi bi-cart"></i>
</button>

View File

@ -1,18 +1,18 @@
<div class="steps-wrap">
<div class="{{ $steps == 1 || $steps == 2 || $steps == 3 || $steps == 4 ? 'active':'' }}">
<div class="number-wrap"><span class="number">1</span></div>
<span class="title">购物车</span>
<span class="title">{{ __('shop/steps.cart') }}</span>
</div>
<div class="{{ $steps == 2 || $steps == 3 || $steps == 4 ? 'active':'' }}">
<div class="number-wrap"><span class="number">2</span></div>
<span class="title">结账</span>
<span class="title">{{ __('shop/steps.checkout') }}</span>
</div>
<div class="{{ $steps == 3 || $steps == 4 ? 'active':'' }}">
<div class="number-wrap"><span class="number">3</span></div>
<span class="title">提交成功</span>
<span class="title">{{ __('shop/steps.submitted_successfully') }}</span>
</div>
<div class="{{ $steps == 4 ? 'active':'' }}">
<div class="number-wrap"><span class="number">4</span></div>
<span class="title">付款</span>
<span class="title">{{ __('shop/steps.payment') }}</span>
</div>
</div>