mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
chore: add dialog strings
This commit is contained in:
1 parent
7f19821433
commit
1cdd37c2a6
4 files changed
+11
-10
No files matched your search
@@ -533,5 +533,3 @@ class Controller(GObject.GObject):
|
|||||||
self.clear_cancel_event()
|
self.clear_cancel_event()
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@ from dzgui.api.probe import test_steam_api, test_bm_api
|
|||||||
from dzgui.const.enum import Preferences
|
from dzgui.const.enum import Preferences
|
||||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||||
|
from dzgui.strings import dialogs
|
||||||
from dzgui.util._json import read_json, write_json
|
from dzgui.util._json import read_json, write_json
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -94,8 +95,7 @@ class ConfigManager:
|
|||||||
logger.critical(e)
|
logger.critical(e)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
# TODO: strings
|
@call_on_thread(dialogs.checking_api)
|
||||||
@call_on_thread("Checking api")
|
|
||||||
def update_api_key(self, key: Preferences, text: str) -> None:
|
def update_api_key(self, key: Preferences, text: str) -> None:
|
||||||
if key is Preferences.STEAM:
|
if key is Preferences.STEAM:
|
||||||
res = test_steam_api(text)
|
res = test_steam_api(text)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ from dzgui.const.constants import APP_NAME, APPID_DAYZ, APPID_DAYZ_EXP
|
|||||||
from dzgui.const.enum import Preferences
|
from dzgui.const.enum import Preferences
|
||||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||||
from dzgui.model.model_factory import FastInsertListStore, ModelFactory
|
from dzgui.model.model_factory import FastInsertListStore, ModelFactory
|
||||||
|
from dzgui.strings import dialogs
|
||||||
from dzgui.util.format import format_mods
|
from dzgui.util.format import format_mods
|
||||||
from dzgui.util.strings import server_timeout
|
from dzgui.util.strings import server_timeout
|
||||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||||
@@ -51,8 +52,7 @@ class ModManager:
|
|||||||
self.thread_man = ThreadingManager(controller)
|
self.thread_man = ThreadingManager(controller)
|
||||||
self._get_mods()
|
self._get_mods()
|
||||||
|
|
||||||
# TODO: dialog strings
|
@call_on_thread(dialogs.fetching_mods)
|
||||||
@call_on_thread("getting mods")
|
|
||||||
def _get_mods(self) -> None:
|
def _get_mods(self) -> None:
|
||||||
mods = get_delimited_mods(self.path)
|
mods = get_delimited_mods(self.path)
|
||||||
if len(mods) < 1:
|
if len(mods) < 1:
|
||||||
@@ -95,8 +95,7 @@ class ModManager:
|
|||||||
mod = model.get_value(tree_iter, 2)
|
mod = model.get_value(tree_iter, 2)
|
||||||
return mod, tree_iter
|
return mod, tree_iter
|
||||||
|
|
||||||
# TODO: strings
|
@call_on_thread(dialogs.deleting_mods)
|
||||||
@call_on_thread("deleting mods")
|
|
||||||
def delete_mods_on_system(self, mods: list[tuple[str, Gtk.TreeIter]]) -> None:
|
def delete_mods_on_system(self, mods: list[tuple[str, Gtk.TreeIter]]) -> None:
|
||||||
for mod, _iter in mods:
|
for mod, _iter in mods:
|
||||||
self.delete_single_mod(mod)
|
self.delete_single_mod(mod)
|
||||||
@@ -181,8 +180,7 @@ class ModManager:
|
|||||||
model[path][4] = True
|
model[path][4] = True
|
||||||
self.emitter.emit("mods_highlighted")
|
self.emitter.emit("mods_highlighted")
|
||||||
|
|
||||||
# TODO: dialog strings
|
@call_on_thread(dialogs.scanning_mods)
|
||||||
@call_on_thread("working")
|
|
||||||
def highlight_stale(self) -> None:
|
def highlight_stale(self) -> None:
|
||||||
stale = find_stale_mods(self.prefs.paths.config)
|
stale = find_stale_mods(self.prefs.paths.config)
|
||||||
func = StoredFunc(self._on_stale_mods_found, stale)
|
func = StoredFunc(self._on_stale_mods_found, stale)
|
||||||
|
|||||||
@@ -6,3 +6,8 @@ failed_to_update = "Failed to update DZGUI executable"
|
|||||||
update_success = "Updated successfully. Please exit and relaunch."
|
update_success = "Updated successfully. Please exit and relaunch."
|
||||||
|
|
||||||
load_error_lan = "Failed to find any servers on your network.\nCheck the server query port or your firewall settings."
|
load_error_lan = "Failed to find any servers on your network.\nCheck the server query port or your firewall settings."
|
||||||
|
fetching_mods = "Fetching mod metadata"
|
||||||
|
deleting_mods = "Deleting mods"
|
||||||
|
scanning_mods = "Scanning mods"
|
||||||
|
|
||||||
|
checking_api = "Checking API key"
|
||||||
Reference in new issue
Block a user