Skip to content

Commit

Permalink
Beta Dialog's name is not translated on RHEL-8
Browse files Browse the repository at this point in the history
  • Loading branch information
jstodola authored and jikortus committed Mar 12, 2024
1 parent ab7c93b commit 67a4054
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions anabot/runtime/installation/welcome/beta_dialog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from anabot.conditions import is_distro, is_anaconda_version_lt
from anabot.conditions import is_distro, is_anaconda_version_lt, is_distro_version
from anabot.runtime.decorators import handle_action, handle_check
from anabot.runtime.functions import get_attr, getnode
from anabot.runtime.translate import tr
Expand All @@ -22,7 +22,12 @@ def _is_button_with_dot():
def beta_dialog_handler(element, app_node, local_node):
dialog_action = get_attr(element, "dialog", "accept") == "accept"
try:
beta_dialog = getnode(app_node, "dialog", tr("Beta Warn")) # Beta Dialog's name needs to be translated
# Beta Dialog's name is not translated on RHEL-8
if is_distro_version('rhel', 8):
beta_dialog = getnode(app_node, "dialog", "Beta Warn")
else:
beta_dialog = getnode(app_node, "dialog", tr("Beta Warn"))

if dialog_action:
button_text = "I want to _proceed." if _is_button_with_dot() else "I want to _proceed"
else:
Expand Down

0 comments on commit 67a4054

Please sign in to comment.