From 4a2396d90319bb7b2cda5f6f584a067fe9f17d45 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 Jun 2023 21:12:58 +0530 Subject: [PATCH] string changes --- src/calibre/gui2/main_window.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/main_window.py b/src/calibre/gui2/main_window.py index b61b83fd90..0a02091482 100644 --- a/src/calibre/gui2/main_window.py +++ b/src/calibre/gui2/main_window.py @@ -148,12 +148,17 @@ class MainWindow(QMainWindow): def no_processes_found() -> bool: is_folder = fname and os.path.isdir(fname) - w = _('folder') if is_folder else _('file') if e.winerror == winutil.ERROR_SHARING_VIOLATION: if fname: - dmsg = _('The {0} "{1}" is opened in another program, so calibre cannot access it.').format(w, fname) + if is_folder: + dmsg = _('The folder "{}" is opened in another program, so calibre cannot access it.').format(fname) + else: + dmsg = _('The file "{}" is opened in another program, so calibre cannot access it.').format(fname) else: - dmsg = _('A {} is open in another program so calibre cannot access it.').format(w) + if is_folder: + dmsg = _('A folder is open in another program so calibre cannot access it.') + else: + dmsg = _('A file is open in another program so calibre cannot access it.') if is_folder: dmsg += _('This is usually caused by leaving Windows explorer or a similar file manager open' ' to a folder in the calibre library. Close Windows explorer and retry.')