Commit ad4fc80d99f76ef1c6fffd95f0739a3123ae336a

Authored by zhangzzzz
1 parent d11b3c53

修改人脸组件英文;

src/components/FaceDetect/index.js
... ... @@ -89,7 +89,7 @@ class FaceDetect extends Component {
89 89 this.video.onloadedmetadata = e => {
90 90 _this.video.play();
91 91 };
92   - _this.changeStatusContent("人脸检测中");
  92 + _this.changeStatusContent("Face detection");
93 93 _this.changePercentStatus("");
94 94 let timer = setInterval(async () => {
95 95 try {
... ... @@ -110,7 +110,7 @@ class FaceDetect extends Component {
110 110 timer = null;
111 111 const url = this.urlpre + `/face/faceSearch`;
112 112 //console.log(url,this.urlpre);
113   - _this.changeStatusContent("人脸验证中");
  113 + _this.changeStatusContent("Face verification in progress");
114 114 _this.stopMedia();
115 115 reject();
116 116 const dataReturn = await commonServices.postValueService(
... ... @@ -149,7 +149,7 @@ class FaceDetect extends Component {
149 149 //console.log("dataReturn",dataReturn);
150 150 if (dataReturn && dataReturn.data == undefined) {
151 151 _this.changePercentStatus("exception");
152   - _this.changeStatusContent("接口请求失败");
  152 + _this.changeStatusContent("Interface request failed");
153 153 // message.error('接口请求失败!');
154 154 _this.stopMedia();
155 155 return;
... ... @@ -157,13 +157,13 @@ class FaceDetect extends Component {
157 157 if (dataReturn.data.code < 0) {
158 158 _this.changePercentStatus("exception");
159 159 _this.changeStatusContent(
160   - "人脸验证失败,请重新识别:" + dataReturn.data.msg
  160 + "Face verification failed, please try again:" + dataReturn.data.msg
161 161 );
162 162 //message.error('人脸验证失败!请重新识别'+dataReturn.data.msg);
163 163 _this.stopMedia();
164 164 reject();
165 165 } else {
166   - _this.changeStatusContent("人脸验证成功,登录中");
  166 + _this.changeStatusContent("Face verification successful, logging in");
167 167 _this.props.onIdentifySuccess &&
168 168 _this.props.onIdentifySuccess(dataReturn.data);
169 169 _this.changeCurrentPercent(100);
... ... @@ -204,7 +204,7 @@ class FaceDetect extends Component {
204 204 this.video.onloadedmetadata = e => {
205 205 _this.video.play();
206 206 };
207   - _this.changeStatusContent("人脸采集中,请稍等");
  207 + _this.changeStatusContent("Face collection in progress, please wait");
208 208 _this.changePercentStatus("");
209 209 let timer = setInterval(async () => {
210 210 if (this.checkParams.length < 10) {
... ... @@ -222,7 +222,7 @@ class FaceDetect extends Component {
222 222 timer = null;
223 223 //验证URL
224 224 const url = this.urlpre + `/face/detectFaces`;
225   - _this.changeStatusContent("人脸检测中");
  225 + _this.changeStatusContent("Face detection");
226 226 _this.stopMedia();
227 227 reject();
228 228 //console.log("dataReturn",_this.checkParams);
... ... @@ -234,8 +234,8 @@ class FaceDetect extends Component {
234 234 //console.log("dataReturn",dataReturn);
235 235 if (dataReturn && dataReturn.data == undefined) {
236 236 _this.changePercentStatus("exception");
237   - _this.changeStatusContent("接口请求失败");
238   - message.error("接口请求失败!");
  237 + _this.changeStatusContent("Interface request failed");
  238 + message.error("Interface request failed!");
239 239 _this.stopMedia();
240 240 return;
241 241 }
... ... @@ -248,7 +248,7 @@ class FaceDetect extends Component {
248 248 _this.stopMedia();
249 249 reject();
250 250 } else {
251   - _this.changeStatusContent("人脸采集成功");
  251 + _this.changeStatusContent("Face collection successful");
252 252 let img = _this.getFace();
253 253 const userinfo = this.props.app.userinfo;
254 254 let item = {
... ... @@ -265,19 +265,19 @@ class FaceDetect extends Component {
265 265 };
266 266 //保存URL
267 267 const url = this.urlpre + `/face/faceAdd`;
268   - _this.changeStatusContent("人脸数据处理中,请稍等");
  268 + _this.changeStatusContent("Face data processing, please wait");
269 269 const dataReturn = await commonServices.postValueService(
270 270 null,
271 271 item,
272 272 url
273 273 );
274 274 if (dataReturn.data.code > 0) {
275   - _this.changeStatusContent("人脸数据处理成功");
  275 + _this.changeStatusContent("Facial data processing successful");
276 276 _this.props.onSaveFaceSuccess &&
277 277 _this.props.onSaveFaceSuccess(dataReturn);
278 278 } else {
279 279 _this.changeStatusContent(
280   - "人脸数据处理失败," + dataReturn.data.msg + "请重新采集"
  280 + "Face data processing failed." + dataReturn.data.msg + "Please collect again"
281 281 );
282 282 }
283 283 _this.changeCurrentPercent(100);
... ... @@ -299,8 +299,8 @@ class FaceDetect extends Component {
299 299 const _this = this;
300 300 const userinfo = this.props.app.userinfo;
301 301 if (undefined === userinfo.sEmployeeId || userinfo.sEmployeeId === "") {
302   - _this.changeStatusContent("您没有采集权限,请联系管理员,将您绑定成员工。");
303   - message.error("您没有采集权限,请联系管理员,将您绑定成员工。");
  302 + _this.changeStatusContent("You do not have collection permissions, please contact the administrator to bind you as an employee.");
  303 + message.error("You do not have collection permissions, please contact the administrator to bind you as an employee.");
304 304 return;
305 305 }
306 306 _this.getMediaAddFace().then(async () => {
... ... @@ -366,7 +366,7 @@ class FaceDetect extends Component {
366 366 );
367 367 if (dataReturn.data.code === 1) {
368 368 _this.setState({ thumbImg: _this.getFace() });
369   - _this.changeStatusContent("人脸验证成功");
  369 + _this.changeStatusContent("Face verification successful");
370 370 _this.stopMedia();
371 371 _this.props.onDetectSuccess &&
372 372 _this.props.onDetectSuccess(dataReturn.data);
... ... @@ -422,7 +422,7 @@ class FaceDetect extends Component {
422 422 return;
423 423 } else {
424 424 _this.changePercentStatus("exception");
425   - _this.changeStatusContent("未匹配到用户");
  425 + _this.changeStatusContent("No user matched");
426 426 }
427 427 });
428 428 };
... ... @@ -437,7 +437,7 @@ class FaceDetect extends Component {
437 437 const url = `/face/delete/`;
438 438 const dataReturn = await commonServices.postValueService(null, item, url);
439 439 if (dataReturn.data.error_msg === "SUCCESS") {
440   - message.success("删除成功");
  440 + message.success("Delete successfully");
441 441 console.log("dataReturn", dataReturn);
442 442 return;
443 443 }
... ... @@ -451,7 +451,7 @@ class FaceDetect extends Component {
451 451 const url = `/face/list/`;
452 452 const dataReturn = await commonServices.postValueService(null, item, url);
453 453 if (dataReturn.data.error_msg === "SUCCESS") {
454   - message.success("删除成功");
  454 + message.success("Delete successfully");
455 455 console.log("dataReturn", dataReturn);
456 456 return;
457 457 }
... ... @@ -508,7 +508,7 @@ class FaceDetect extends Component {
508 508 <span className="action-item-icon">
509 509 <VideoCameraOutlined />
510 510 </span>
511   - <span>人脸采集</span>
  511 + <span>Face collection</span>
512 512 </div>
513 513 </div>
514 514 </div>
... ...