mirror of
https://github.com/aclist/dztui.git
synced 2026-11-22 09:29:31 +01:00
chore: abstract mod panel strings
This commit is contained in:
1 parent
f2025dd48d
commit
d4c4268eaa
3 files changed
+32
-58
No files matched your search
+12
-15
@@ -2,9 +2,10 @@ from __future__ import annotations
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
from dzgui.strings import mod_panel
|
||||||
|
from dzgui.strings import rows
|
||||||
from dzgui.strings import side_buttons
|
from dzgui.strings import side_buttons
|
||||||
from dzgui.util import strings
|
from dzgui.util import strings
|
||||||
from dzgui.strings import rows
|
|
||||||
|
|
||||||
|
|
||||||
class Port(Enum):
|
class Port(Enum):
|
||||||
@@ -227,29 +228,25 @@ class RowType(Enum):
|
|||||||
|
|
||||||
|
|
||||||
class ModButton(Enum):
|
class ModButton(Enum):
|
||||||
SELECT_ALL = ModButtonMeta(
|
SELECT_ALL = ModButtonMeta(mod_panel.select_all, mod_panel.select_all_tooltip)
|
||||||
strings.mod_panel.select_all, strings.mod_panel.select_all_tooltip
|
UNSELECT_ALL = ModButtonMeta(mod_panel.unselect_all, mod_panel.unselect_all_tooltip)
|
||||||
)
|
|
||||||
UNSELECT_ALL = ModButtonMeta(
|
|
||||||
strings.mod_panel.unselect_all, strings.mod_panel.unselect_all_tooltip
|
|
||||||
)
|
|
||||||
HIGHLIGHT_STALE = ModButtonMeta(
|
HIGHLIGHT_STALE = ModButtonMeta(
|
||||||
strings.mod_panel.highlight_stale, strings.mod_panel.highlight_stale_tooltip
|
mod_panel.highlight_stale, mod_panel.highlight_stale_tooltip
|
||||||
)
|
)
|
||||||
UNHIGHLIGHT_STALE = ModButtonMeta(
|
UNHIGHLIGHT_STALE = ModButtonMeta(
|
||||||
strings.mod_panel.unhighlight_stale, strings.mod_panel.unhighlight_stale_tooltip
|
mod_panel.unhighlight_stale, mod_panel.unhighlight_stale_tooltip
|
||||||
)
|
)
|
||||||
UNSUB_SELECTED = ModButtonMeta(
|
UNSUB_SELECTED = ModButtonMeta(
|
||||||
strings.mod_panel.unsub_selected,
|
mod_panel.unsub_selected,
|
||||||
strings.mod_panel.unsub_selected_tooltip,
|
mod_panel.unsub_selected_tooltip,
|
||||||
)
|
)
|
||||||
SELECT_STALE = ModButtonMeta(
|
SELECT_STALE = ModButtonMeta(
|
||||||
strings.mod_panel.select_stale,
|
mod_panel.select_stale,
|
||||||
strings.mod_panel.select_stale_tooltip,
|
mod_panel.select_stale_tooltip,
|
||||||
)
|
)
|
||||||
VALIDATE = ModButtonMeta(
|
VALIDATE = ModButtonMeta(
|
||||||
strings.mod_panel.validate,
|
mod_panel.validate,
|
||||||
strings.mod_panel.validate_tooltip,
|
mod_panel.validate_tooltip,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
bulk_select = "Bulk selects all currently highlighted mods"
|
||||||
|
clear_highlights = "Clears highlights and reverts the table to a default state"
|
||||||
|
header = "Mod actions"
|
||||||
|
highlight_stale = "Highlight stale"
|
||||||
|
highlight_stale_tooltip = (
|
||||||
|
"Shows locally-installed mods which are not \n"
|
||||||
|
"used by any server in your Saved Servers"
|
||||||
|
)
|
||||||
|
select_all = "Select all"
|
||||||
|
select_all_tooltip = "Bulk selects all mods"
|
||||||
|
select_stale = "Select stale"
|
||||||
|
select_stale_tooltip = "Only selects highlighted stale mods"
|
||||||
|
unhighlight_stale = "Unhighlight stale"
|
||||||
|
unhighlight_stale_tooltip = "Clears highlight from stale mods"
|
||||||
|
unselect_all = "Unselect all"
|
||||||
|
unselect_all_tooltip = "Bulk unselects all mods"
|
||||||
|
unsub_selected = "Unsubscribe selected"
|
||||||
|
unsub_selected_tooltip = "Unsubscribes from selected mods"
|
||||||
|
validate = "Validate selected"
|
||||||
|
validate_tooltip = "Validates selected mods and updates them if necessary"
|
||||||
@@ -9,27 +9,6 @@ class ServerLabels:
|
|||||||
lan: str
|
lan: str
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class ModPanelStrings:
|
|
||||||
header: str
|
|
||||||
unhighlight_stale: str
|
|
||||||
unhighlight_stale_tooltip: str
|
|
||||||
highlight_stale: str
|
|
||||||
highlight_stale_tooltip: str
|
|
||||||
unsub_selected: str
|
|
||||||
unsub_selected_tooltip: str
|
|
||||||
unselect_all: str
|
|
||||||
unselect_all_tooltip: str
|
|
||||||
select_all: str
|
|
||||||
select_all_tooltip: str
|
|
||||||
bulk_select: str
|
|
||||||
clear_highlights: str
|
|
||||||
select_stale: str
|
|
||||||
select_stale_tooltip: str
|
|
||||||
validate: str
|
|
||||||
validate_tooltip: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
@dataclass(slots=True, frozen=True)
|
||||||
class Dialog:
|
class Dialog:
|
||||||
querying: str
|
querying: str
|
||||||
@@ -233,28 +212,6 @@ init = Init(
|
|||||||
requires_steam="Your chosen client (Steam/Flatpak Steam) must be installed on the system.",
|
requires_steam="Your chosen client (Steam/Flatpak Steam) must be installed on the system.",
|
||||||
)
|
)
|
||||||
|
|
||||||
mod_panel = ModPanelStrings(
|
|
||||||
header="Mod actions",
|
|
||||||
unhighlight_stale="Unhighlight stale",
|
|
||||||
unhighlight_stale_tooltip="Clears highlight from stale mods",
|
|
||||||
highlight_stale="Highlight stale",
|
|
||||||
highlight_stale_tooltip=(
|
|
||||||
"Shows locally-installed mods which are not \n"
|
|
||||||
"used by any server in your Saved Servers"
|
|
||||||
),
|
|
||||||
unsub_selected="Unsubscribe selected",
|
|
||||||
unsub_selected_tooltip="Unsubscribes from selected mods",
|
|
||||||
unselect_all="Unselect all",
|
|
||||||
unselect_all_tooltip="Bulk unselects all mods",
|
|
||||||
select_all="Select all",
|
|
||||||
select_all_tooltip="Bulk selects all mods",
|
|
||||||
bulk_select="Bulk selects all currently highlighted mods",
|
|
||||||
clear_highlights="Clears highlights and reverts the table to a default state",
|
|
||||||
select_stale="Select stale",
|
|
||||||
select_stale_tooltip="Only selects highlighted stale mods",
|
|
||||||
validate="Validate selected",
|
|
||||||
validate_tooltip="Validates selected mods and updates them if necessary",
|
|
||||||
)
|
|
||||||
|
|
||||||
options = Options(
|
options = Options(
|
||||||
header="Options",
|
header="Options",
|
||||||
|
|||||||
Reference in new issue
Block a user