Skip to content

Commit 1b158df

Browse files
authored
feat: change all texts to English (#11)
1 parent 9d7fc5a commit 1b158df

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/main/java/org/jim/jcasbin/MongoAdapter.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ private MongoCollection<CasbinRule> getCollection() {
8585
}
8686

8787
/**
88-
* 从存储加载所有策略规则
89-
* 加载时会合并重复数据
88+
* Loads all policy rules from the storage.
89+
* Duplicates are merged during loading.
9090
*
9191
* @param model the model.
9292
*/
@@ -112,7 +112,7 @@ Map<String, ArrayList<ArrayList<String>>> loading() {
112112
.collect(Collectors.toMap(
113113
x -> x.get(0), y -> {
114114
ArrayList<ArrayList<String>> lists = new ArrayList<>();
115-
// 去除list第一项策略类型
115+
// Remove the first item (policy type) from the list
116116
y.remove(0);
117117
lists.add(y);
118118
return lists;
@@ -124,8 +124,8 @@ Map<String, ArrayList<ArrayList<String>>> loading() {
124124
}
125125

126126
/**
127-
* 将所有策略规则保存到存储
128-
* 保存时会合并重复数据
127+
* Saves all policy rules to the storage.
128+
* Duplicates are merged during saving.
129129
*
130130
* @param model the model.
131131
*/
@@ -137,7 +137,7 @@ public void savePolicy(Model model) {
137137
}
138138

139139
/**
140-
* 将策略规则添加到存储
140+
* Adds a policy rule to the storage.
141141
*
142142
* @param sec the section, "p" or "g".
143143
* @param ptype the policy type, "p", "p2", .. or "g", "g2", ..
@@ -160,7 +160,7 @@ void adding(String sec, String ptype, List<String> rule) {
160160
}
161161

162162
/**
163-
* 从存储中删除策略规则
163+
* Removes a policy rule from the storage.
164164
*
165165
* @param sec the section, "p" or "g".
166166
* @param ptype the policy type, "p", "p2", .. or "g", "g2", ..
@@ -186,7 +186,7 @@ void removing(String sec, String ptype, int fieldIndex, String... fieldValues) {
186186
}
187187

188188
/**
189-
* 从存储中删除当前策略指定索引后匹配的数据
189+
* Removes policy rules that match the specified field index and values from the storage.
190190
*
191191
* @param sec the section, "p" or "g".
192192
* @param ptype the policy type, "p", "p2", .. or "g", "g2", ..

src/main/java/org/jim/jcasbin/domain/CasbinRule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public ArrayList<String> toPolicy() {
117117
}
118118

119119
/**
120-
* 将model转换为CasbinRule
121-
* 转换过程将会合并重复数据
120+
* Converts the model into CasbinRule.
121+
* The conversion process will merge duplicate data.
122122
*/
123123
public static List<CasbinRule> transformToCasbinRule(Model model) {
124124
Set<CasbinRule> casbinRules = new HashSet<>();

0 commit comments

Comments
 (0)