mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
chore: update strings
This commit is contained in:
1 parent
cf913eff1b
commit
c5a0050004
5 files changed
+17
-17
No files matched your search
@@ -7,3 +7,5 @@ errors = "Errors"
|
|||||||
mods = "Mods"
|
mods = "Mods"
|
||||||
total_mods = "Total mods: "
|
total_mods = "Total mods: "
|
||||||
all_updated = "All mods updated."
|
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."
|
||||||
@@ -2,6 +2,7 @@ from typing import Callable, Self, TYPE_CHECKING
|
|||||||
|
|
||||||
from dzgui.util.clip import copy_clipboard
|
from dzgui.util.clip import copy_clipboard
|
||||||
from dzgui.util.format import pluralize
|
from dzgui.util.format import pluralize
|
||||||
|
from dzgui.strings import buttons
|
||||||
from dzgui.util.strings import (
|
from dzgui.util.strings import (
|
||||||
alert_button_tooltip,
|
alert_button_tooltip,
|
||||||
atomic_buttons,
|
atomic_buttons,
|
||||||
@@ -169,8 +170,8 @@ class SteamTextButton(SteamConnectButton):
|
|||||||
|
|
||||||
class SteamWorkshopButton(SteamTextButton):
|
class SteamWorkshopButton(SteamTextButton):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
super().__init__(label="Steam Workshop")
|
super().__init__(label=buttons.workshop)
|
||||||
self.set_tooltip_text("connect to workshop")
|
self.set_tooltip_text(buttons.workshop_tooltip)
|
||||||
|
|
||||||
|
|
||||||
class AddButton(IconTextButton):
|
class AddButton(IconTextButton):
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ class ServerDialog(GenericDialog):
|
|||||||
self.content = self.get_content_area()
|
self.content = self.get_content_area()
|
||||||
self.content.pack_start(self.scrollable_tree, EXPAND, FILL, 0)
|
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:
|
def _on_keypress(self, view: Gtk.TreeView, event: Gdk.EventKey) -> bool:
|
||||||
# NOTE: ESC normally unfocuses treeview instead of destroying dialog
|
# NOTE: ESC normally unfocuses treeview instead of destroying dialog
|
||||||
if event.keyval == Gdk.KEY_Escape:
|
if event.keyval == Gdk.KEY_Escape:
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ from dzgui.const.constants import (
|
|||||||
)
|
)
|
||||||
from dzgui.const.endpoints import STEAM_API_SETUP, BM_API_SETUP
|
from dzgui.const.endpoints import STEAM_API_SETUP, BM_API_SETUP
|
||||||
from dzgui.const.enum import Preferences, ServerTab
|
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.util import strings, css, open_links
|
||||||
|
from dzgui.views.components.buttons import SteamWorkshopButton
|
||||||
from dzgui.views.components.labels import LeftLabel
|
from dzgui.views.components.labels import LeftLabel
|
||||||
from dzgui.views.components.eventbox import InfoEventBox
|
from dzgui.views.components.eventbox import InfoEventBox
|
||||||
from dzgui.views.components.buttons import WebButton
|
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
|
# NOTE: sensitivity state is updated after config file is loaded
|
||||||
self.force_button.set_sensitive(False)
|
self.force_button.set_sensitive(False)
|
||||||
|
|
||||||
eb = InfoEventBox(strings.options.dl_eventbox, controller)
|
eb = InfoEventBox(options.workshop_eventbox, controller)
|
||||||
# eb2 = InfoEventBox(strings.options.force_eventbox, controller)
|
|
||||||
|
|
||||||
from dzgui.views.components.buttons import SteamWorkshopButton
|
|
||||||
|
|
||||||
workshop_button = SteamWorkshopButton() # label=strings.self_workshop)
|
workshop_button = SteamWorkshopButton() # label=strings.self_workshop)
|
||||||
workshop_button.connect(
|
workshop_button.connect(
|
||||||
"clicked", lambda _: self.controller.open_user_workshop(self.uid)
|
"clicked", lambda _: self.controller.open_user_workshop(self.uid)
|
||||||
)
|
)
|
||||||
mod_rows = [
|
mod_rows = [
|
||||||
[LeftLabel("Steam Workshop"), workshop_button, eb],
|
[LeftLabel(options.workshop_label), workshop_button, eb],
|
||||||
# [LeftLabel(strings.options.install_mode), self.mod_install_toggle, eb],
|
|
||||||
# [LeftLabel(strings.options.force_update), self.force_button, eb2],
|
|
||||||
]
|
]
|
||||||
|
|
||||||
self.dayz_version_label = Gtk.Label(label=strings.null)
|
self.dayz_version_label = Gtk.Label(label=strings.null)
|
||||||
|
|||||||
@@ -225,14 +225,19 @@ class PreConnectionAssistant(Gtk.ScrolledWindow):
|
|||||||
warnings: list[str] = []
|
warnings: list[str] = []
|
||||||
errors: 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"""
|
"""Errors"""
|
||||||
if prereqs.binary_missing:
|
if prereqs.binary_missing:
|
||||||
errors.append(
|
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:
|
elif prereqs.local_version != prereqs.remote_version:
|
||||||
errors.append(
|
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:
|
if prereqs.required_space > prereqs.available_space:
|
||||||
required_pretty = number(prereqs.required_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.mod_count.set_text(f"{prefix}{str(total_mods)}.{suffix}")
|
||||||
|
|
||||||
self._process_warnings(prereqs)
|
self._process_warnings(prereqs)
|
||||||
if self.tree.is_visible:
|
if self.tree.is_visible():
|
||||||
self.tree.grab_focus()
|
self.tree.grab_focus()
|
||||||
else:
|
else:
|
||||||
self.grab_focus()
|
self.grab_focus()
|
||||||
|
|||||||
Reference in new issue
Block a user