diff --git a/public/vendor/element-ui/language/en.js b/public/vendor/element-ui/language/en.js
new file mode 100644
index 00000000..6f9cfd7e
--- /dev/null
+++ b/public/vendor/element-ui/language/en.js
@@ -0,0 +1,142 @@
+(function (global, factory) {
+ if (typeof define === "function" && define.amd) {
+ define('element/locale/en', ['module', 'exports'], factory);
+ } else if (typeof exports !== "undefined") {
+ factory(module, exports);
+ } else {
+ var mod = {
+ exports: {}
+ };
+ factory(mod, mod.exports);
+ global.ELEMENT.lang = global.ELEMENT.lang || {};
+ global.ELEMENT.lang.en = mod.exports;
+ }
+})(this, function (module, exports) {
+ 'use strict';
+
+ exports.__esModule = true;
+ exports.default = {
+ el: {
+ colorpicker: {
+ confirm: 'OK',
+ clear: 'Clear'
+ },
+ datepicker: {
+ now: 'Now',
+ today: 'Today',
+ cancel: 'Cancel',
+ clear: 'Clear',
+ confirm: 'OK',
+ selectDate: 'Select date',
+ selectTime: 'Select time',
+ startDate: 'Start Date',
+ startTime: 'Start Time',
+ endDate: 'End Date',
+ endTime: 'End Time',
+ prevYear: 'Previous Year',
+ nextYear: 'Next Year',
+ prevMonth: 'Previous Month',
+ nextMonth: 'Next Month',
+ year: '',
+ month1: 'January',
+ month2: 'February',
+ month3: 'March',
+ month4: 'April',
+ month5: 'May',
+ month6: 'June',
+ month7: 'July',
+ month8: 'August',
+ month9: 'September',
+ month10: 'October',
+ month11: 'November',
+ month12: 'December',
+ week: 'week',
+ weeks: {
+ sun: 'Sun',
+ mon: 'Mon',
+ tue: 'Tue',
+ wed: 'Wed',
+ thu: 'Thu',
+ fri: 'Fri',
+ sat: 'Sat'
+ },
+ months: {
+ jan: 'Jan',
+ feb: 'Feb',
+ mar: 'Mar',
+ apr: 'Apr',
+ may: 'May',
+ jun: 'Jun',
+ jul: 'Jul',
+ aug: 'Aug',
+ sep: 'Sep',
+ oct: 'Oct',
+ nov: 'Nov',
+ dec: 'Dec'
+ }
+ },
+ select: {
+ loading: 'Loading',
+ noMatch: 'No matching data',
+ noData: 'No data',
+ placeholder: 'Select'
+ },
+ cascader: {
+ noMatch: 'No matching data',
+ loading: 'Loading',
+ placeholder: 'Select',
+ noData: 'No data'
+ },
+ pagination: {
+ goto: 'Go to',
+ pagesize: '/page',
+ total: 'Total {total}',
+ pageClassifier: ''
+ },
+ messagebox: {
+ title: 'Message',
+ confirm: 'OK',
+ cancel: 'Cancel',
+ error: 'Illegal input'
+ },
+ upload: {
+ deleteTip: 'press delete to remove',
+ delete: 'Delete',
+ preview: 'Preview',
+ continue: 'Continue'
+ },
+ table: {
+ emptyText: 'No Data',
+ confirmFilter: 'Confirm',
+ resetFilter: 'Reset',
+ clearFilter: 'All',
+ sumText: 'Sum'
+ },
+ tree: {
+ emptyText: 'No Data'
+ },
+ transfer: {
+ noMatch: 'No matching data',
+ noData: 'No data',
+ titles: ['List 1', 'List 2'], // to be translated
+ filterPlaceholder: 'Enter keyword', // to be translated
+ noCheckedFormat: '{total} items', // to be translated
+ hasCheckedFormat: '{checked}/{total} checked' // to be translated
+ },
+ image: {
+ error: 'FAILED'
+ },
+ pageHeader: {
+ title: 'Back' // to be translated
+ },
+ popconfirm: {
+ confirmButtonText: 'Yes',
+ cancelButtonText: 'No'
+ },
+ empty: {
+ description: 'No Data'
+ }
+ }
+ };
+ module.exports = exports['default'];
+});
\ No newline at end of file
diff --git a/resources/beike/admin/views/layouts/master.blade.php b/resources/beike/admin/views/layouts/master.blade.php
index 6a8a2ba7..122a4d43 100644
--- a/resources/beike/admin/views/layouts/master.blade.php
+++ b/resources/beike/admin/views/layouts/master.blade.php
@@ -1,44 +1,56 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BeikeShop - @yield('title')
- @stack('header')
- {{-- --}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @if (locale() != 'zh_cn')
+
+ @endif
+
+
+ BeikeShop - @yield('title')
+ @stack('header')
+ {{-- --}}
+
-
+
-
+
-
-
-
-
-
@yield('title')
- @yield('page-title-right')
-
-
- @yield('content')
+
+
+
+
+
@yield('title')
+ @yield('page-title-right')
+
+
+ @yield('content')
+
-
-@stack('footer')
+
+
+ @stack('footer')
+
diff --git a/resources/beike/admin/views/pages/brands/index.blade.php b/resources/beike/admin/views/pages/brands/index.blade.php
index 4823a7cc..3141aa52 100644
--- a/resources/beike/admin/views/pages/brands/index.blade.php
+++ b/resources/beike/admin/views/pages/brands/index.blade.php
@@ -144,7 +144,7 @@
this.$refs[form].validate((valid) => {
if (!valid) {
- this.$message.error('请检查表单是否填写正确');
+ this.$message.error('{{ __('common.error_form') }}');
return;
}
@@ -163,9 +163,9 @@
deleteItem(id, index) {
const self = this;
- this.$confirm('确定要删除品牌吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ this.$confirm('{{ __('common.error_form') }}', '{{ __('common.text_hint') }}', {
+ confirmButtonText: '{{ __('common.confirm') }}',
+ cancelButtonText: '{{ __('common.cancel') }}',
type: 'warning'
}).then(() => {
$http.delete('brands/' + id).then((res) => {
diff --git a/resources/beike/admin/views/pages/categories/form.blade.php b/resources/beike/admin/views/pages/categories/form.blade.php
index ec722f8d..e8eb1703 100644
--- a/resources/beike/admin/views/pages/categories/form.blade.php
+++ b/resources/beike/admin/views/pages/categories/form.blade.php
@@ -1,10 +1,10 @@
@extends('admin::layouts.master')
-@section('title', '分类管理')
+@section('title', __('admin/common.category'))
@section('content')
-
+
diff --git a/resources/beike/admin/views/pages/products/index.blade.php b/resources/beike/admin/views/pages/products/index.blade.php
index d85cb2f2..da0b4030 100644
--- a/resources/beike/admin/views/pages/products/index.blade.php
+++ b/resources/beike/admin/views/pages/products/index.blade.php
@@ -242,7 +242,7 @@
},
batchDelete() {
- this.$confirm('确认要批量删除选中的商品吗?', '删除商品', {
+ this.$confirm('{{ __('admin/product.confirm_batch_product') }}', '{{ __('common.text_hint') }}', {
type: 'warning'
}).then(() => {
$http.delete('products/delete', {
@@ -255,7 +255,7 @@
},
batchActive(type) {
- this.$confirm('确认要批量修改选中的商品的状态吗?', '修改状态', {
+ this.$confirm('{{ __('admin/product.confirm_batch_status') }}', '{{ __('common.text_hint') }}', {
type: 'warning'
}).then(() => {
$http.post('products/status', {
@@ -281,7 +281,7 @@
deleteProduct: function(index) {
const product = this.product.data[index];
- this.$confirm('确认要删除商品吗?', '删除商品', {
+ this.$confirm('{{ __('common.confirm_delete') }}', '{{ __('common.text_hint') }}', {
type: 'warning'
}).then(() => {
$http.delete('products/' + product.id).then((res) => {
@@ -293,7 +293,7 @@
restoreProduct: function(index) {
const product = this.product.data[index];
- this.$confirm('确认要恢复选中的商品吗?', '恢复商品', {
+ this.$confirm('{{ __('admin/product.confirm_batch_restore') }}', '{{ __('common.text_hint') }}', {
type: 'warning'
}).then(() => {
$http.put('products/restore', {
@@ -305,7 +305,7 @@
},
clearRestore() {
- this.$confirm('确认要清空回收站吗?', '提示', {
+ this.$confirm('{{ __('admin/product.confirm_delete_restore') }}', '{{ __('common.text_hint') }}', {
type: 'warning'
}).then(() => {
$http.post('products/trashed/clear').then((res) => {
diff --git a/resources/lang/en/admin/category.php b/resources/lang/en/admin/category.php
index 69d63b1b..d843d44c 100644
--- a/resources/lang/en/admin/category.php
+++ b/resources/lang/en/admin/category.php
@@ -11,6 +11,8 @@
return [
'index' => 'Category',
+ 'edit_category' => 'Edit Category',
+ 'upper_category' => 'Upper Category',
'categories_index' => 'Index',
'categories_create' => 'Create',
diff --git a/resources/lang/en/admin/product.php b/resources/lang/en/admin/product.php
index 0166478e..94064fec 100644
--- a/resources/lang/en/admin/product.php
+++ b/resources/lang/en/admin/product.php
@@ -37,4 +37,9 @@ return [
'add_variable_value' => 'Add Specification Value',
'add_variable_image' => 'Add Spec Image',
'default_main_product' => 'Default main product',
+
+ 'confirm_batch_product' => 'Are you sure you want to delete the selected products in batches? ',
+ 'confirm_batch_status' => 'Confirm to modify the status of the selected products in batches? ',
+ 'confirm_batch_restore' => 'Confirm to restore the selected product? ',
+ 'confirm_delete_restore' => 'Are you sure you want to empty the recycle bin? ',
];
diff --git a/resources/lang/zh_cn/admin/category.php b/resources/lang/zh_cn/admin/category.php
index d4280c53..a136a04e 100644
--- a/resources/lang/zh_cn/admin/category.php
+++ b/resources/lang/zh_cn/admin/category.php
@@ -11,6 +11,8 @@
return [
'index' => '分类',
+ 'edit_category' => '编辑分类',
+ 'upper_category' => '上级分类',
'categories_index' => '分类列表',
'categories_create' => '创建分类',
diff --git a/resources/lang/zh_cn/admin/product.php b/resources/lang/zh_cn/admin/product.php
index 839d15d8..0548c448 100644
--- a/resources/lang/zh_cn/admin/product.php
+++ b/resources/lang/zh_cn/admin/product.php
@@ -38,4 +38,9 @@ return [
'add_variable_value' => '添加规格值',
'add_variable_image' => '添加规格图片',
'default_main_product' => '默认主商品',
+
+ 'confirm_batch_product' => '确认要批量删除选中的商品吗?',
+ 'confirm_batch_status' => '确认要批量修改选中的商品的状态吗?',
+ 'confirm_batch_restore' => '确认要恢复选中的商品吗?',
+ 'confirm_delete_restore' => '确认要清空回收站吗?',
];