多语言

This commit is contained in:
sl 2022-08-18 12:01:39 +08:00
parent 7f08b8c97c
commit 945d3cb7e3
3 changed files with 22 additions and 10 deletions

View File

@ -28,6 +28,15 @@ return [
'amount' => '金额',
'check_details' => '查看详情',
'edit' => [
'index' => '修改个人信息',
'modify_avatar' => '修改头像',
'suggest' => '上传JPG或PNG图片。建议300 x 300。',
'name' => '名称',
'email' => '邮箱',
'crop' => '裁剪',
],
'wishlist' => [
'index' => '收藏列表',
],

View File

@ -10,5 +10,8 @@
*/
return [
'home' => '首页'
'home' => '首页',
'submit' => '提交',
'cancel' => '取消',
'confirm' => '确定',
];

View File

@ -26,7 +26,7 @@
<div class="col-12 col-md-9">
<div class="card h-min-600">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="card-title">修改个人信息</h5>
<h5 class="card-title">{{ __('shop/account.edit.index') }}</h5>
</div>
<div class="card-body h-600">
<form novalidate class="needs-validation" action="{{ shop_route('account.edit.update') }}" method="POST">
@ -43,17 +43,17 @@
width="90">
<div class="ps-3">
<label class="btn btn-light shadow-sm bg-body mb-2" data-toggle="tooltip" title="Change your avatar">
<i class="bi bi-arrow-repeat"></i> 修改头像
<i class="bi bi-arrow-repeat"></i> {{ __('shop/account.edit.modify_avatar') }}
<input type="file" class="d-none" id="update-btn" name="" accept="image/*">
<input type="hidden" id="avatar-input" name="avatar" value="{{ $customer->avatar }}">
</label>
<div class="p mb-0 fs-ms text-muted">上传JPG或PNG图片。建议300 x 300</div>
<div class="p mb-0 fs-ms text-muted">{{ __('shop/account.edit.suggest') }}</div>
</div>
</div>
</div>
<div class="row gx-4 gy-3">
<div class="col-sm-6">
<label class="form-label">名称</label>
<label class="form-label">{{ __('shop/account.edit.name') }}</label>
<input class="form-control {{ $errors->has('name') ? 'is-invalid' : '' }}" type="text" name="name"
value="{{ old('name', $customer->name ?? '') }}" required>
<span class="invalid-feedback"
@ -61,7 +61,7 @@
{{-- @if ($errors->has('name'))@endif --}}
</div>
<div class="col-sm-6">
<label class="form-label">邮箱</label>
<label class="form-label">{{ __('shop/account.edit.email') }}</label>
<input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="email"
name="email" value="{{ old('name', $customer->email ?? '') }}" required>
<span class="invalid-feedback"
@ -69,7 +69,7 @@
{{-- @if ($errors->has('email'))@endif --}}
</div>
<div class="col-12 mt-4">
<button class="btn btn-primary mt-sm-0" type="submit">提交</button>
<button class="btn btn-primary mt-sm-0" type="submit">{{ __('shop/common.submit') }}</button>
</div>
</div>
</form>
@ -84,7 +84,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">裁剪</h5>
<h5 class="modal-title" id="exampleModalLabel">{{ __('shop/account.edit.crop') }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
@ -93,8 +93,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary cropper-crop">确定</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('shop/common.cancel') }}</button>
<button type="button" class="btn btn-primary cropper-crop">{{ __('shop/common.confirm') }}</button>
</div>
</div>
</div>