added some translate

pull/49/head
A1Gard 4 months ago
parent 458ad20e35
commit 6389e88ccf

@ -1062,3 +1062,8 @@ function defTrannsport()
return \App\Models\Transport::where('is_default',1)->first()->id;
}
function vueTranslate($array){
return json_encode($array);
}

@ -5,26 +5,27 @@
<div class="circle" @click="changeIndex(0)">
<i class="ri-vip-diamond-line"></i>
</div>
Shopping card
{{ translate['shopping-card'] }}
</li>
<li :class="index > 0 ?'active':''">
<div class="circle" @click="changeIndex(1)">
<i class="ri-truck-line"></i>
</div>
Transport
{{ translate['transport'] }}
</li>
<li :class="index > 1 ?'active':''">
<div class="circle" @click="changeIndex(2)">
<i class="ri-bank-card-2-line"></i>
</div>
Payment & discount
{{ translate['discount-pay'] }}
</li>
</ul>
<div class="row">
<div class="col-lg-3">
<aside>
<h6 class="text-center">
Totol price:
{{ translate['total-price'] }}:
</h6>
<h2 class="text-center" v-if="index == 0">
{{ priceing(total) }}
@ -51,19 +52,19 @@
#
</th>
<th>
Image
{{ translate['image'] }}
</th>
<th>
Name
{{ translate['name'] }}
</th>
<th class="text-center" style="width: 400px">
Quantity
{{ translate['quantity'] }}
</th>
<th>
Price
{{ translate['price'] }}
</th>
<th>
Count
{{ translate['count'] }}
</th>
<th>
-
@ -119,7 +120,7 @@
<tfoot>
<tr>
<th colspan="4">
Total
{{ translate['total-price'] }}
</th>
<th colspan="4">
{{ priceing(total) }}
@ -132,7 +133,7 @@
<div :class="'tab' + (index == 1?'':' hide')">
<div>
<h5>
Sent to:
{{ translate['sent-to'] }}:
</h5>
<div v-for="(adr,j) in addresses" class="addr">
<div class="form-check">
@ -145,7 +146,7 @@
</div>
<div v-if="transports.length > 0">
<h5 class="mt-3">
Transport:
{{ translate['transport'] }}::
</h5>
<div v-for="(trs,j) in transports" class="addr">
<span class="float-end p-2 badge bg-primary m-2">
@ -172,13 +173,14 @@
<!-- WIP translate & discount check -->
<h5 class="mt-1">
Check discount
{{ translate['check-dis'] }}:
</h5>
<div class="input-group mb-3">
<span class="input-group-text"><i class="ri-percent-line"></i></span>
<input type="text" class="form-control text-center" placeholder="Discount code" :readonly="discount != null" v-model="code">
<input type="text" class="form-control text-center" placeholder="Discount code"
:readonly="discount != null" v-model="code">
<button type="button" class="input-group-text btn btn-primary" @click="discountCheck">
Check
{{ translate['check'] }}
</button>
</div>
<div v-if="discount_id != null">
@ -189,16 +191,16 @@
</div>
<h4>
Extra description
{{ translate['extra-desc'] }}
</h4>
<textarea rows="4" class="form-control" name="desc" placeholder="Your message for this order..."></textarea>
<textarea rows="4" class="form-control" name="desc" :placeholder="translate['your-msg']"></textarea>
<hr>
<button v-if="canPay" class="btn btn-outline-primary w-100 btn-lg">
<i class="ri-bank-card-2-line"></i>
Pay now
{{ translate['pay-now'] }}
</button>
<div v-else class="alert alert-danger">
Please, Login or complete information to pay
{{ translate['plz'] }}
</div>
</div>
</div>
@ -279,6 +281,9 @@ export default {
},
defTransport: {
default: null,
},
translate: {
default: {},
}
},
mounted() {

@ -41,8 +41,7 @@
<a
class="btn btn-outline-primary btn-lg" @click="add2card">
<i class="ri-shopping-bag-3-line"></i>
Add to card
<!-- WIP translate-->
{{ translate['add-to-card'] }}
</a>
</div>
</template>
@ -91,6 +90,9 @@ export default {
discount: {
default: null,
},
translate: {
default: {},
}
},
mounted() {

@ -23,13 +23,13 @@
<div id="address-modal" v-if="modal" @click.self="modal = false">
<div class="card">
<div class="card-header">
Address editor <!-- WIP Translate -->
{{ translate['addr-editor'] }}
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<label for="st">
State: <!-- WIP Translate -->
{{ translate['state'] }} :
</label>
<select @change="updateState" class="form-control" v-model="state_id" id="st">
<option :data-lat="s.lat" :data-lng="s.lng" :value="s.id" v-for="s in states">
@ -39,7 +39,7 @@
</div>
<div class="col-md-6">
<label for="st">
City: <!-- WIP Translate -->
{{ translate['city'] }}:
</label>
<select @change="updateCity" class="form-control" v-model="city_id" id="st">
<option :value="c.id" v-for="c in cities"> {{ c.name }}</option>
@ -49,12 +49,12 @@
<div ref="mapContainer" :style="'height: 300px;'+mapStyle"></div>
</div>
<div class="col-12">
<textarea rows="2" class="form-control" placeholder="Address" v-model="address"></textarea>
<!-- WIP Translate -->
<textarea rows="2" class="form-control" :placeholder="translate['address']"
v-model="address"></textarea>
</div>
<div class="col-12">
<label for="zip">
Postcode: <!-- WIP Translate -->
{{ translate['post-code'] }}:
</label>
<input type="text" class="form-control" v-model="zip">
</div>
@ -128,6 +128,9 @@ export default {
darkMode: {
type: Boolean,
default: false,
},
translate: {
default: {},
}
},
async mounted() {

@ -97,8 +97,10 @@
"Category slug": "نامک دسته",
"Change items sort": "",
"Change latitude and longitude": "تغییر طول و عرض جغرافیایی",
"Check": "بررسی",
"Check all": "انتخاب همه",
"Check authenticate code": "بررسی کد احراز هویت",
"Check discount": "بررسی تخفیف",
"Cities list": "فهرست شهرها",
"City": "شهر",
"Click here to upload or drag and drop here": "برای بارگزاری اینجا کلیک کنید یا موارد را کشیده و اینجا رها کنید",
@ -118,6 +120,7 @@
"Contacts list": "فهرست تماس‌ها",
"Contents": "محتوا",
"Continue": "ادامه",
"Count": "تعداد",
"Country": "کشور",
"Cover": "کاور",
"Credit": "اعتبار",
@ -180,6 +183,7 @@
"Expire": "انقضا",
"Expire date": "تاریخ انقضا",
"Expire date": "تاریخ انقضا",
"Extra description": "توضیحات اضافه",
"False": "خیر",
"Feature image": "تصویر شاخص",
"File": "پرونده",
@ -265,15 +269,17 @@
"Orders count": "تعداد سفارش",
"Password": "گذرواژه",
"Pay now": "همینک پرداخت کنید",
"Payment & discount": "تخفیف و پرداخت",
"Pending": "معلق",
"Pending tickets": "تیکت‌های بی‌پاسخ",
"Pin": "سنجاق",
"Please confirm your password before continuing.": "لطفا پیش از ادامه گذرواژه خود را تایید کنید",
"Please upload file": "لطفا یک پرونده بارگزاری کنید",
"Please, Login or complete information to pay": "لطفا وارد شوید یا اطلاعات خود را تکمیل کنید تا اجازه پرداخت داشته باشید",
"Post": "نوشته",
"Post Text": "متن نوشته",
"Post reply": "پاسخ نوشته",
"Post your comment": "",
"Post your comment": "دیدگاه خود را ارسال کنید",
"Posts": "نوشته‌ها",
"Posts list": "فهرست نوشته‌ها",
"Preview": "پیش‌نمایش",
@ -292,6 +298,7 @@
"Publish": "منتشر",
"Published": "منتشرشده",
"Purchase price": "قیمت خرید",
"Quantity": "موجودی",
"Question": "سوالات",
"Question for:": "سوال برای:",
"Question\/Message": "سوال|پیام",
@ -328,6 +335,7 @@
"Send Answer and close": "ارسال پاسخ و بستن",
"Send Password Reset Link": "ارسال پیوند بازنشانی گذرواژه",
"Send authenticate code": "ارسال کد احراز هویت",
"Sent to": "ارسال به",
"Set": "تغییر به",
"Setting": "تنظیمات",
"Setting added to website": "تنظیم به سایت اضافه شد",
@ -374,13 +382,14 @@
"Toggle favorite": "تغییر وضعیت علاقه‌مندی",
"Toggle navigation": "",
"Toggle selection": "برعکس کردن انتخاب",
"Total price": "",
"Total price": "مبلغ کل",
"Totol": "همه",
"Translate": "ترجمه",
"Translate model": "ترجمه ماژول",
"Translate updated": "ترجمه افزوده شد",
"Translate with AI": "ترجمه با هوش مصنوعی",
"Translated by ai xstack service :TAG": "ترجمه با هوش مصنوعی xstack به :TAG ",
"Transport": "حمل و نقل",
"Transports": "حمل و نقل‌ها",
"Transports list": "فهرست حمل و نقل‌ها",
"Trashed": "حذف شده‌ها",
@ -425,6 +434,7 @@
"Your Email sent": "ایمیل شما ارسال شد",
"Your comment has been submitted": "دیدگاه شما ارسال شد",
"Your information is insufficient, Please complete your information": "اطلاعات شما ناقص است، لطفا اطلاعات خود را تکمیل کنید",
"Your message for this order...": "پیام شما ویژه این سفارش ...",
"a minute ago": "یک دقیقه پیش",
"address updated": "نشانی به روز شد",
"an hour ago": "یک ساعت پیش",

@ -37,6 +37,13 @@
state-link="{{route('v1.state.index')}}"
cities-link="{{route('v1.state.show','')}}"
:dark-mode="true"
:translate='{{vueTranslate([
'addr-editor' => __('Address editor'),
'state' => __('State'),
'city' => __('City'),
'address' => __('Address'),
'post-code' => __('Post code'),
])}}'
></address-input>
</div>
@endif

