Skip to content

Commit 623818a

Browse files
committed
i18n pour Api.py renforcer
1 parent 691afe8 commit 623818a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Core/Api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ def _confirm_workspace_change(gui, folder: str) -> bool:
3232
"Voulez-vous continuer ?"
3333
)
3434
try:
35-
if hasattr(gui, "tr"):
36-
title = gui.tr("Confirmation", "Confirmation")
37-
message = gui.tr(
35+
parent = getattr(gui, "parent", None)
36+
if parent and hasattr(parent, "tr"):
37+
title = parent.tr("Confirmation", "Confirmation")
38+
message = parent.tr(
3839
f"Un plugin demande de changer le workspace vers :\n{folder}\n\n"
3940
"Voulez-vous continuer ?",
4041
f"A plugin requests changing the workspace to:\n{folder}\n\n"

0 commit comments

Comments
 (0)