mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-30 23:29:30 +03:00
Change journal changed locking strings to translations.
This commit is contained in:
parent
09cc677a42
commit
f3ef653a8d
17
monitor.py
17
monitor.py
@ -22,6 +22,10 @@ from EDMCLogging import get_main_logger
|
||||
|
||||
logger = get_main_logger()
|
||||
|
||||
if TYPE_CHECKING:
|
||||
def _(x: str) -> str:
|
||||
return x
|
||||
|
||||
if platform == 'darwin':
|
||||
from AppKit import NSWorkspace
|
||||
from watchdog.observers import Observer
|
||||
@ -1149,7 +1153,7 @@ class JournalLock:
|
||||
|
||||
self.parent = parent
|
||||
self.callback = callback
|
||||
self.title('Journal directory already locked')
|
||||
self.title(_('Journal directory already locked'))
|
||||
|
||||
# remove decoration
|
||||
if platform == 'win32':
|
||||
@ -1165,14 +1169,14 @@ class JournalLock:
|
||||
frame.grid(sticky=tk.NSEW)
|
||||
|
||||
self.blurb = tk.Label(frame)
|
||||
self.blurb['text'] = '''The new Journal Directory location is already locked.
|
||||
You can either attempt to resolve this and then Retry, or choose to Ignore this.'''
|
||||
self.blurb['text'] = _("The new Journal Directory location is already locked.{CR}"
|
||||
"You can either attempt to resolve this and then Retry, or choose to Ignore this.")
|
||||
self.blurb.grid(row=1, column=0, columnspan=2, sticky=tk.NSEW)
|
||||
|
||||
self.retry_button = ttk.Button(frame, text='Retry', command=self.retry)
|
||||
self.retry_button = ttk.Button(frame, text=_('Retry'), command=self.retry)
|
||||
self.retry_button.grid(row=2, column=0, sticky=tk.EW)
|
||||
|
||||
self.ignore_button = ttk.Button(frame, text='Ignore', command=self.ignore)
|
||||
self.ignore_button = ttk.Button(frame, text=_('Ignore'), command=self.ignore)
|
||||
self.ignore_button.grid(row=2, column=1, sticky=tk.EW)
|
||||
self.protocol("WM_DELETE_WINDOW", self._destroy)
|
||||
|
||||
@ -1208,6 +1212,9 @@ You can either attempt to resolve this and then Retry, or choose to Ignore this.
|
||||
def retry_lock(self, retry: bool, parent: tk.Tk):
|
||||
logger.trace(f'We should retry: {retry}')
|
||||
|
||||
if not retry:
|
||||
return
|
||||
|
||||
current_journaldir = config.get('journaldir') or config.default_journal_dir
|
||||
self.journal_dir = current_journaldir
|
||||
self.journal_dir_path = pathlib.Path(self.journal_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user