@ -23,6 +23,24 @@
:transports='@json(transports())'
:def-transport="{{defTrannsport()}}"
:can-pay="{{!auth('customer')->check() || auth('customer')->user()->mobile == null || auth('customer')->user()->mobile == '' || auth('customer')->user()->addresses()->count() == 0?'false':'true'}}"
:translate='{{vueTranslate([
'shopping-card' => __('Shopping card'),
'transport' => __('Transport'),
'discount-pay' => __('Payment & discount'),
'total-price' => __('Total price'),
'image' => __('Image'),
'name' => __('Name'),
'quantity' => __('Quantity'),
'price' => __('Price'),
'count' => __('Count'),
'sent-to' => __('Sent to'),
'check-dis' => __('Check discount'),
'check' => __('Check'),
'extra-desc' => __('Extra description'),
'your-msg' => __('Your message for this order...'),
'pay-now' => __('Pay now'),
'plz' => __('Please, Login or complete information to pay'),
])}}'
>
<br>
@if(!auth('customer')->check())

@ -77,7 +77,7 @@
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif

@ -116,7 +116,7 @@
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif

@ -1,11 +1,10 @@
<!doctype html>
<html lang="en">
<html lang="{{config('app.locale')}}" @if(langIsRTL(config('app.locale'))) dir="rtl" @else dir="ltr" @endif >
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>
@yield('title')
</title>

Loading…
Cancel
Save