fixed translate bug

master
A1Gard 2 days ago
parent 0ea18cd7df
commit e3a1d72bfd

@ -10,32 +10,34 @@
name="only"> name="only">
<label class="form-check-label" for="flexSwitchCheckDefault"> <label class="form-check-label" for="flexSwitchCheckDefault">
<!-- WIP translate --> <!-- WIP translate -->
Only available {{ translate['only'] }}
</label> </label>
</div> </div>
</li> </li>
<li> <li>
<label> <label>
Sort by {{ translate['sort-by'] }}
</label> </label>
<select name="sort" v-model="sort" class="form-control"> <select name="sort" v-model="sort" class="form-control">
<option value=""> <option value="">
Newest {{ translate['newset'] }}
</option> </option>
<option value="oldest"> <option value="oldest">
Oldest {{ translate['oldest'] }}
</option> </option>
<option value="cheap"> <option value="cheap">
Cheaper {{ translate['cheaper'] }}
</option> </option>
<option value="expensive"> <option value="expensive">
More expensive {{ translate['more-expensive'] }}
</option> </option>
<option value="fav"> <option value="fav">
Favorite {{ translate['favorite'] }}
</option> </option>
<option value="sale"> <option value="sale">
More sale {{ translate['more-sale'] }}
</option> </option>
</select> </select>
</li> </li>
@ -57,7 +59,7 @@
</template> </template>
<template v-if="prop.type == 'color'"> <template v-if="prop.type == 'color'">
<select :id="prop.name" class="form-control color" :name="`meta[${prop.name}]`"> <select :id="prop.name" class="form-control color" :name="`meta[${prop.name}]`">
<option value=""> All</option> <option value=""> {{ translate['all'] }}</option>
<option v-for="op in prop.optionList" :style="`background: ${op.value} ;`" <option v-for="op in prop.optionList" :style="`background: ${op.value} ;`"
:value="op.value"> {{ op.title }} :value="op.value"> {{ op.title }}
</option> </option>
@ -65,7 +67,7 @@
</template> </template>
<template v-if="prop.type == 'select'"> <template v-if="prop.type == 'select'">
<select :id="prop.name" class="form-control color" :name="`meta[${prop.name}]`"> <select :id="prop.name" class="form-control color" :name="`meta[${prop.name}]`">
<option value=""> All</option> <option value=""> {{ translate['all'] }}</option>
<option v-for="op in prop.optionList" :value="op.value"> {{ op.title }}</option> <option v-for="op in prop.optionList" :value="op.value"> {{ op.title }}</option>
</select> </select>
</template> </template>
@ -79,7 +81,7 @@
</template> </template>
</ul> </ul>
<button type="submit" class="btn btn-outline-primary btn-sm w-100"> <button type="submit" class="btn btn-outline-primary btn-sm w-100">
Apply filter {{ translate['apply-filter'] }}
</button> </button>
</form> </form>
@ -152,6 +154,9 @@ export default {
propsApiLink: { propsApiLink: {
required: true, required: true,
}, },
translate: {
default: {},
}
}, },
async mounted() { async mounted() {

@ -9,7 +9,7 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="row p-0"> <div class="row p-0">
<div class="col-md-11"> <div class="col-md-10">
<div> <div>
<!-- WIP translate--> <!-- WIP translate-->
<label :for="`kind-${i}`"> <label :for="`kind-${i}`">
@ -66,6 +66,9 @@
<button type="button" class="btn btn-primary" @click="remItem(i)"> <button type="button" class="btn btn-primary" @click="remItem(i)">
<i class="ri-close-line"></i> <i class="ri-close-line"></i>
</button> </button>
<a class="btn btn-outline-light mx-2" :href="fixLink(item.id)" v-if="transLink !== ''">
<i class="ri-translate"></i>
</a>
</div> </div>
</div> </div>
</div> </div>
@ -74,6 +77,8 @@
<button type="button" class="btn btn-primary my-3" @click="addItem"> <button type="button" class="btn btn-primary my-3" @click="addItem">
<i class="ri-add-line"></i> <i class="ri-add-line"></i>
</button> </button>
<input type="hidden" name="items" :value="JSON.stringify(this.currentItems)"> <input type="hidden" name="items" :value="JSON.stringify(this.currentItems)">
<input type="hidden" name="removed" :value="JSON.stringify(this.removed)"> <input type="hidden" name="removed" :value="JSON.stringify(this.removed)">
</div> </div>
@ -111,6 +116,9 @@ export default {
}, },
menuId: { menuId: {
required: true, required: true,
},
transLink:{
default: '',
} }
}, },
mounted() { mounted() {
@ -144,6 +152,9 @@ export default {
this.removed.push(this.currentItems[i].id); this.removed.push(this.currentItems[i].id);
} }
this.currentItems.splice(i, 1) this.currentItems.splice(i, 1)
},
fixLink(id){
return this.transLink.split('xxx').join(id);
} }
} }

