string changes

This commit is contained in:
Kovid Goyal 2023-06-18 21:12:58 +05:30
parent cda12c4828
commit 4a2396d903
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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.')