Skip to content

Commit e8690b9

Browse files
authored
Update Events title and description in english
1 parent 4b96fb7 commit e8690b9

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

usecases_examples/PowerGrid/app/models/Communicate.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ def send_event_online(self,
367367
payload_dict = {}
368368
payload_dict = {
369369
"criticality": "HIGH",
370-
"title": f"Surcharge sur ligne {line_name}",
370+
"title": f"Overload in line {line_name}",
371371
"description": (
372-
f"Attention la ligne {line_name} est en surcharge de "
372+
f"Warning: the {line_name} line is overloaded by "
373373
f"{np.round(np.float64(obs.rho.max() * 100),decimals=1,out=None)}%"
374374
),
375375
"start_date": f"{context_date}",
@@ -397,8 +397,8 @@ def send_event_online(self,
397397
payload_dict = {}
398398
payload_dict = {
399399
"criticality": "MEDIUM",
400-
"title": "Alarme Agent IA",
401-
"description": f"Soyez vigilant sur la zone {zone}",
400+
"title": "AI agent Alarm",
401+
"description": f"Be vigilant in zone {zone}",
402402
"start_date": f"{context_date}",
403403
"end_date": f"{context_date + timedelta(minutes=float(5))}",
404404
"data": {
@@ -424,8 +424,8 @@ def send_event_online(self,
424424
payload_dict = {}
425425
payload_dict = {
426426
"criticality": "MEDIUM",
427-
"title": "Alerte Agent IA",
428-
"description": f"Risque sur les lignes : {line}",
427+
"title": "AI agent Warning",
428+
"description": f"Risk on lines: {line}",
429429
"start_date": f"{context_date}",
430430
"end_date": f"{context_date + timedelta(minutes=float(5))}",
431431
"data": {
@@ -451,10 +451,10 @@ def send_event_online(self,
451451
payload_dict = {}
452452
payload_dict = {
453453
"criticality": "MEDIUM",
454-
"title": f"Risque sur aléa N-1 sur la ligne {line[0]}",
454+
"title": f"Risk of N-1 contingency on line {line[0]}",
455455
"description": (
456-
f"Lignes impactées {line[1]}, "
457-
f"charge max {np.round(max(line[2]) * 100, decimals=1, out=None)}%"
456+
f"Impacted lines {line[1]}, "
457+
f"Maximum charge {np.round(max(line[2]) * 100, decimals=1, out=None)}%"
458458
),
459459
"start_date": f"{anticip_date}",
460460
"end_date": f"{anticip_date + timedelta(minutes=float(5*duration))}",
@@ -482,8 +482,8 @@ def send_event_online(self,
482482
payload_dict = {}
483483
payload_dict = {
484484
"criticality": "ROUTINE",
485-
"title": f"Ligne {line_name} déconnectée",
486-
"description": f"La ligne {line_name} est déconnectée",
485+
"title": f"Line {line_name} disconnected",
486+
"description": f"Line {line_name} is disconnected",
487487
"start_date": f"{context_date}",
488488
"end_date": f"{context_date + timedelta(minutes=float(5))}",
489489
"data": {
@@ -568,13 +568,13 @@ def get_act_from_api(self):
568568
if get_act_counter == 0:
569569
message = {
570570
"div": "message-container",
571-
"content": "La simulation est en pause. Veillez consulter les recommendations de InteractiveAI avant de faire une nouvelle action ici!"
571+
"content": "The simulation is paused. Please consult the recommendations from InteractiveAI before taking any further action here!"
572572
}
573573
yield f"data: {json.dumps(message)}\n\n"
574574
time.sleep(1)
575575
yield (
576576
"data: {\"div\": \"status-div\", \"content\": "
577-
"\"Cliquez sur 'Continuer' après avoir fait votre choix dans InteractiveAI\"}\n\n"
577+
"\"Click 'Continuer' after making your selection in InteractiveAI\"}\n\n"
578578
)
579579
time.sleep(1)
580580
set_pause(True)
@@ -583,13 +583,13 @@ def get_act_from_api(self):
583583
else:
584584
message = {
585585
"div": "message-container",
586-
"content": "Aucune recommendation n'a été reçu de InteractiveAI!"
586+
"content": "No recommendation has been received from InteractiveAI!"
587587
}
588588
yield f"data: {json.dumps(message)}\n\n"
589589
time.sleep(1)
590590
yield (
591591
"data: {\"div\": \"status-div\", \"content\": "
592-
"\"Réitérez votre choix dans InteractiveAI puis cliquez à nouveau sur "
592+
"\"Repeat your selection in InteractiveAI, then click again on "
593593
"'Continuer'\"}\n\n"
594594
)
595595
time.sleep(1)
@@ -608,12 +608,12 @@ def get_act_from_api(self):
608608
self.act_dict = response.json()
609609
if bool(self.act_dict) is False and get_act_counter >= 1:
610610
logging.info(
611-
"\n Aucune recommendation n'a été reçu ! \n"
612-
" La siumation se prousuivra avec la recommendation NULL par défaut."
611+
"\n No recommendation has been received! \n"
612+
" The simulation will continue with the default Do Nothing recommendation."
613613
)
614614
message = {
615615
"div": "message-container",
616-
"content": "Aucune recommendation n'a été reçu ! La siumation se prousuivra avec la recommendation NULL par défaut."
616+
"content": "No recommendation has been received! The simulation will continue with the default Do Nothing recommendation."
617617
}
618618
yield f"data: {json.dumps(message)}\n\n"
619619
time.sleep(1)
@@ -622,11 +622,11 @@ def get_act_from_api(self):
622622
logging.info("\n InteractiveAI' s recommendation received! \n")
623623
message = {
624624
"div": "message-container",
625-
"content": "La recommendation de InteractiveAI vient dêtre reçu !"
625+
"content": "The recommendation from InteractiveAI has just been received!"
626626
}
627627
yield f"data: {json.dumps(message)}\n\n"
628628
time.sleep(1)
629629
get_act_counter += 1
630630

631631
except Exception as e:
632-
logging.error(e)
632+
logging.error(e)

0 commit comments

Comments
 (0)