@ -76,6 +76,7 @@
"Answer": "پاسخ", "Answer": "پاسخ",
"Answer: <br>": " پاسخ: <br>", "Answer: <br>": " پاسخ: <br>",
"Answered": "پاسخ داده شده", "Answered": "پاسخ داده شده",
"Apply filter": "اعمال صافی",
"Approve": "تایید کردن", "Approve": "تایید کردن",
"Approved": "تایید شده", "Approved": "تایید شده",
"Are you sure you want to delete this item?": "آیا برای حذف این مورد مطمئن هستید؟", "Are you sure you want to delete this item?": "آیا برای حذف این مورد مطمئن هستید؟",
@ -124,6 +125,7 @@
"Category slug": "نامک دسته", "Category slug": "نامک دسته",
"Change items sort": "تغییر ترتیب نمایش", "Change items sort": "تغییر ترتیب نمایش",
"Change latitude and longitude": "تغییر طول و عرض جغرافیایی", "Change latitude and longitude": "تغییر طول و عرض جغرافیایی",
"Cheaper": "ارزاتر",
"Check": "بررسی", "Check": "بررسی",
"Check all": "انتخاب همه", "Check all": "انتخاب همه",
"Check authenticate code": "بررسی کد احراز هویت", "Check authenticate code": "بررسی کد احراز هویت",
@ -171,6 +173,7 @@
"Date": "تاریخ", "Date": "تاریخ",
"Date of born": "تاریخ تولد", "Date of born": "تاریخ تولد",
"Datetime": "تاریخ و زمان", "Datetime": "تاریخ و زمان",
"Day(s)": "روز",
"Default": "پیش‌فرض", "Default": "پیش‌فرض",
"Default admin email is :E1 (developer) or :E2 (admin) and default password is: :P": "در نگارش آزمایشی رایانامه توسعه دهنده :E1 است و رایانامه مدیر عادی :E2 و گذرواژه هر دو :P است", "Default admin email is :E1 (developer) or :E2 (admin) and default password is: :P": "در نگارش آزمایشی رایانامه توسعه دهنده :E1 است و رایانامه مدیر عادی :E2 و گذرواژه هر دو :P است",
"DefaultFooter": "فوتر پیش‌فرض", "DefaultFooter": "فوتر پیش‌فرض",
@ -238,6 +241,7 @@
"Failed Invoices": "صورت حساب‌های ناموفق", "Failed Invoices": "صورت حساب‌های ناموفق",
"False": "خیر", "False": "خیر",
"Fast contact form": "دسترسی سریع تماس", "Fast contact form": "دسترسی سریع تماس",
"Favorite": "علاقه‌مندی",
"Favorites": "علاقه‌مندی‌ها", "Favorites": "علاقه‌مندی‌ها",
"Feature image": "تصویر شاخص", "Feature image": "تصویر شاخص",
"Female": "مونث", "Female": "مونث",
@ -275,6 +279,7 @@
"Hello world": "سلام دنیا", "Hello world": "سلام دنیا",
"Hide in menu": "عدم نمایش در فهرست (منو)", "Hide in menu": "عدم نمایش در فهرست (منو)",
"Home": "خانه", "Home": "خانه",
"Hour(s)": "ساعت",
"ID": "", "ID": "",
"Icon": "نماد", "Icon": "نماد",
"If not choose expire expire time will be unlimited": "اگر زمان انقصا را انتخاب نکنید، هرگز منقضی نخواهد شد", "If not choose expire expire time will be unlimited": "اگر زمان انقصا را انتخاب نکنید، هرگز منقضی نخواهد شد",
@ -347,17 +352,23 @@
"Message": "پیام", "Message": "پیام",
"Message replay": "پاسخ پیام", "Message replay": "پاسخ پیام",
"Message...": "پیام...", "Message...": "پیام...",
"Minute(s)": "دقیقه",
"Mobile": "موبایل", "Mobile": "موبایل",
"Model": "ماژول", "Model": "ماژول",
"Model ID": "ID مدل", "Model ID": "ID مدل",
"More expensive": "گرانترین",
"More sale": "بیشترین فروش",
"Name": "نام", "Name": "نام",
"Name and lastname": "نام و نام‌خانوادگی", "Name and lastname": "نام و نام‌خانوادگی",
"Need process orders": "سفارشات نیازمند رسیدگی", "Need process orders": "سفارشات نیازمند رسیدگی",
"Needs Improvement": "نیازمند بهینه‌تر شدن", "Needs Improvement": "نیازمند بهینه‌تر شدن",
"Newest": "جدیدترین",
"Next": "بعدی", "Next": "بعدی",
"No parent": "بدون والد", "No parent": "بدون والد",
"Not available": "نا موجود", "Not available": "نا موجود",
"Not required": "غیر ضرروری", "Not required": "غیر ضرروری",
"Oldest": "قدیمی‌ترین",
"Only available": "فقط کالاهای موجود",
"Order removed successfully": "سفارش با موفقیت حذف شد", "Order removed successfully": "سفارش با موفقیت حذف شد",
"Orders": "سفارشاات", "Orders": "سفارشاات",
"Orders count": "تعداد سفارش", "Orders count": "تعداد سفارش",
@ -451,6 +462,7 @@
"Search for": "جستجو برای", "Search for": "جستجو برای",
"Search word is too short": "واژه مورد جستجو بسیار کوتاه است", "Search word is too short": "واژه مورد جستجو بسیار کوتاه است",
"Searchable": "قابل جستجو", "Searchable": "قابل جستجو",
"Second(s)": "ثانیه",
"Section": "بخش", "Section": "بخش",
"Sections": "بخش‌ها", "Sections": "بخش‌ها",
"Sell": "فروش", "Sell": "فروش",
@ -488,6 +500,7 @@
"Slug": "نامک", "Slug": "نامک",
"Sort": "ترتیب", "Sort": "ترتیب",
"Sort & filter": "ترتیب و صافی", "Sort & filter": "ترتیب و صافی",
"Sort by": "ترتیب",
"State": "استان", "State": "استان",
"States": "استان‌ها", "States": "استان‌ها",
"States list": "فهرست استان‌ها", "States list": "فهرست استان‌ها",
@ -543,6 +556,7 @@
"True": "بلی", "True": "بلی",
"Type": "نوع", "Type": "نوع",
"Unavailable": "ناموجود", "Unavailable": "ناموجود",
"Under Construction": "در دست ساخت",
"Under construction": "در دست ساخت", "Under construction": "در دست ساخت",
"Unit": "واحد", "Unit": "واحد",
"Unknown bulk action : :ACTION": "کار دسته جمعی تعریف نشده :ACTION", "Unknown bulk action : :ACTION": "کار دسته جمعی تعریف نشده :ACTION",

