Fix translation of getting textures

This commit is contained in:
printempw 2017-08-07 13:48:20 +08:00
parent 4bf0de92c5
commit 231a91e367
6 changed files with 8 additions and 8 deletions

View File

@ -171,10 +171,10 @@ class TextureController extends Controller
if (Storage::disk('textures')->has($t->hash)) {
return Response::png(Storage::disk('textures')->get($t->hash));
} else {
abort(404, '请求的材质文件已经被删除');
abort(404, trans('general.texture-deleted'));
}
} else {
abort(404, '材质不存在');
abort(404, trans('skinlib.non-existent'));
}
}
@ -184,10 +184,10 @@ class TextureController extends Controller
$player = Player::where('player_name', $player_name)->first();
if (!$player)
abort(404, '角色不存在');
abort(404, trans('general.unexistent-player'));
if ($player->isBanned())
abort(404, '该角色拥有者已被本站封禁。');
abort(404, trans('general.player-banned'));
return $player;
}

View File

@ -202,7 +202,7 @@ class UserController extends Controller
return json(trans('user.profile.avatar.success'), 0);
}
} else {
return json(trans('user.profile.avatar.non-existent'), 1);
return json(trans('skinlib.non-existent'), 1);
}
}

View File

@ -45,7 +45,8 @@ private: Private
public: Public
unexistent-user: Un-existent user
unexistent-player: Un-existent player.
unexistent-player: Un-existent player
player-banned: The owner of this player has been banned
texture-deleted: The requested texture has been deleted.
texture-not-uploaded: The user haven not uploaded the texture of :type model yet.

View File

@ -105,7 +105,6 @@ profile:
title: Change Avatar?
notice: Click the gear icon「<i class="fa fa-cog"></i>」of any skin in your skinlib, then click 「Set as avatar」. We will cut the head segment of that skin for you. If there is no icon like this, please unable the extensions like ADBlock.
wrong-type: You can't set a cape as avatar
non-existent: Non-existent texture
success: Avatar setted successfully
password:

View File

@ -46,6 +46,7 @@ public: 公开
unexistent-user: 不存在的用户
unexistent-player: 角色不存在
player-banned: 该角色拥有者已被本站封禁
texture-deleted: 请求的材质已被删除
texture-not-uploaded: 该用户尚未上传请求的材质类型 :type

View File

@ -112,7 +112,6 @@ profile:
title: 更改头像?
notice: 请在衣柜中任意皮肤的右下角「<i class="fa fa-cog"></i>」处选择「设为头像」,将会自动截取该皮肤的头部作为头像哦~ 如果看不到这个图标,请关闭 ADBlockABP 之类的广告过滤扩展。
wrong-type: 披风可不能设置为头像哦~
non-existent: 材质不存在。
success: 设置成功!
password: