ComposerUpdate 增加英文语言包

This commit is contained in:
Anyon 2019-12-30 15:11:36 +08:00
parent 7c8a2b56d3
commit 8ea11bab22
5 changed files with 43 additions and 15 deletions

8
composer.lock generated
View File

@ -909,12 +909,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "53c8d243412a6fafe4cec8aaf6795bea04455b78"
"reference": "cc6078bda8b769fee0f694c1ccd19aa66e61a6cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/53c8d243412a6fafe4cec8aaf6795bea04455b78",
"reference": "53c8d243412a6fafe4cec8aaf6795bea04455b78",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/cc6078bda8b769fee0f694c1ccd19aa66e61a6cf",
"reference": "cc6078bda8b769fee0f694c1ccd19aa66e61a6cf",
"shasum": "",
"mirrors": [
{
@ -958,7 +958,7 @@
],
"description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top",
"time": "2019-12-30T06:41:04+00:00"
"time": "2019-12-30T07:02:34+00:00"
},
{
"name": "zoujingli/wechat-developer",

View File

@ -935,12 +935,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "53c8d243412a6fafe4cec8aaf6795bea04455b78"
"reference": "cc6078bda8b769fee0f694c1ccd19aa66e61a6cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/53c8d243412a6fafe4cec8aaf6795bea04455b78",
"reference": "53c8d243412a6fafe4cec8aaf6795bea04455b78",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/cc6078bda8b769fee0f694c1ccd19aa66e61a6cf",
"reference": "cc6078bda8b769fee0f694c1ccd19aa66e61a6cf",
"shasum": "",
"mirrors": [
{
@ -956,7 +956,7 @@
"ext-json": "*",
"topthink/framework": "^6.0"
},
"time": "2019-12-30T06:41:04+00:00",
"time": "2019-12-30T07:02:34+00:00",
"type": "library",
"extra": {
"think": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2019-12-30 14:53:03
// This file is automatically generated at:2019-12-30 15:11:18
declare (strict_types = 1);
return array (
0 => 'think\\app\\Service',

View File

@ -19,6 +19,7 @@ use think\admin\service\AdminService;
use think\middleware\SessionInit;
use think\Request;
use think\Service;
use function Composer\Autoload\includeFile;
/**
* 模块注册服务
@ -33,9 +34,8 @@ class Library extends Service
public function register()
{
// 读取中文语言
if ($this->app->lang->getLangSet() === 'zh-cn') {
$this->app->lang->load(__DIR__ . '/lang/zh-cn.php', 'zh-cn');
}
$this->app->lang->load(__DIR__ . '/lang/zh-cn.php', 'zh-cn');
$this->app->lang->load(__DIR__ . '/lang/en-us.php', 'en-us');
// 判断访问模式
if ($this->app->request->isCli()) {
if (empty($_SERVER['REQUEST_URI']) && isset($_SERVER['argv'][1])) {
@ -68,9 +68,8 @@ class Library extends Service
}, 'route');
}
// 动态加入应用函数
foreach (glob($this->app->getAppPath() . '*/sys.php') as $file) {
\Composer\Autoload\includeFile($file);
}
$syspath = "{$this->app->getAppPath()}*/sys.php";
foreach (glob($syspath) as $file) includeFile($file);
}
/**

View File

@ -0,0 +1,29 @@
<?php
// +----------------------------------------------------------------------
// | Library for ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2020 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: https://gitee.com/zoujingli/ThinkLibrary
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | gitee 仓库地址 https://gitee.com/zoujingli/ThinkLibrary
// | github 仓库地址 https://github.com/zoujingli/ThinkLibrary
// +----------------------------------------------------------------------
return [
'think_library_not_auth' => 'Sorry, no permission to access the operation.',
'think_library_not_login' => 'Sorry, requiring login to obtain view permission.',
'think_library_delete_success' => 'Congratulation! Data deletion completed.',
'think_library_delete_error' => 'Sorry, data deletion failed, please try again later.',
'think_library_form_success' => 'Congratulation! Data saving completed.',
'think_library_form_error' => 'Sorry, data saving failed, please try again later.',
'think_library_save_success' => 'Congratulation! Data update completed.',
'think_library_save_error' => 'Sorry, Data update failed, please try again later.',
'think_library_sort_success' => 'Congratulation! Modification of list sort completed.',
'think_library_sort_error' => 'Sorry, modification of list sort failed, please try again later.',
'think_library_page_html' => 'total %s records, display %s per page, total %s page current display %s page.',
'think_library_csrf_error' => 'Form token validation failed, please refresh and try again later.',
];