klion26 commented on a change in pull request #394:
URL: https://github.com/apache/flink-web/pull/394#discussion_r524888684



##########
File path: contributing/code-style-and-quality-common.zh.md
##########
@@ -1,14 +1,14 @@
 ---
-title:  "Apache Flink Code Style and Quality Guide  — Common Rules"
+title:  "Apache Flink 代码样式和质量指南  — 通用规则"
 ---
 
 {% include code-style-navbar.zh.md %}
 
 {% toc %}
 
-## 1. Copyright
+## 1. 版权
 
-Each file must include the Apache license information as a header.
+每个文件的头部必须包含Apache许可信息。

Review comment:
       ```suggestion
   每个文件的头部必须包含 Apache 许可信息。
   ```

##########
File path: contributing/code-style-and-quality-common.zh.md
##########
@@ -30,95 +30,95 @@ Each file must include the Apache license information as a 
header.
  */
 ```
 
-## 2. Tools
+## 2. 工具
 
-We recommend to follow the [IDE Setup 
Guide](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#checkstyle-for-java)
 to get IDE tooling configured.
+我们建议你按照 [IDE 
设置指南](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#checkstyle-for-java)
 配置 IDE 工具。
 
 
 <!---
-### Use inspections in IntelliJ
+### 在IntelliJ中使用检查

Review comment:
       ```suggestion
   ### 在 IntelliJ 中使用检查
   ```
   

##########
File path: contributing/code-style-and-quality-common.zh.md
##########
@@ -30,95 +30,95 @@ Each file must include the Apache license information as a 
header.
  */
 ```
 
-## 2. Tools
+## 2. 工具

Review comment:
       翻译标题需要添加 `<a>` 标签,可以参考 
[wiki](https://cwiki.apache.org/confluence/display/FLINK/Flink+Translation+Specifications)
 第 4 节

##########
File path: contributing/code-style-and-quality-common.zh.md
##########
@@ -137,186 +137,182 @@ the main path
 ```
 
 
-## 4. Design and Structure
+## 4. 设计和结构
 
-While it is hard to exactly specify what constitutes a good design, there are 
some properties that can serve as a _litmus test_ for a good design. If these 
properties are given, the chances are good that the design is going into a good 
direction. If these properties cannot be achieved, there is a high probability 
that the design is flawed.
+虽然很难确切地指定一个好的设计是由什么构成的,但是有一些属性可以作为好的设计的试金石。如果设计上拥有这些属性,那么就有可能得到好的发展。否则,设计就很有可能存在缺陷。
 
 
-### Immutability and Eager Initialization
+### 不变性(Immutability)和急切初始化(Eager Initialization)
 
-1. Try to use immutable types where possible, especially for APIs, messages, 
identifiers, properties, configuration, etc.
-2. A good general approach is to try and make as many fields of a class 
`final` as possible.
-3. Classes that are used as keys in maps should be strictly immutable and only 
have `final` fields (except maybe auxiliary fields, like lazy cached hash 
codes).
-4. Eagerly initialize classes. There should be no `init()` or `setup()` 
methods. Once the constructor completes, the object should be usable.
+1. 尽可能尝试使用不可变类型,尤其是 API、消息、标识符、属性、配置等等。
+2. 一个好的通用方法是尽可能地将类中的字段设置为 `final`。
+3. 在 map 中作为 key 的类应该是严格不可变的,并且只有 final 字段(可能除了辅助的字段,如延迟缓存的 hash code)。

Review comment:
       hash codes 有更好的翻译吗

##########
File path: contributing/code-style-and-quality-common.zh.md
##########
@@ -137,186 +137,182 @@ the main path
 ```
 
 
-## 4. Design and Structure
+## 4. 设计和结构
 
-While it is hard to exactly specify what constitutes a good design, there are 
some properties that can serve as a _litmus test_ for a good design. If these 
properties are given, the chances are good that the design is going into a good 
direction. If these properties cannot be achieved, there is a high probability 
that the design is flawed.
+虽然很难确切地指定一个好的设计是由什么构成的,但是有一些属性可以作为好的设计的试金石。如果设计上拥有这些属性,那么就有可能得到好的发展。否则,设计就很有可能存在缺陷。
 
 
-### Immutability and Eager Initialization
+### 不变性(Immutability)和急切初始化(Eager Initialization)
 
-1. Try to use immutable types where possible, especially for APIs, messages, 
identifiers, properties, configuration, etc.
-2. A good general approach is to try and make as many fields of a class 
`final` as possible.
-3. Classes that are used as keys in maps should be strictly immutable and only 
have `final` fields (except maybe auxiliary fields, like lazy cached hash 
codes).
-4. Eagerly initialize classes. There should be no `init()` or `setup()` 
methods. Once the constructor completes, the object should be usable.
+1. 尽可能尝试使用不可变类型,尤其是 API、消息、标识符、属性、配置等等。
+2. 一个好的通用方法是尽可能地将类中的字段设置为 `final`。
+3. 在 map 中作为 key 的类应该是严格不可变的,并且只有 final 字段(可能除了辅助的字段,如延迟缓存的 hash code)。
+4. 急切初始化类。不应该有 `init()` 或 `setup()` 方法。构造函数完成后,对象应该就可用。

Review comment:
       Eagerly initialize 感觉翻译成 `急切` 有点奇怪的样子...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to