Skip to content

Add Chinese language #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .gitlab/issue_templates/Default_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## 概述

(简要总结遇到的 bug)

## 重现步骤

(如何重现该问题 - 这一点非常重要)

## 当前错误行为是什么?

(实际发生了什么)

## 预期的正确行为是什么?

(应该看到什么)

## 相关日志和/或截图

(粘贴任何相关日志 - 使用代码块 (```) 格式化控制台输出、日志和代码,否则很难阅读。)

## 可能的修复方案

如果可以,链接到可能导致问题的代码行)

/label ~"T: bug 🐛"

/cc @pco
/assign @pco
16 changes: 16 additions & 0 deletions .gitlab/issue_templates/Feature_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## 概述

(简要总结该功能)

## 功能范围

(用户故事是什么?验收标准是什么?)

## 技术范围

(技术范围是什么?架构是什么?技术验收标准是什么?)

/label ~"T: feature ✨"

/cc @pco
/assign @pco
7 changes: 7 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Axelor Utils

Axelor Utils 是 AOP Addons 生态系统中的一个独立模块。

## 安装

此模块可以作为一个完整的Gradle项目使用。您可以克隆它,运行测试以验证工具,并在支持Gradle的IDE中打开它。
16 changes: 16 additions & 0 deletions SECURITY_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 报告安全问题

要报告安全漏洞,请将报告发送到 [[email protected]](mailto:[email protected])。

此地址可用于所有Axelor的产品。请勿通过此渠道报告对安全性无影响的错误。

在报告的描述中,请提供以下信息:

- 重现漏洞的详细步骤(POC 脚本、截图和日志都非常有帮助)。
- 漏洞的影响描述。
- 漏洞如何影响项目使用。
- 受影响的版本。

在提交时,请移除或混淆任何私有数据。

提交后,安全团队将调查漏洞,确定其影响和严重性,并通知报告人。
83 changes: 83 additions & 0 deletions changelogs/README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
## 变更内容

#### 概述

`unreleased` 文件夹包含所有尚未发布的变更内容。

在发布时,所有未发布的变更内容将合并到最终的 CHANGELOG.md 文件中。

#### 变更条目格式

在 `changelogs/unreleased` 下创建一个新文件。

该文件应为 YAML 格式,如下所示:

````yaml
---
title: 一些文本
type: feature
description: |
这里是一些描述 包含更多详细信息。

以及关于破坏性变更 和迁移步骤的说明。

```
$ find -iregex ".*domains.*.xml" | xargs -l sed -i 's|cachable="|cacheable="|g'
```
````

`title` 描述条目。

`type` 可以是:
* **feature** 表示新功能。
* **change** 表示现有功能的更改。
* **deprecate** 表示即将移除的功能。
* **remove** 表示已移除的功能。
* **fix** 表示任何 bug 修复。
* **security** 表示安全漏洞修复。

`description` 是可选的,应该提供关于更改的详细描述,包括迁移步骤(如果有)。

#### 如何判断是否需要新的变更内容条目

**除了少数特殊情况外,您无需为在 wip 分支中修复的问题添加变更内容条目。**

变更内容需要列出从上一版本到当前版本的更改。当版本处于开发阶段时,新功能可能会引入回归问题。如果我们在版本发布前修复了这些回归问题,那么这些 bug 将不会出现在任何已发布的版本中,因此修复记录不需要出现在变更内容中。但如果我们在修复已发布的版本中的 bug,则必须添加变更内容条目。

### 如何选择条目的类型

- **如果您在 dev 分支上,大多数情况下类型是 `fix` 或 `change`。**
- **如果您在 wip 分支上,类型可以是 `change` 或 `feature`(参见上文)。**

`change` 属于当前的“改进”部分:在现有类中添加一个简单字段不是新功能,而是更改。

dev分支上的新功能和wip分支上的修复等特殊情况下可能存在,但应仅在少数情况下发生。

### 变更内容关注应用程序的使用

**不要使用技术字段名称。** 您必须写明更改对应用程序用户的影响。
任何关于更改的技术信息可以在需要时写入提交消息,但在变更内容中应尽量避免。

例如,不要写:

> 当 statusSelect 等于 `STATUS_CANCELED` 时,将 typeSelect 的 hidden 属性更新为 true。

而应写:

> 在发票表单视图中,隐藏取消的发票类型。

#### 生成 CHANGELOG.md

要使用未发布的条目生成 `CHANGELOG.md`,请运行以下Gradle任务:
```
./gradlew generateChangeLog
```

未发布的条目也将自动从 `changelogs/unreleased` 中删除。

可以使用 `--preview` 参数预览生成的变更内容,而不删除或更新文件。

#### 参考资料

* [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Gitlab: 如何解决CHANGELOG冲突](https://about.gitlab.com/2018/07/03/solving-gitlabs-changelog-conflict-crisis/)
5 changes: 5 additions & 0 deletions changelogs/unreleased/add-chinese-language.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Add Chinese language
type: feature
description: |
Add Chinese language to README.md, *.csv, and other files.
34 changes: 34 additions & 0 deletions src/main/resources/i18n/messages_zh.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"key","message","comment","context"
"AOS API calls are disabled, please contact your administrator. The property utils.api.enable is false in application.properties.","AOS API调用已禁用,请联系管理员。application.properties中的属性utils.api.enable为false。",,
"An error occurred with the following message : %s","发生错误,错误信息如下:%s",,
"An error occurs while opening the connection. Please verify the following URL : %s.","打开连接时发生错误。请验证以下URL:%s。",,
"Can not opening the connection to a empty URL.","无法打开空URL的连接。",,
"Cannot find record #%s","无法找到记录#%s",,
"Code","代码",,
"Computation in progress...","计算正在进行中...",,
"Error executing query: %s","执行查询时出错:%s",,
"Error while searching null title from following selection: '%s'.","从以下选择中搜索空标题时出错:« %s »。",,
"Given couple %s / %s match a value which is not an integer.","给定的配对 %s / %s 匹配的值不是一个整数。",,
"Meta json field type %s could not be converted to a meta field type.","元JSON字段类型 %s 无法转换为元字段类型。",,
"Name","名称",,
"No such template","没有这样的模板",,
"No title found for the view '%s'.","没有找到视图 « %s » 的标题。",,
"Null given value.","给定的值为空。",,
"Record Id","记录ID",,
"Record Name","记录名称",,
"Selection '%s' is not an integer one or is wrongly defined.","选择 « %s » 不是一个整数选择或定义错误。",,
"Templating can not be empty","模板不能为空",,
"The collection of IDs cannot be null.","ID集合不能为空。",,
"The consumer cannot be null.","消费者不能为空。",,
"The object","对象",,
"The parameter copyNumber should be superior to 0.","参数copyNumber应大于0。",,
"The process was stopped because the computation might be stuck in an infinite loop.","由于计算可能陷入无限循环,进程已停止。",,
"This field needs to be unique.","此字段需要唯一。",,
"Type %s could not be converted to json type.","类型 %s 无法转换为JSON类型。",,
"Unknown selection and title pair: '%s' / '%s'.","未知的选择和标题配对:« %s » / « %s »。",,
"Unknown selection and value pair: '%s' / '%s'.","未知的选择和值配对:« %s » / « %s »。",,
"Unknown selection: '%s'.","未知的选择:« %s »",,
"Url %s is malformed.","URL %s 格式不正确。",,
"Years in 360 days","以360天为一年计算",,
"has been correctly created with the id :","已使用ID正确创建:",,
"has been created","已创建",,