From c5a005000466d6490b2949e2332e8d66db65a567 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 13 May 2026 18:00:35 +0900 Subject: [PATCH] chore: update strings --- dzgui/strings/preconnect.py | 2 ++ dzgui/views/components/buttons.py | 5 +++-- dzgui/views/dialogs/servers.py | 4 ---- dzgui/views/pages/options.py | 12 ++++-------- dzgui/views/pages/preconnect.py | 11 ++++++++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dzgui/strings/preconnect.py b/dzgui/strings/preconnect.py index 4d63739..17c8a5e 100644 --- a/dzgui/strings/preconnect.py +++ b/dzgui/strings/preconnect.py @@ -7,3 +7,5 @@ errors = "Errors" mods = "Mods" total_mods = "Total mods: " all_updated = "All mods updated." +"If you recently installed {build} or moved it to a different drive, " +"restart Steam to allow these changes to synchronize, then try again." diff --git a/dzgui/views/components/buttons.py b/dzgui/views/components/buttons.py index b922994..6f60814 100644 --- a/dzgui/views/components/buttons.py +++ b/dzgui/views/components/buttons.py @@ -2,6 +2,7 @@ from typing import Callable, Self, TYPE_CHECKING from dzgui.util.clip import copy_clipboard from dzgui.util.format import pluralize +from dzgui.strings import buttons from dzgui.util.strings import ( alert_button_tooltip, atomic_buttons, @@ -169,8 +170,8 @@ class SteamTextButton(SteamConnectButton): class SteamWorkshopButton(SteamTextButton): def __init__(self) -> None: - super().__init__(label="Steam Workshop") - self.set_tooltip_text("connect to workshop") + super().__init__(label=buttons.workshop) + self.set_tooltip_text(buttons.workshop_tooltip) class AddButton(IconTextButton): diff --git a/dzgui/views/dialogs/servers.py b/dzgui/views/dialogs/servers.py index fc6942e..9ea36bf 100644 --- a/dzgui/views/dialogs/servers.py +++ b/dzgui/views/dialogs/servers.py @@ -45,10 +45,6 @@ class ServerDialog(GenericDialog): self.content = self.get_content_area() self.content.pack_start(self.scrollable_tree, EXPAND, FILL, 0) - # TODO: - # def pack(self, widget: Gtk.Widget) -> None: - # self.content.pack_start(widget, EXPAND, FILL, NO_PADDING) - def _on_keypress(self, view: Gtk.TreeView, event: Gdk.EventKey) -> bool: # NOTE: ESC normally unfocuses treeview instead of destroying dialog if event.keyval == Gdk.KEY_Escape: diff --git a/dzgui/views/pages/options.py b/dzgui/views/pages/options.py index 263bc10..0243713 100644 --- a/dzgui/views/pages/options.py +++ b/dzgui/views/pages/options.py @@ -20,8 +20,9 @@ from dzgui.const.constants import ( ) from dzgui.const.endpoints import STEAM_API_SETUP, BM_API_SETUP from dzgui.const.enum import Preferences, ServerTab -from dzgui.strings import errors +from dzgui.strings import errors, options from dzgui.util import strings, css, open_links +from dzgui.views.components.buttons import SteamWorkshopButton from dzgui.views.components.labels import LeftLabel from dzgui.views.components.eventbox import InfoEventBox from dzgui.views.components.buttons import WebButton @@ -144,19 +145,14 @@ class Options(Gtk.Box): # NOTE: sensitivity state is updated after config file is loaded self.force_button.set_sensitive(False) - eb = InfoEventBox(strings.options.dl_eventbox, controller) - # eb2 = InfoEventBox(strings.options.force_eventbox, controller) - - from dzgui.views.components.buttons import SteamWorkshopButton + eb = InfoEventBox(options.workshop_eventbox, controller) workshop_button = SteamWorkshopButton() # label=strings.self_workshop) workshop_button.connect( "clicked", lambda _: self.controller.open_user_workshop(self.uid) ) mod_rows = [ - [LeftLabel("Steam Workshop"), workshop_button, eb], - # [LeftLabel(strings.options.install_mode), self.mod_install_toggle, eb], - # [LeftLabel(strings.options.force_update), self.force_button, eb2], + [LeftLabel(options.workshop_label), workshop_button, eb], ] self.dayz_version_label = Gtk.Label(label=strings.null) diff --git a/dzgui/views/pages/preconnect.py b/dzgui/views/pages/preconnect.py index 624c82f..01207d9 100644 --- a/dzgui/views/pages/preconnect.py +++ b/dzgui/views/pages/preconnect.py @@ -225,14 +225,19 @@ class PreConnectionAssistant(Gtk.ScrolledWindow): warnings: list[str] = [] errors: list[str] = [] + resync_msg = ( + f"If you recently installed {prereqs.build} or moved it to a different drive,\n" + "restart Steam to allow these changes to synchronize, then try again." + ) + """Errors""" if prereqs.binary_missing: errors.append( - f"Remote server is running the build '{prereqs.build}', but it is not installed." + f"Remote server is running the build '{prereqs.build}', but it is not installed.\n{resync_msg}" ) elif prereqs.local_version != prereqs.remote_version: errors.append( - f"Local client version '{prereqs.local_version}' does not match remote version '{prereqs.remote_version}'." + f"Local client version '{prereqs.local_version}' does not match remote version '{prereqs.remote_version}'.\n{resync_msg}" ) if prereqs.required_space > prereqs.available_space: required_pretty = number(prereqs.required_space) @@ -307,7 +312,7 @@ class PreConnectionAssistant(Gtk.ScrolledWindow): self.mod_count.set_text(f"{prefix}{str(total_mods)}.{suffix}") self._process_warnings(prereqs) - if self.tree.is_visible: + if self.tree.is_visible(): self.tree.grab_focus() else: self.grab_focus()