diff --git a/src/calibre/gui2/main_window.py b/src/calibre/gui2/main_window.py index 0a02091482..e6e8e8798a 100644 --- a/src/calibre/gui2/main_window.py +++ b/src/calibre/gui2/main_window.py @@ -203,8 +203,10 @@ class MainWindow(QMainWindow): path_map = {x['path']: x for x in p} is_folder = fname and os.path.isdir(fname) - w = _('folder') if is_folder else _('file') - dmsg = _('Could not open the {0}: "{1}". It is already opened in the following programs:').format(w, fname) + '
' + if is_folder: + dmsg = _('Could not open the folder: "{}". It is already opened in the following programs:').format(fname) + else: + dmsg = _('Could not open the file: "{}". It is already opened in the following programs:').format(fname) for path, x in path_map.items(): dmsg += '
' + prepare_string_for_xml(f'{x["app_name"]}: {path}') msg = prepare_string_for_xml(msg)