@ -93,6 +93,7 @@
<menu-item-input <menu-item-input
:morphs='@json(\App\Models\Menu::$mrohps)' :morphs='@json(\App\Models\Menu::$mrohps)'
morph-search-link="{{route('v1.morph.search')}}" morph-search-link="{{route('v1.morph.search')}}"
@if(config('app.xlang.active')) trans-link="{{route('admin.lang.model',['xxx',\App\Models\Item::class])}}" @endif
xlang="{{config('app.locale')}}" xlang="{{config('app.locale')}}"
:items='@json($item->items)' :items='@json($item->items)'
menu-id="{{$item->id}}" menu-id="{{$item->id}}"

@ -0,0 +1,130 @@
.GridGroup {
// scss
// scss
padding: 3rem 0;
.grid-grp-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
grid-template-rows: repeat(2, 1fr);
height: 70vh; // Set the height of the grid
width: 100%; // Full width of the container
}
.grid-grp-item {
border-radius: var(--xshop-border-radius);
overflow: hidden;
position: relative;
i{
position: absolute;
top: 1rem;
inset-inline-end: 1rem;
z-index: 3;
padding: .3rem;
background: #ffffff66;
font-size: 30px;
display: inline-block;
border-radius: var(--xshop-border-radius);
backdrop-filter: blur(7px);
}
h3{
position: absolute;
top: 50%;
left: 0;
right: 0;
text-align: center;
background: var(--xshop-diff);
padding: 1rem;
background: #ffffff66;
color: black;
backdrop-filter: blur(7px);
opacity: 0;
transition: 400ms;
transform: translateY(-50%);
}
img {
object-fit: cover;
transition: 400ms;
width: 100%;
height: 100%;
}
&:hover{
h3{
opacity: 1;
}
img{
transform: rotateZ(3deg) scale(1.3) ;
filter: contrast(1.7) grayscale(.75);
}
}
// First item (half of the grid)
&:nth-child(1) {
grid-column: 1 / 3; // Span columns 1 and 2
grid-row: 1 / 3; // First row
}
// Second item (25% width, 50% height)
&:nth-child(2) {
grid-column: 3; // Third column
grid-row: 1 / 2; // First row
}
// Third item (25% width, 50% height)
&:nth-child(3) {
grid-column: 3; // Fourth column
grid-row: 2 / 3; // First row
}
// Fourth item (full height, 25% width)
&:nth-child(4) {
grid-column: 4; // Third column
grid-row: 1 / 3; // Second row
}
}
/*-992px width*/
@media (max-width: 992px) {
.grid-grp-container {
grid-template-columns: repeat(4, 1fr);
gap: 10px;
grid-template-rows: repeat(4, 1fr);
}
.grid-grp-item {
// First item (half of the grid)
&:nth-child(1) {
grid-column: 1 / 5; // Span columns 1 and 2
grid-row: 1 / 3; // First row
}
// Second item (25% width, 50% height)
&:nth-child(2) {
grid-column: 1 / 3; // Third column
grid-row: 3 / 4; // First row
}
// Third item (25% width, 50% height)
&:nth-child(3) {
grid-column: 1 / 3; // Fourth column
grid-row: 4 / 5; // First row
}
// Fourth item (full height, 25% width)
&:nth-child(4) {
grid-column: 3 / 5; // Third column
grid-row: 3 / 5; // Second row
}
}
h3{
font-size: 17px;
}
}
}

