Merge pull request #34 from g-plane/master

Thx @g-plane for works on i18n
This commit is contained in:
printempw 2016-09-24 17:31:41 +08:00 committed by GitHub
commit 85645a0e6a
19 changed files with 313 additions and 129 deletions

View File

@ -0,0 +1,9 @@
details: 'Details:'
error403: You cannot view this page without authority.
error404: Nothing here.
error503: Application is now in maintenance mode.
be-right-back: Be right back.
error-occurred: Error occurred.
some-errors: 'Some errors occurred:'
error-code: 'Error code:'
file-location: 'File location:'

View File

@ -31,6 +31,25 @@
reset: 'Reset',
resetting: 'Resetting'
},
skinlib: {
setSkinName: 'Please name your skin~',
removeFromCloset: 'Remove from closet.',
addToCloset: 'Add to closet.',
encodingError: 'Error: Encoding of this picture is incorrect.',
formatError: 'Error: Format of skin file must be PNG.',
chooseTextureType: 'Please choose type of texture.',
noUploadFile: 'You have not uploaded any file.',
setTextureName: 'Please name your texture.',
choosePNG: 'Please choose PNG picture file.',
uploading: 'Uploading',
redirecting: 'Redirecting...',
confirmUpload: 'Confirm uploading',
inputTextureName: 'Please input new name of texture.',
warningPublic: 'Are you sure to make this texture public?',
setPrivate: 'Make it private',
setPublic: 'Make it public',
warningDelete: 'Are you sure to delete this texture? Scores will be returned.'
},
user: {
switch2dPreview: 'Switch to 2D Preview',
switch3dPreview: 'Switch to 3D Preview',
@ -52,8 +71,11 @@
emptyNewEmail: 'Empty new email address.',
changeEmail: 'Sure to change your email address to :new_email?',
emptyDeletePassword: 'Please enter the current password:',
signRemainTime: 'Can sign after :time hours',
signRemainTime: 'Can sign after :time hours'
},
utils: {
fatalError: 'Fatal Error (Please contact author.)'
}
config: {
csl13_1Upper: 'v13.1 and upper (recommended)',
csl13_1Lower: 'lower than v13.1',

View File

@ -0,0 +1,61 @@
index:
now-showing: Now showing
any-model: (Any model)
steve-model: Steve Model
alex-model: Alex Model
uploader: User ( :name ) uploaded
newest-uploaded: Newestly uploaded
most-likes: Most likes
no-result: 'No result.'
item:
remove-from-closet: Remove from closet.
add-to-closet: Add to closet.
not-logged-in: Please login.
private: Private
master:
filter: Filter
my-upload: My upload
sort: Sorting
search-textures: Search textures
upload-new-skin: Upload new skin
search:
title: Result
no-given-keywords: 'No keywords'
no-result: No result.
show:
title: Details of texture
login-before-using-closet: Please login before using closet.
number-of-likes: Number of likes
detail: Details
name: Name
modify-name: Modify name
suitable-model: Suitable model
download-raw: Right-click and choose SAVE AS then you can download raw skin file.
size-of-file: Size of file
uploader: Uploader
upload-at: Date of upload
delete-texture: Delete texture
change-privacy: Change privacy
message: 'Textures setted to be private or deleted will be removed from all collectors'' closets.'
set-private: Be private
set-public: Be public
set-message: 'You can make this texture private or delete it, which will remove it from all collectors'' closets.'
comment: Comments
no-comment: We have not enabled comment service.
upload:
title: Upload texture
button: Confirm uploading
upload: Upload
texture-name: Texture name
name-message: Length of texture name should be less than 32 bytes and it cannot contain invaild character.
texture-type: Texture type
choose-file: Choose file
storage-message: Private texture will cost more scores. Every KB costs :score scores
privacy-message: Others cannot find it in skin library.
set-private: Make it private.

View File

@ -0,0 +1,9 @@
details: 详细信息:
error403: 你并没有权限查看此页面
error404: 这里啥都没有哦
error503: 网站维护中
be-right-back: 马上回来
error-occurred: 出现错误
some-errors: 出现了一些错误:
error-code: 错误码:
file-location: 文件位置:

View File

@ -31,6 +31,25 @@
reset: '重置',
resetting: '重置中'
},
skinlib: {
setSkinName: '给你的皮肤起个名字吧~',
removeFromCloset: '从衣柜中移除',
addToCloset: '添加至衣柜',
encodingError: '错误:这张图片编码不对哦',
formatError: '错误:皮肤文件必须为 PNG 格式',
chooseTextureType: '请选择材质的类型',
noUploadFile: '你还没有上传任何文件哦',
setTextureName: '给你的材质起个名字吧',
choosePNG: '请选择 PNG 格式的图片',
uploading: '上传中',
redirecting: '正在跳转...',
confirmUpload: '确认上传',
inputTextureName: '请输入新的材质名称:',
warningPublic: '要将此材质设置为公开吗?',
setPrivate: '设为隐私',
setPublic: '设为公开',
warningDelete: '真的要删除此材质吗?积分将会被返还'
},
user: {
switch2dPreview: '切换 2D 预览',
switch3dPreview: '切换 3D 预览',
@ -52,8 +71,11 @@
emptyNewEmail: '你还没有填写新邮箱啊',
changeEmail: '确定要将用户邮箱更改为 :new_email 吗?',
emptyDeletePassword: '请先输入当前用户密码',
signRemainTime: ':time 小时后可签到',
signRemainTime: ':time 小时后可签到'
},
utils: {
fatalError: '严重错误(请联系作者)'
}
config: {
csl13_1Upper: '13.1 版及以上(推荐)',
csl13_1Lower: '13.1 版以下',

View File

@ -0,0 +1,61 @@
index:
now-showing: 当前正显示
any-model: (任意模型)
steve-model: Steve 模型
alex-model: Alex 模型
uploader: 用户( :name )上传
newest-uploaded: 最新上传
most-likes: 最多收藏
no-result: 无结果
item:
remove-from-closet: 从衣柜中移除
add-to-closet: 添加至衣柜
not-logged-in: 请先登录
private: 私密
master:
filter: 过滤器
my-upload: 我的上传
sort: 排序
search-textures: 搜索材质
upload-new-skin: 上传新皮肤
search:
title: 搜索结果
no-given-keywords: 未指定关键字
no-result: 无结果
show:
title: 材质详情
login-before-using-closet: 登录后才能使用衣柜哦
number-of-likes: 收藏人数
detail: 详细信息
name: 名称
modify-name: 修改名称
suitable-model: 适用模型
download-raw: 右键另存为即可下载原始皮肤文件
size-of-file: 文件大小
uploader: 上传者
upload-at: 上传日期
delete-texture: 删除材质
change-privacy: 设置隐私
message: 材质设为隐私或被删除后将会从每一个收藏者的衣柜中移除。
set-private: 设为隐私
set-public: 设为公开
set-message: 你可以将此材质设为隐私或删除。这将会使此材质从每一个收藏者的衣柜中移除。
comment: 评论区
no-comment: 本站未开启评论服务
upload:
title: 上传材质
button: 确认上传
upload: 上传
texture-name: 材质名称
name-message: 材质名称应该小于 32 个字节且不能包含奇怪的符号
texture-type: 材质类型
choose-file: 选择文件
storage-message: 私密材质将会消耗更多的积分:每 KB 存储空间 :score 积分
privacy-message: 其他人将不会在皮肤库中看到此材质
set-private: 设置为私密材质

View File

@ -11,8 +11,8 @@ var base_url = location.pathname.endsWith('skinlib') ? "." : "..";
$(document).ready(function() {
swal.setDefaults({
confirmButtonText: '确定',
cancelButtonText: '取消'
confirmButtonText: trans('general.confirm'),
cancelButtonText: trans('general.cancel')
});
});
@ -40,7 +40,7 @@ $('#type-skin').on('ifToggled', function() {
function addToCloset(tid) {
$.getJSON(base_url + '/skinlib/info/'+tid, function(json) {
swal({
title: '给你的皮肤起个名字吧~',
title: trans('skinlib.setSkinName'),
inputValue: json.name,
input: 'text',
showCancelButton: true,
@ -49,7 +49,7 @@ function addToCloset(tid) {
if (value) {
resolve();
} else {
reject('你还没有填写名称哦');
reject(trans('user.emptyPlayerName'));
}
});
}
@ -79,8 +79,8 @@ function ajaxAddToCloset(tid, name) {
});
$('.modal').modal('hide');
$('a[tid='+tid+']').attr('href', 'javascript:removeFromCloset('+tid+');').attr('title', '从衣柜中移除').addClass('liked');
$('#'+tid).attr('href', 'javascript:removeFromCloset('+tid+');').html('从衣柜中移除');
$('a[tid='+tid+']').attr('href', 'javascript:removeFromCloset('+tid+');').attr('title', trans('skinlib.removeFromCloset')).addClass('liked');
$('#'+tid).attr('href', 'javascript:removeFromCloset('+tid+');').html(trans('skinlib.removeFromCloset'));
$('#likes').html(parseInt($('#likes').html()) + 1);
} else {
toastr.warning(json.msg);
@ -92,7 +92,7 @@ function ajaxAddToCloset(tid, name) {
function removeFromCloset(tid) {
swal({
text: '确定要从衣柜中移除此材质吗?',
text: trans('user.removeFromCloset'),
type: 'warning',
showCancelButton: true,
cancelButtonColor: '#3085d6',
@ -110,8 +110,8 @@ function removeFromCloset(tid) {
html: json.msg
});
$('a[tid='+tid+']').attr('href', 'javascript:addToCloset('+tid+');').attr('title', '添加至衣柜').removeClass('liked');
$('#'+tid).attr('href', 'javascript:addToCloset('+tid+');').html('添加至衣柜');
$('a[tid='+tid+']').attr('href', 'javascript:addToCloset('+tid+');').attr('title', trans('skinlib.addToCloset')).removeClass('liked');
$('#'+tid).attr('href', 'javascript:addToCloset('+tid+');').html(trans('skinlib.addToCloset'));
$('#likes').html(parseInt($('#likes').html()) - 1);
} else {
toastr.warning(json.msg);
@ -176,13 +176,13 @@ function handleFiles(files, type) {
$('#name').val(file.name.split('.png')[0])
};
img.onerror = function() {
toastr.warning('错误:这张图片编码不对哦');
toastr.warning(trans('skinlib.encodingError'));
};
img.src = this.result;
};
reader.readAsDataURL(file);
} else {
toastr.warning('错误:皮肤文件必须为 PNG 格式');
toastr.warning(trans('skinlib.formatError'));
}
}
};
@ -198,18 +198,18 @@ function upload() {
} else if ($('#type-cape').prop('checked')) {
form_data.append('type', 'cape');
} else {
toastr.info('请选择材质的类型'); return;
toastr.info(trans('skinlib.chooseTextureType')); return;
}
// quick fix for browsers which don't support FormData.get()
if ($('#file').prop('files')[0] == 'undefined') {
toastr.info('你还没有上传任何文件哦');
toastr.info(trans('skinlib.noUploadFile'));
$('#file').focus();
} else if ($('#name').val() == "") {
toastr.info('给你的材质起个名字吧');
toastr.info(trans('skinlib.setTextureName'));
$('#name').focus();
} else if ($('#file').prop('files')[0].type !== "image/png") {
toastr.warning('请选择 PNG 格式的图片');
toastr.warning(trans('skinlib.choosePNG'));
$('#file').focus();
} else {
$.ajax({
@ -220,7 +220,7 @@ function upload() {
data: form_data,
processData: false,
beforeSend: function() {
$('#upload-button').html('<i class="fa fa-spinner fa-spin"></i> 上传中').prop('disabled', 'disabled');
$('#upload-button').html('<i class="fa fa-spinner fa-spin"></i> ' + trans('skinlib.uploading')).prop('disabled', 'disabled');
},
success: function(json) {
if (json.errno == 0) {
@ -228,7 +228,7 @@ function upload() {
type: 'success',
html: json.msg
}).then(function() {
toastr.info('正在跳转...');
toastr.info(trans('skinlib.redirecting'));
window.setTimeout('window.location = "./show?tid='+json.tid+'"', 1000);
});
} else {
@ -236,12 +236,12 @@ function upload() {
type: 'warning',
html: json.msg
}).then(function() {
$('#upload-button').html('确认上传').prop('disabled', '');
$('#upload-button').html(trans('skinlib.confirmUpload')).prop('disabled', '');
});
}
},
error: function(json) {
$('#upload-button').html('确认上传').prop('disabled', '');
$('#upload-button').html(trans('skinlib.confirmUpload')).prop('disabled', '');
showAjaxError(json);
}
});
@ -251,7 +251,7 @@ function upload() {
function changeTextureName(tid) {
swal({
text: '请输入新的材质名称:',
text: trans('skinlib.inputTextureName'),
input: 'text',
showCancelButton: true,
inputValidator: function(value) {
@ -259,7 +259,7 @@ function changeTextureName(tid) {
if (value) {
resolve();
} else {
reject('你还没有填写名称哦');
reject(trans('user.emptyPlayerName'));
}
});
}
@ -285,7 +285,7 @@ function changeTextureName(tid) {
$('.private-label').click(function() {
var object = $(this);
swal({
text: '要将此材质设置为公开吗?',
text: trans('skinlib.warningPublic'),
type: 'warning',
showCancelButton: true
}).then(function() {
@ -303,9 +303,9 @@ function changePrivacy(tid) {
if (json.errno == 0) {
toastr.success(json.msg);
if (json.public == "0")
$('a:contains("设为隐私")').html('设为公开');
$('a:contains("' + trans('skinlib.setPrivate') + '")').html(trans('skinlib.setPublic'));
else
$('a:contains("设为公开")').html('设为隐私');
$('a:contains("' + trans('skinlib.setPublic') + '")').html(trans('skinlib.setPrivate'));
} else {
toastr.warning(json.msg);
}
@ -316,7 +316,7 @@ function changePrivacy(tid) {
function deleteTexture(tid) {
swal({
text: '真的要删除此材质吗?积分将会被返还',
text: trans('skinlib.warningDelete'),
type: 'warning',
showCancelButton: true
}).then(function() {

View File

@ -84,7 +84,7 @@ function showMsg(msg, type) {
}
function showAjaxError(json) {
showModal(json.responseText.replace(/\n/g, '<br />'), 'Fatal Error请联系作者', 'danger');
showModal(json.responseText.replace(/\n/g, '<br />'), trans('utils.fatalError'), 'danger');
}
function isMobile() {

View File

@ -5,5 +5,5 @@
@section('content')
<h1>403 Forbidden</h1>
<p>详细信息:{{ $exception->getMessage() ?: "你并没有权限查看此页面" }}</p>
<p>{{ trans('errors.details').$exception->getMessage() ?: trans('error.error403') }}</p>
@endsection

View File

@ -5,5 +5,5 @@
@section('content')
<h1>404 Not Found</h1>
<p>详细信息:{{ $exception->getMessage() ?: "这里啥都没有哦" }}</p>
<p>{{ trans('errors.details').$exception->getMessage() ?: trans('errors.error404') }}</p>
@endsection

View File

@ -3,7 +3,7 @@
@section('title', '503 Service Unavailable')
@section('content')
<h1>Be right back.</h1>
<h1>{{ trans('errors.be-right-back') }}</h1>
<p>详细信息:{{ $exception->getMessage() ?: "Application is now in maintenance mode." }}</p>
<p>{{ trans('errors.details').$exception->getMessage() ?: trans('errors.error503') }}</p>
@endsection

View File

@ -1,10 +1,10 @@
@extends('errors.general')
@section('title', '出现错误')
@section('title', trans('errors.error-occurred'))
@section('content')
<h1>出现了一些错误:</h1>
<h1>{{ trans('errors.some-errors') }}</h1>
<p>错误码: {{ $code }}</p>
<p>详细信息:{!! $message !!}</p>
<p>{{ trans('error.error-code').$code }}</p>
<p>{!! trans('error.details').$message !!}</p>
@endsection

View File

@ -1,12 +1,12 @@
@extends('errors.general')
@section('title', '出现错误')
@section('title', trans('errors.error-occurred'))
@section('content')
<h1>{{ $level }}: 出现了一些错误</h1>
<h1>{{ $level.': '.trans('errors.some-errors') }}</h1>
<p>详细信息:{{ $message }}</p>
<p>{{ trans('errors.details').$message }}</p>
<p>文件位置:<b>{{ $file }}: {{ $line }}</b></p>
<p>{{ trans('errors.file-location') }}<b>{{ $file }}: {{ $line }}</b></p>
@endsection

View File

@ -1,6 +1,6 @@
@extends('skinlib.master')
@section('title', '皮肤库')
@section('title', trans('general.skinlib'))
@section('content')
<!-- Full Width Column -->
@ -9,29 +9,29 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
皮肤库
{{ trans('general.skinlib') }}
<small>Skin Library</small>
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-tags"></i> 当前正显示</li>
<li><i class="fa fa-tags"></i> {{ trans('skinlib.index.now-showing') }}</li>
<li>
@if ($filter == "skin")
皮肤<small>(任意模型)</small>
{{ trans('general.skin') }}<small>{{ trans('skinlib.index.any-model') }}</small>
@elseif ($filter == "steve")
皮肤<small>Steve 模型)</small>
{{ trans('skinlib.index.any-model') }}<small>({{ trans('skinlib.index.steve-model') }})</small>
@elseif ($filter == "alex")
皮肤<small>Alex 模型)</small>
{{ trans('general.skin') }}<small>{{ trans('skinlib.index.alex-model') }}</small>
@elseif ($filter == "cape")
披风
{{ trans('general.cape') }}
@elseif ($filter == "user")
用户({{ (new App\Models\User($_GET['uid']))->getNickName() }})上传
{{ trans('skinlib.index.uploader', ['name' => (new App\Models\User($_GET['uid']))->getNickName()]) }}
@endif
</li>
<li class="active">
@if ($sort == "time")
最新上传
{{ trans('skinlib.index.newest-uploaded') }}
@elseif ($sort == "likes")
最多收藏
{{ trans('skinlib.index.most-likes') }}
@endif
</li>
</ol>
@ -46,7 +46,7 @@
@include('skinlib.item')
</a>
@empty
<p style="text-align: center; margin: 30px 0;">无结果</p>
<p style="text-align: center; margin: 30px 0;">{{ trans('skinlib.index.no-result') }}</p>
@endforelse
</div><!-- /.box-body -->
<div class="box-footer">
@ -77,7 +77,7 @@
@endfor
</select>
<p class="pull-right"> {{ $page }} 页,共 {{ $total_pages }} </p>
<p class="pull-right">{{ trans('general.pagination', ['page' => $page , 'total' => $total_pages]) }}</p>
</div>
</div><!-- /.box -->
</section><!-- /.content -->

View File

@ -12,17 +12,17 @@
@if (Session::has('uid'))
@if ($user->closet->has($texture['tid']))
<a title="从衣柜中移除" class="more like liked" tid="{{ $texture['tid'] }}" href="javascript:removeFromCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
<a title="{{ trans('skinlib.item.remove-from-closet') }}" class="more like liked" tid="{{ $texture['tid'] }}" href="javascript:removeFromCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
@else
<a title="添加至衣柜" class="more like" tid="{{ $texture['tid'] }}" href="javascript:addToCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
<a title="{{ trans('skinlib.item.add-to-closet') }}" class="more like" tid="{{ $texture['tid'] }}" href="javascript:addToCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
@endif
@else
<a title="请先登录" class="more like" href="javascript:;" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
<a title="{{ trans('skinlib.item.not-logged-in') }}" class="more like" href="javascript:;" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
@endif
@if ($texture['public'] == "0")
<small class="more private-label" tid="{{ $texture['tid'] }}">私密</small>
<small class="more private-label" tid="{{ $texture['tid'] }}">{{ trans('skinlib.item.private') }}</small>
@endif
</div>

View File

@ -29,40 +29,40 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="{{ url('skinlib') }}">皮肤库</a></li>
<li><a href="{{ url('user/closet') }}">我的衣柜</a></li>
<li class="active"><a href="{{ url('skinlib') }}">{{ trans('general.skinlib') }}</a></li>
<li><a href="{{ url('user/closet') }}">{{ trans('general.my-closet') }}</a></li>
@unless (isset($with_out_filter))
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-filter" aria-hidden="true"></i> 过滤器 <span class="caret"></span>
<i class="fa fa-filter" aria-hidden="true"></i> {{ trans('skinlib.master.filter') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=skin&sort={{ $sort }}'>皮肤<small>(任意模型)</small></a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=steve&sort={{ $sort }}'>皮肤<small>Steve 模型)</small></a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=alex&sort={{ $sort }}'>皮肤<small>Alex 模型)</small></a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=skin&sort={{ $sort }}'>{{ trans('general.skin') }}<small>{{ trans('skinlib.index.any-model') }}</small></a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=steve&sort={{ $sort }}'>{{ trans('general.skin') }}<small>({{ trans('skinlib.index.steve-model') }})</small></a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=alex&sort={{ $sort }}'>{{ trans('general.skin') }}<small>({{ trans('skinlib.index.alex-model') }})</small></a></li>
<li class="divider"></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=cape&sort={{ $sort }}'>披风</a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter=cape&sort={{ $sort }}'>{{ trans('general.cape') }}</a></li>
@if (!is_null($user))
<li class="divider"></li>
<li><a href="?filter=user&uid={{ $user->uid }}&sort={{ $sort }}">我的上传</a></li>
<li><a href="?filter=user&uid={{ $user->uid }}&sort={{ $sort }}">{{ trans('skinlib.master.my-upload') }}</a></li>
@endif
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-sort-amount-desc" aria-hidden="true"></i> 排序 <span class="caret"></span>
<i class="fa fa-sort-amount-desc" aria-hidden="true"></i> {{ trans('skinlib.master.sort') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter={{ $filter }}{{ isset($_GET['uid']) ? "&uid={$_GET['uid']}" : "" }}&sort=likes'>最多收藏</a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter={{ $filter }}{{ isset($_GET['uid']) ? "&uid={$_GET['uid']}" : "" }}&sort=likes'>{{ trans('skinlib.index.most-likes') }}</a></li>
<li class="divider"></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter={{ $filter }}{{ isset($_GET['uid']) ? "&uid={$_GET['uid']}" : "" }}&sort=time'>最新上传</a></li>
<li><a href='?{{ isset($_GET["q"]) ? "q=$q&" : "" }}filter={{ $filter }}{{ isset($_GET['uid']) ? "&uid={$_GET['uid']}" : "" }}&sort=time'>{{ trans('skinlib.index.newest-uploaded') }}</a></li>
</ul>
</li>
@endunless
</ul>
<form class="navbar-form navbar-left" role="search" action="{{ url('skinlib/search') }}">
<div class="form-group">
<input type="text" class="form-control" id="navbar-search-input" name="q" placeholder="搜索材质" value="{{ $q or '' }}" />
<input type="text" class="form-control" id="navbar-search-input" name="q" placeholder="{{ trans('skinlib.master.search-textures') }}" value="{{ $q or '' }}" />
</div>
</form>
</div><!-- /.navbar-collapse -->
@ -81,7 +81,7 @@
</ul>
</li>
<li><a href="{{ url('skinlib/upload') }}"><i class="fa fa-upload" aria-hidden="true"></i> 上传新皮肤</a></li>
<li><a href="{{ url('skinlib/upload') }}"><i class="fa fa-upload" aria-hidden="true"></i> {{ trans('skinlib.master.upload-new-skin') }}</a></li>
@if (!is_null($user))
<!-- User Account Menu -->
<li class="dropdown user user-menu">

View File

@ -1,6 +1,6 @@
@extends('skinlib.master')
@section('title', '搜索结果')
@section('title', trans('skinlib.search.title'))
@section('content')
<!-- Full Width Column -->
@ -9,7 +9,7 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
搜索结果:{{ $_GET['q'] or "未指定关键字" }}
{{ trans('skinlib.search.title') }}:{{ $_GET['q'] or "{{ trans('skinlib.search.no-given-keywords') }}" }}
<small>Skin Library</small>
</h1>
@ -19,24 +19,24 @@
<section class="content">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">当前正显示:
<small>过滤器:
<h3 class="box-title">{{ trans('skinlib.index.now-showing') }}:
<small>{{ trans('skinlib.master.filter') }}:
@if ($filter == "skin")
皮肤(任意模型)
{{ trans('general.skin').trans('skinlib.index.any-model') }}
@elseif ($filter == "steve")
皮肤Steve 模型)
{{ trans('general.skin').'('.trans('skinlib.index.steve-model').')' }}
@elseif ($filter == "alex")
皮肤Alex 模型)
{{ trans('general.skin').'('.trans('skinlib.index.alex-model').')' }}
@elseif ($filter == "cape")
披风
{{ trans('general.cape') }}
@endif
</small>
<small>,排序:
<small>,{{ trans('skinlib.master.sort') }}:
@if ($sort == "time")
最新上传
{{ trans('skinlib.index.newest-uploaded') }}
@elseif ($sort == "likes")
最多收藏
{{ trans('skinlib.index.most-likes') }}
@endif
</small>
</h3>
@ -47,7 +47,7 @@
@include('skinlib.item')
</a>
@empty
<p style="text-align: center; margin: 30px 0;">无结果</p>
<p style="text-align: center; margin: 30px 0;">{{ trans('skinlib.search.no-result') }}</p>
@endforelse
</div><!-- /.box-body -->
</div><!-- /.box -->

View File

@ -9,7 +9,7 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
材质详情
{{ trans('skinlib.show.title') }}
<small>Texture Details</small>
</h1>
</section>
@ -20,11 +20,11 @@
<div class="col-md-8">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title" style="width: 100%;">材质预览
<h3 class="box-title" style="width: 100%;">{{ trans('general.texture-preview') }}
<div class="operations">
<i data-toggle="tooltip" data-placement="bottom" title="行走" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="奔跑" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="旋转" class="fa fa-repeat"></i>
<i data-toggle="tooltip" data-placement="bottom" title="{{ trans('general.walk') }}" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="{{ trans('general.run') }}" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="{{ trans('general.rotation') }}" class="fa fa-repeat"></i>
</div>
</h3>
</div><!-- /.box-header -->
@ -33,17 +33,17 @@
</div><!-- /.box-body -->
<div class="box-footer">
@if (is_null($user))
<button disabled="disabled" title="登录后才能使用衣柜哦" class="btn btn-primary pull-right">添加至衣柜</button>
<button disabled="disabled" title="{{ trans('skinlib.show.login-before-using-closet') }}" class="btn btn-primary pull-right">{{ trans('skinlib.item.add-to-closet') }}</button>
@else
@if ($user->closet->has($texture->tid))
<a href="javascript:removeFromCloset({{ $texture->tid }});" id="{{ $texture->tid }}" class="btn btn-primary pull-right">从衣柜中移除</a>
<a href="javascript:removeFromCloset({{ $texture->tid }});" id="{{ $texture->tid }}" class="btn btn-primary pull-right">{{ trans('skinlib.item.remove-from-closet') }}</a>
@else
<a href="javascript:addToCloset({{ $texture->tid }});" id="{{ $texture->tid }}" class="btn btn-primary pull-right">添加至衣柜</a>
<a href="javascript:addToCloset({{ $texture->tid }});" id="{{ $texture->tid }}" class="btn btn-primary pull-right">{{ trans('skinlib.item.add-to-closet') }}</a>
@endif
@endif
<div class="btn likes" title="收藏人数" data-toggle="tooltip" data-placement="top"><i class="fa fa-heart"></i>
<div class="btn likes" title="{{ trans('skinlib.show.number-of-likes') }}" data-toggle="tooltip" data-placement="top"><i class="fa fa-heart"></i>
<span id="likes">{{ $texture->likes }}</span>
</div>
</div><!-- /.box-footer -->
@ -52,44 +52,44 @@
<div class="col-md-4">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">详细信息</h3>
<h3 class="box-title">{{ trans('skinlib.show.detail') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<table class="table">
<tbody>
<tr>
<td>名称</td>
<td>{{ trans('skinlib.show.name') }}</td>
<td id="name">{{ $texture->name }}
@if (!is_null($user) && ($texture->uploader == $user->uid || $user->is_admin))
<small>
<a href="javascript:changeTextureName({{ $texture->tid }});">修改名称</a>
<a href="javascript:changeTextureName({{ $texture->tid }});">{{ trans('skinlib.show.modify-name') }}</a>
</small>
@endif
</td>
</tr>
<tr>
<td>适用模型</td>
<td>{{ trans('skinlib.show.suitable-model') }}</td>
<td>{{ $texture->type }}</td>
</tr>
<tr>
<td>Hash
<i class="fa fa-question-circle" title="右键另存为即可下载原始皮肤文件" data-toggle="tooltip" data-placement="top"></i>
<i class="fa fa-question-circle" title="{{ trans('skinlib.show.download-raw') }}" data-toggle="tooltip" data-placement="top"></i>
</td>
<td>
<a href="{{ url('raw/'.$texture->tid) }}.png" title="{{ $texture->hash }}">{{ substr($texture->hash, 0, 15) }}...</a>
</td>
</tr>
<tr>
<td>文件大小</td>
<td>{{ trans('skinlib.show.size-of-file') }}</td>
<td>{{ $texture->size }} KB</td>
</tr>
<tr>
<td>上传者</td>
<td>{{ trans('skinlib.show.uploader') }}</td>
<?php $uploader = new App\Models\User($texture->uploader); ?>
<td><a href="{{ url('skinlib?filter=user&uid='.$uploader->uid) }}&sort=time">{{ $uploader->getNickName() }}</a></td>
</tr>
<tr>
<td>上传日期</td>
<td>{{ trans('skinlib.show.upload-at') }}</td>
<td>{{ $texture->upload_at }}</td>
</tr>
</tbody>
@ -101,35 +101,35 @@
@if ($texture->uploader == $user->uid)
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">删除材质 / 设置隐私</h3>
<h3 class="box-title">{{ trans('skinlib.show.delete-texture') }} / {{ trans('skinlib.show.change-privacy') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<p>材质设为隐私或被删除后将会从每一个收藏者的衣柜中移除。</p>
<p>{{ trans('skinlib.show.message') }}</p>
</div><!-- /.box-body -->
<div class="box-footer">
@if ($texture->public == "1")
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">设为隐私</a>
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">{{ trans('skinlib.show.set-private') }}</a>
@else
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">设为公开</a>
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">{{ trans('skinlib.show.set-public') }}</a>
@endif
<a href="javascript:deleteTexture({{ $texture->tid }});" class="btn btn-danger pull-right">删除材质</a>
<a href="javascript:deleteTexture({{ $texture->tid }});" class="btn btn-danger pull-right">{{ trans('skinlib.show.delete-texture') }}</a>
</div><!-- /.box-footer -->
</div><!-- /.box -->
@elseif ($user->is_admin)
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">管理员面板</h3>
<h3 class="box-title">{{ trans('general.admin-panel') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<p>你可以将此材质设为隐私或删除。这将会使此材质从每一个收藏者的衣柜中移除。</p>
<p>{{ trans('skinlib.show.set-message') }}</p>
</div><!-- /.box-body -->
<div class="box-footer">
@if ($texture->public == "1")
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">设为隐私</a>
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">{{ trans('skinlib.show.set-private') }}</a>
@else
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">设为公开</a>
<a href="javascript:changePrivacy({{ $texture->tid }});" class="btn btn-warning">{{ trans('skinlib.show.set-public') }}</a>
@endif
<a href="javascript:deleteTexture({{ $texture->tid }});" class="btn btn-danger pull-right">删除材质</a>
<a href="javascript:deleteTexture({{ $texture->tid }});" class="btn btn-danger pull-right">{{ trans('skinlib.show.delete-texture') }}</a>
</div><!-- /.box-footer -->
</div><!-- /.box -->
@endif
@ -141,7 +141,7 @@
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">评论区</h3>
<h3 class="box-title">{{ trans('skinlib.show.comment') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
@if (option('comment_script') != "")
@ -149,7 +149,7 @@
{!! Utils::getStringReplaced(option('comment_script'), ['{tid}' => $texture->tid, '{name}' => $texture->name, '{url}' => get_current_url()]) !!}
<!-- Comment End -->
@else
<p style="text-align: center; margin: 30px 0;">本站未开启评论服务</p>
<p style="text-align: center; margin: 30px 0;">{{ trans('skinlib.show.no-comment') }}</p>
@endif
</div><!-- /.box-body -->
</div><!-- /.box -->

View File

@ -1,6 +1,6 @@
@extends('skinlib.master')
@section('title', '上传材质')
@section('title', trans('skinlib.upload.title'))
@section('style')
<style>
@ -18,7 +18,7 @@ label[for="type-cape"] {
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
上传材质
{{ trans('skinlib.upload.title') }}
<small>Upload Texture</small>
</h1>
</section>
@ -29,28 +29,28 @@ label[for="type-cape"] {
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">上传</h3>
<h3 class="box-title">{{ trans('skinlib.upload.upload') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="form-group">
<label for="name">材质名称</label>
<input id="name" class="form-control" type="text" placeholder="材质名称应该小于 32 个字节且不能包含奇怪的符号" />
<label for="name">{{ trans('skinlib.upload.texture-name') }}</label>
<input id="name" class="form-control" type="text" placeholder="{{ trans('skinlib.upload.name-message') }}" />
</div>
<div class="form-group">
<label>材质类型</label>
<label>{{ trans('skinlib.upload.texture-type') }}</label>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-xs-4">
<label for="type-skin">
<input type="radio" name="type" id="type-skin"> 皮肤
<input type="radio" name="type" id="type-skin"> {{ trans('general.skin') }}
</label>
</div>
<div class="col-xs-8">
<select class="form-control" id="skin-type" style="display: none;">
<option value="steve">Steve 模型</option>
<option value="alex">Alex 模型</option>
<option value="steve">{{ trans('skinlib.index.steve-model') }}</option>
<option value="alex">{{ trans('skinlib.index.alex-model') }}</option>
</select>
</div>
</div>
@ -59,7 +59,7 @@ label[for="type-cape"] {
<div class="col-md-6">
<label for="type-cape">
<input type="radio" name="type" id="type-cape"> 披风
<input type="radio" name="type" id="type-cape"> {{ trans('general.cape') }}
</label>
</div>
</div>
@ -67,31 +67,31 @@ label[for="type-cape"] {
</div>
<div class="form-group">
<label for="file">选择文件</label>
<label for="file">{{ trans('skinlib.upload.choose-file') }}</label>
<input id="file" type="file" data-show-upload="false" data-language="zh" class="file" accept="image/png" />
</div>
<div class="callout callout-info" id="msg" style="display: none;">
<p>私密材质将会消耗更多的积分:每 KB 存储空间 {{ option('private_score_per_storage') }} 积分</p>
<p>{{ trans('skinlib.upload.storage-message', ['score' => option('private_score_per_storage')]) }}</p>
</div>
</div><!-- /.box-body -->
<div class="box-footer">
<label for="private" class="pull-right" title="其他人将不会在皮肤库中看到此材质" data-placement="top" data-toggle="tooltip">
<input id="private" type="checkbox"> 设置为私密材质
<label for="private" class="pull-right" title="{{ trans('skinlib.upload.privacy-message') }}" data-placement="top" data-toggle="tooltip">
<input id="private" type="checkbox"> {{ trans('skinlib.upload.set-private') }}
</label>
<button id="upload-button" onclick="upload()" class="btn btn-primary">确认上传</button>
<button id="upload-button" onclick="upload()" class="btn btn-primary">{{ trans('skinlib.upload.button') }}</button>
</div>
</div><!-- /.box -->
</div>
<div class="col-md-6">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title" style="width: 100%;">材质预览
<h3 class="box-title" style="width: 100%;">{{ trans('general.texture-preview') }}
<div class="operations">
<i data-toggle="tooltip" data-placement="bottom" title="行走" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="奔跑" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="旋转" class="fa fa-repeat"></i>
<i data-toggle="tooltip" data-placement="bottom" title="{{ trans('general.walk') }}" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="{{ trans('general.run') }}" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="{{ trans('general.rotation') }}" class="fa fa-repeat"></i>
</div>
</h3>
</div><!-- /.box-header -->