Skip to content

Commit 078db73

Browse files
committed
docs: translate for internationalization PowerJob#152
2 parents 43ca058 + 2da5fc6 commit 078db73

File tree

35 files changed

+419
-220
lines changed

35 files changed

+419
-220
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Application password: 123
5858
| Distributed strategy | Unsupported | Static sharding | MapReduce dynamic sharding | **MapReduce dynamic sharding** |
5959
| Online task management | Unsupported | Supported | Supported | **Supported** |
6060
| Online logging | Unsupported | Supported | Unsupported | **Supported** |
61-
| Scheduling methods and performance | Based on database lock, there is a performance bottleneck | Based on database lock, there is a performance bottleneck | Unknown | **Lock-free design, powerful performance without upper limit** |
61+
| Scheduling methods and performance | Based on database lock, there is a performance bottleneck | Based on database lock, there is a performance bottleneck | Unknown | **Lock-free design, high performance without upper limit** |
6262
| Alarm monitoring | Unsupported | Email | SMS | **Email, WebHook, DingTalk. An interface is provided for customization.** |
6363
| System dependence | Any relational database (MySQL, Oracle ...) supported by JDBC | MySQL | RMB (Public Beta version for free, hey, helping to promote) | **Any relational database (MySQL, Oracle ...) supported by Spring Data Jpa** |
6464
| workflow | Unsupported | Unsupported | Supported | **Supported** |

pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<testTarget>${java.version}</testTarget>
8888
</configuration>
8989
</plugin>
90-
<!-- 打包源码 -->
90+
<!-- Package source codes -->
9191
<plugin>
9292
<groupId>org.apache.maven.plugins</groupId>
9393
<artifactId>maven-source-plugin</artifactId>
@@ -121,9 +121,9 @@
121121
<artifactId>maven-javadoc-plugin</artifactId>
122122
<version>${maven-javadoc-plugin.version}</version>
123123
<configuration>
124-
<!-- JavaDoc 编译错误不影响正常构建 -->
124+
<!-- Prevent JavaDoc error from affecting building project. -->
125125
<failOnError>false</failOnError>
126-
<!-- 非严格模式...以后要好好按格式写注释啊... -->
126+
<!-- Non-strict mode -->
127127
<additionalJOption>-Xdoclint:none</additionalJOption>
128128
</configuration>
129129
<executions>
@@ -164,7 +164,7 @@
164164
</distributionManagement>
165165
</profile>
166166

167-
<!-- 本地使用 -->
167+
<!-- Local profile -->
168168
<profile>
169169
<id>dev</id>
170170
<activation>
@@ -173,7 +173,7 @@
173173

174174
<build>
175175
<plugins>
176-
<!-- 编译插件 -->
176+
<!-- Maven compiler plugin -->
177177
<plugin>
178178
<groupId>org.apache.maven.plugins</groupId>
179179
<artifactId>maven-compiler-plugin</artifactId>
@@ -185,7 +185,7 @@
185185
<testTarget>${java.version}</testTarget>
186186
</configuration>
187187
</plugin>
188-
<!-- 编辑 MANIFEST.MF -->
188+
<!-- Edit MANIFEST.MF -->
189189
<plugin>
190190
<groupId>org.apache.maven.plugins</groupId>
191191
<artifactId>maven-jar-plugin</artifactId>

powerjob-client/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<version>${powerjob.common.version}</version>
3838
</dependency>
3939

40-
<!-- Junit 测试 -->
40+
<!-- Junit tests -->
4141
<dependency>
4242
<groupId>org.junit.jupiter</groupId>
4343
<artifactId>junit-jupiter-api</artifactId>

powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/OhMyClient.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import static com.github.kfcfans.powerjob.client.TypeStore.*;
2626

