anaconda/bugfix-password-tooltip-text-adapt-language.patch

37 lines
1.2 KiB
Diff
Raw Permalink Normal View History

2024-06-13 23:21:18 +08:00
From a7de90b4741689b12137dc22f1b478bdd451762f Mon Sep 17 00:00:00 2001
From: iasunsea <iasunsea@sina.com>
Date: Thu, 23 Feb 2023 20:19:51 +0800
Subject: [PATCH] password tooltip text adapt language
---
pyanaconda/ui/gui/utils.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/utils.py b/pyanaconda/ui/gui/utils.py
index 282f1bc53c6..ae32ec2558b 100644
--- a/pyanaconda/ui/gui/utils.py
+++ b/pyanaconda/ui/gui/utils.py
@@ -37,6 +37,7 @@
from pyanaconda.core.async_utils import async_action_wait, run_in_loop
from pyanaconda.core.constants import NOTICEABLE_FREEZE, PASSWORD_HIDE, PASSWORD_SHOW, \
PASSWORD_HIDE_ICON, PASSWORD_SHOW_ICON
+from pyanaconda.core.i18n import _
from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)
@@ -542,10 +543,10 @@ def set_password_visibility(entry, visible):
if visible:
icon = PASSWORD_HIDE_ICON
- text = PASSWORD_HIDE
+ text = _(PASSWORD_HIDE)
else:
icon = PASSWORD_SHOW_ICON
- text = PASSWORD_SHOW
+ text = _(PASSWORD_SHOW)
entry.set_visibility(visible)
entry.set_icon_from_icon_name(position, icon)
--
2.27.0