@ -9,6 +9,18 @@
@if(isset($category)) @if(isset($category))
category="{{$category->id}}" category="{{$category->id}}"
@endif @endif
:translate='{{vueTranslate([
'only' => __('Only available'),
'all' => __('All'),
"sort-by" => __('Sort by'),
"newset" => __('Newest'),
"oldest" => __('Oldest'),
'more-expensive' => __('More expensive'),
'cheaper' => __('Cheaper'),
'favorite' => __('Favorite'),
'more-sale' => __('More sale'),
'apply-filter' => __('Apply filter'),
])}}'
> >
</meta-filter> </meta-filter>
</div> </div>

@ -34,6 +34,18 @@
@if(isset($category)) @if(isset($category))
category="{{$category->id}}" category="{{$category->id}}"
@endif @endif
:translate='{{vueTranslate([
'only' => __('Only available'),
'all' => __('All'),
"sort-by" => __('Sort by'),
"newset" => __('Newest'),
"oldest" => __('Oldest'),
'more-expensive' => __('More expensive'),
'cheaper' => __('Cheaper'),
'favorite' => __('Favorite'),
'more-sale' => __('More sale'),
'apply-filter' => __('Apply filter'),
])}}'
> >
</meta-filter> </meta-filter>
</div> </div>

Loading…
Cancel
Save