From 437ca3bec25dbdd6a3e5f76e0776d0abdccff164 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Jul 2023 19:04:08 +0530 Subject: [PATCH] string changes --- src/calibre/gui2/main_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)