From 12d47c8c80a21727dab1f8e90cf87bd5b9039851 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 11 Oct 2024 14:35:12 -0600 Subject: [PATCH] Quote file names in text, fixes #553 --- i18n/en/cosmic_files.ftl | 26 +++++++++++++------------- src/operation.rs | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/i18n/en/cosmic_files.ftl b/i18n/en/cosmic_files.ftl index 0a49147..b5f183b 100644 --- a/i18n/en/cosmic_files.ftl +++ b/i18n/en/cosmic_files.ftl @@ -70,7 +70,7 @@ rename-folder = Rename folder ## Replace Dialog replace = Replace -replace-title = {$filename} already exists in this location. +replace-title = "{$filename}" already exists in this location. replace-warning = Do you want to replace it with the one you are saving? Replacing it will overwrite its content. replace-warning-operation = Do you want to replace it? Replacing it will overwrite its content. original-file = Original file @@ -132,44 +132,44 @@ complete = Complete compressing = Compressing {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" compressed = Compressed {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" copy_noun = Copy -creating = Creating {$name} in {$parent} -created = Created {$name} in {$parent} +creating = Creating "{$name}" in "{$parent}" +created = Created "{$name}" in "{$parent}" copying = Copying {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" copied = Copied {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" emptying-trash = Emptying {trash} emptied-trash = Emptied {trash} extracting = Extracting {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" extracted = Extracted {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" setting-executable-and-launching = Setting "{$name}" as executable and launching set-executable-and-launched = Set "{$name}" as executable and launched moving = Moving {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} + } from "{$from}" to "{$to}" moved = Moved {$items} {$items -> [one] item *[other] items - } from {$from} to {$to} -renaming = Renaming {$from} to {$to} -renamed = Renamed {$from} to {$to} + } from "{$from}" to "{$to}" +renaming = Renaming "{$from}" to "{$to}" +renamed = Renamed "{$from}" to "{$to}" restoring = Restoring {$items} {$items -> [one] item *[other] items diff --git a/src/operation.rs b/src/operation.rs index 2226f12..4e03cbb 100644 --- a/src/operation.rs +++ b/src/operation.rs @@ -303,6 +303,7 @@ async fn copy_or_move( } } if moving { + //TODO: optimize to fs::rename when possible fs_extra::file::move_file_with_progress( from, to,