Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta Dialog's name is not translated on RHEL-8 #46

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading