Merge pull request #19 from deepziyu/doc

add 翻译术语
This commit is contained in:
cuiliang
2017-09-22 22:12:31 -05:00
committed by GitHub
3 changed files with 153 additions and 5 deletions

View File

@ -1 +1,149 @@
## 排版规范
> info : 没有写
## 翻译对照列表
### A
- Action 动作
- Active Record 活动记录
- Aliase 别名
- Array 数组
- Argument 参数
- Assets 前端资源
- Authorization 用户认证
### B
- Behavior 行为
### C
- Cache 缓存
- Callback 回调
- Classes 类
- CLI 命令行界面
- Command 命令
- Command Line 命令行
- Component 组件
- Console 终端
- Controller 控制器
- Controller Action 控制器动作
- constructor 构造函数
- Cookie (不翻)
- Composer (开源项目名称,不翻)
- Closure 闭包
- Configuration 配置信息
### D
- Database-Transactions 数据库事务
- Dependency 依赖
- Driver 驱动
- Dependency Injection 依赖注入
### E
- Event 事件
- Extend 拓展/继承
- Extension 扩展
- Exception 异常
### F
- Framework 框架
- Filter 过滤器
- Form 表单
- Function 函数
### G
- Guide 指南
### H
- Helper 辅助函数(类)
- Hash 哈希 (可不翻)
- Header 标头
### I
- Instance 实例
- inheritance 继承
- implements 实现
### K
- Key 键
### M
- Method 方法
- Migration 迁移
- Model 模型
- Module 模块
### N
- Namespace 命名空间
### O
- Object 对象
### P
- Package 扩展包
- Packagist (开源项目名称,不翻)
- Prefix 前缀
- Propertie 属性
### Q
- Queue 队列
- Query Builder 查询生成器
### R
- Routing 引导路由
- Request 请求
- Response 响应
- Resolved 解析
- Redirect 重定向
- (Database's) Rollback 还原
### S
- Schema 数据库结构
- Service 服务
- Service Locator 服务定位器
- Session 会话 (可不翻)
### T
- Tag 标签
- Table 数据表
- Templates 模板
- Terminal 终端
- Token 令牌
- Timestamps 时间戳
- Trait (不翻)
- Ternary statement 三元运算符
- Throw (Exception) 拋出(异常)
### V
- Vagrant (开源项目名称,不翻)
- Vagrant Box (开源项目名称,不翻)
- View 视图
- Vendor 供应商
-
### W
- Widget 小部件

View File

@ -78,7 +78,7 @@ return [
后者指定了整个[应用](structure-applications.md)如何初始化。
请参考[配置](concept-configurations.md)章节了解更多信息。
If you need to work with databases support for which isn't bundled with Yii, check the following extensions:
如果想要使用 Yii 没有捆绑支持的数据库,你可以查看以下插件:
- [Informix](https://github.com/edgardmessias/yii2-informix)
- [IBM DB2](https://github.com/edgardmessias/yii2-ibm-db2)

View File

@ -58,8 +58,8 @@
有时你想在每个请求处理过程都实例化某个组件即便它不会被访问,
可以将该组件ID加入到应用主体的 [[yii\base\Application::bootstrap|bootstrap]] 属性中。
You can also use Closures to bootstrap customized components. Returning a instantiated component is not
required. A Closure can also be used simply for running code after [[yii\base\Application]] instantiation.
你还可以使用闭包来引导启动自定义的组件。不需要直接返回一个实例化的组件。
在应用主体 [[yii\base\Application]] 实例化后,闭包也会被调用。
例如, 如下的应用主体配置保证了 `log` 组件一直被加载。
@ -71,13 +71,13 @@ required. A Closure can also be used simply for running code after [[yii\base\Ap
return new ComponentX();
},
function($app){
// some code
// 可以写自定义的代码
return;
}
],
'components' => [
'log' => [
// configuration for "log" component
// "log" 组件的配置
],
],
]