2727
/**
28-
* OpenAPI 客户端
28+
* OhMyClient, the client for OpenAPI.
2929
*
3030
* @author tjq
3131
* @since 2020/4/15
@@ -40,19 +40,19 @@ public class OhMyClient {
4040
private static final String URL_PATTERN = "http://%s%s%s";
4141

4242
/**
43-
* 初始化 OhMyClient 客户端
43+
* Init OhMyClient with domain, appName and password.
4444
* @param domain 比如 www.powerjob-server.com(内网域名,自行完成 DNS & Proxy)
45-
* @param appName 负责的应用名称
45+
* @param appName name of the application
4646
*/
4747
public OhMyClient(String domain, String appName, String password) {
4848
this(Lists.newArrayList(domain), appName, password);
4949
}
5050

5151

5252
/**
53-
* 初始化 OhMyClient 客户端
54-
* @param addressList IP:Port 列表
55-
* @param appName 负责的应用名称
53+
* nit OhMyClient with server address, appName and password.
54+
* @param addressList IP:Port address list
55+
* @param appName name of the application
5656
*/
5757
public OhMyClient(List<String> addressList, String appName, String password) {
5858

@@ -199,7 +199,7 @@ public ResultDTO<Long> runJob(Long jobId) throws PowerJobException {
199199
return runJob(jobId, null, 0);
200200
}
201201

202-
/* ************* Instance ************* */
202+
/* ************* Instance API list ************* */
203203
/**
204204
* 停止应用实例
205205
* @param instanceId 应用实例ID
@@ -275,7 +275,7 @@ public ResultDTO<InstanceInfoDTO> fetchInstanceInfo(Long instanceId) throws Powe
275275
return JSONObject.parseObject(post, INSTANCE_RESULT_TYPE);
276276
}
277277

278-
/* ************* Workflow ************* */
278+
/* ************* Workflow API list ************* */
279279
/**
280280
* 保存工作流(包括创建和修改)
281281
* @param request 创建/修改 Workflow 请求
@@ -374,7 +374,7 @@ public ResultDTO<Long> runWorkflow(Long workflowId) throws PowerJobException {
374374
return runWorkflow(workflowId, null, 0);
375375
}
376376

377-
/* ************* Workflow Instance ************* */
377+
/* ************* Workflow Instance API list ************* */
378378
/**
379379
* 停止应用实例
380380
* @param wfInstanceId 工作流实例ID

powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/TypeStore.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.github.kfcfans.powerjob.common.response.*;
55

66
/**
7-
* 类型工厂
7+
* TypeReference store.
88
*
99
* @author tjq
1010
* @since 11/7/20

powerjob-client/src/test/java/TestClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import java.util.concurrent.TimeUnit;
1313

1414
/**
15-
* 测试 Client
15+
* Test cases for {@link OhMyClient}
1616
*
1717
* @author tjq
1818
* @since 2020/4/15
@@ -110,7 +110,7 @@ public void testCancelInstanceInDatabase() throws Exception {
110110
ResultDTO<Long> startRes = ohMyClient.runJob(15L, "start by OhMyClient", 2000000);
111111
System.out.println("runJob result: " + JSONObject.toJSONString(startRes));
112112

113-
// 手动重启 server,干掉时间轮中的调度数据
113+
// Restart server manually and clear all the data in time wheeler.
114114
TimeUnit.MINUTES.sleep(1);
115115

116116
ResultDTO<Void> cancelRes = ohMyClient.cancelInstance(startRes.getData());

powerjob-client/src/test/java/TestWorkflow.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.util.List;
1414

1515
/**
16-
* 测试 Client(workflow部分)
16+
* Test cases for {@link OhMyClient} workflow.
1717
*
1818
* @author tjq
1919
* @since 2020/6/2

powerjob-common/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<version>${commons.io.version}</version>
7777
</dependency>
7878

79-
<!-- Junit 测试 -->
79+
<!-- Junit tests -->
8080
<dependency>
8181
<groupId>org.junit.jupiter</groupId>
8282
<artifactId>junit-jupiter-api</artifactId>
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
package com.github.kfcfans.powerjob.common;
22

33
/**
4-
* 容器常量
4+
* Container constants.
55
*
66
* @author tjq
77
* @since 2020/5/15
88
*/
99
public class ContainerConstant {
1010

1111
/**
12-
* spring-context 配置文件名称
12+
* Spring-context configuration file name of the container.
1313
*/
1414
public static final String SPRING_CONTEXT_FILE_NAME = "oms-worker-container-spring-context.xml";
1515

1616
/**
17-
* container 属性文件名称
17+
* Property file name of the container.
1818
*/
1919
public static final String CONTAINER_PROPERTIES_FILE_NAME = "oms-worker-container.properties";
20+
/**
21+
* Package name of the container.
22+
*/
2023
public static final String CONTAINER_PACKAGE_NAME_KEY = "PACKAGE_NAME";
2124
}
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
package com.github.kfcfans.powerjob.common;
22

33
/**
4-
* 部署环境
4+
* Environment Enum class.
55
*
66
* @author tjq
77
* @since 2020/5/3
88
*/
99
public enum Env {
10+
/**
11+
* Development or test environment.
12+
*/
1013
DAILY,
14+
/**
15+
* Pre-release environment.
16+
*/
1117
PRE,
18+
/**
19+
* Production environment.
20+
*/
1221
PRODUCT
1322
}

powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/ExecuteType.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,25 @@
44
import lombok.Getter;
55

66
/**
7-
* 任务执行类型
7+
* Execution type.
88
*
99
* @author tjq
1010
* @since 2020/3/17
1111
*/
1212
@Getter
1313
@AllArgsConstructor
1414
public enum ExecuteType {
15+
/**
16+
* Standalone type of task.
17+
*/
1518
STANDALONE(1, "单机执行"),
19+
/**
20+
* Broadcast type of task.
21+
*/
1622
BROADCAST(2, "广播执行"),
23+
/**
24+
* MapReduce type of task.
25+
*/
1726
MAP_REDUCE(3, "MapReduce"),
1827
MAP(4, "Map");
1928

powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/OmsConstant.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.github.kfcfans.powerjob.common;
22

33
/**
4-
* 公共常量
4+
* Common constants.
55
*
66
* @author tjq
77
* @since 2020/5/31

powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/OmsSerializable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.io.Serializable;
44

55
/**
6-
* PowerJob 序列化标记接口
6+
* PowerJob serializable interface.
77
*
88
* @author tjq
99
* @since 2020/4/16

powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/model/DeployedContainerInfo.java

+13-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import lombok.NoArgsConstructor;
77

88
/**
9-
* 已部署的容器信息
9+
* The class for deployed container.
1010
*
1111
* @author tjq
1212
* @since 2020/5/18
@@ -16,12 +16,20 @@
1616
@AllArgsConstructor
1717
public class DeployedContainerInfo implements OmsSerializable {
1818

19-
// 容器ID
19+
/**
20+
* Id of the container.
21+
*/
2022
private Long containerId;
21-
// 版本
23+
/**
24+
* Version of the container.
25+
*/
2226
private String version;
23-
// 部署时间
27+
/**
28+
* Deploy timestamp.
29+
*/
2430
private long deployedTime;
25-
// 机器地址(无需上报)
31+
/**
32+
* Address of the server. Report is not required.
33+
*/
2634
private String workerAddress;
2735
}

powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/model/GitRepoInfo.java

+13-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,27 @@
33
import lombok.Data;
44

55
/**
6-
* Git代码库信息
6+
* The class for Git Repository info.
77
*
88
* @author tjq
99
* @since 2020/5/17
1010
*/
1111
@Data
1212
public class GitRepoInfo {
13-
// 仓库地址
13+
/**
14+
* Address of Git repository.
15+
*/
1416
private String repo;
15-
// 分支名称
17+
/**
18+
* Name of the branch.
19+
*/
1620
private String branch;
17-
// 用户名
21+
/**
22+
* username of Git.
23+
*/
1824
private String username;
19-
// 密码
25+
/**
26+
* Password of Git.
27+
*/
2028
private String password;
2129
}

0 commit comments

Comments
 (0)