i18n(oci): refine Slovak manager wording

This commit is contained in:
VAIO73
2026-09-27 22:30:23 +02:00
parent cdedf3ed24
commit 291b657218
5 changed files with 67 additions and 7 deletions
+2 -1
View File
@@ -8,7 +8,7 @@ import sys
import textwrap
import threading
from .i18n import BASE_DIR
from .i18n import BASE_DIR, translate
MG = "\033[1;35m"
GN = "\033[1;92m"
@@ -101,6 +101,7 @@ def ask_yes_no(text: str, default_yes: bool = True) -> bool:
width = 74
lines = sum(max(1, len(textwrap.wrap(line, width - 6) or [''])) for line in text.splitlines() or [''])
widget = ['whiptail', '--backtitle', 'ProxMenux', '--title', 'ProxMenux',
'--yes-button', translate('Yes'), '--no-button', translate('No'),
'--yesno', text, str(min(lines + 8, 20)), str(width)]
if not default_yes:
widget.insert(1, '--defaultno')
+2 -1
View File
@@ -192,9 +192,10 @@ class DialogUI:
# dialog draws on the terminal and writes the selection to stderr.
back_widget = ['--extra-button', '--extra-label', translate('Back')] if self.back_enabled and any(
flag in widget for flag in ('--inputbox', '--passwordbox', '--yesno', '--menu', '--checklist')) else []
confirmation_labels = ['--yes-label', translate('Yes'), '--no-label', translate('No')] if '--yesno' in widget else []
result = subprocess.run(
["dialog", "--no-collapse", "--cancel-label", translate('Cancel'), "--backtitle", self.backtitle, "--title", title or self.title,
*back_widget, *widget],
*confirmation_labels, *back_widget, *widget],
stdout=None, stderr=subprocess.PIPE, text=True, check=False, env=environment,
)
if result.returncode == 3 and back_widget: