string changes

This commit is contained in:
Kovid Goyal 2023-07-03 19:04:08 +05:30
parent 501aa41609
commit 437ca3bec2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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) + '<div>'
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 += '<div>' + prepare_string_for_xml(f'{x["app_name"]}: {path}')
msg = prepare_string_for_xml(msg)