Browse Source

Confirm recursive deletion and localize removal progress

master
evgeny 2 days ago
parent
commit
afc54eae00
  1. 5
      tools/chatgui/src/member_files/browser.cpp
  2. 16
      tools/chatgui/translations/chatgui_en.ts
  3. 16
      tools/chatgui/translations/chatgui_ru.ts

5
tools/chatgui/src/member_files/browser.cpp

@ -642,8 +642,9 @@ void MemberFileBrowser::mutate(uint8_t command) {
auto entries = selectedEntries(); if (entries.isEmpty()) return;
QPointer<MemberFileBrowser> guard(this);
m_dropId = requestId(); updateActions();
QString prompt = entries.size() == 1 ? text("Delete %1?").arg(entries.first().remote) :
text("Delete %1 selected entries? Non-empty folders will not be removed.").arg(entries.size());
QString prompt = entries.size() == 1
? (entries.first().directory ? text("Delete %1 and all its contents?") : text("Delete %1?")).arg(entries.first().remote)
: text("Delete %1 selected entries and all folder contents?").arg(entries.size());
auto answer = QMessageBox::question(this, text("Delete"), prompt, QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
if (!guard) return;
bool cancelled = !m_dropId; m_dropId = 0; updateActions();

16
tools/chatgui/translations/chatgui_en.ts

@ -52,8 +52,20 @@
<translation>File and folder types conflict: %1</translation>
</message>
<message>
<source>Delete %1 selected entries? Non-empty folders will not be removed.</source>
<translation>Delete %1 selected entries? Non-empty folders will not be removed.</translation>
<source>Delete %1 selected entries and all folder contents?</source>
<translation>Delete %1 selected entries and all folder contents?</translation>
</message>
<message>
<source>Delete %1 and all its contents?</source>
<translation>Delete %1 and all its contents?</translation>
</message>
<message>
<source>Preparing deletion: %1 entries found — %2</source>
<translation>Preparing deletion: %1 entries found — %2</translation>
</message>
<message>
<source>Deletion cancelled</source>
<translation>Deletion cancelled</translation>
</message>
<message>
<source>Copy file</source>

16
tools/chatgui/translations/chatgui_ru.ts

@ -52,8 +52,20 @@
<translation>Конфликт типов файла и папки: %1</translation>
</message>
<message>
<source>Delete %1 selected entries? Non-empty folders will not be removed.</source>
<translation>Удалить выбранные объекты (%1)? Непустые папки удалены не будут.</translation>
<source>Delete %1 selected entries and all folder contents?</source>
<translation>Удалить выбранные объекты (%1) и всё содержимое папок?</translation>
</message>
<message>
<source>Delete %1 and all its contents?</source>
<translation>Удалить %1 и всё содержимое?</translation>
</message>
<message>
<source>Preparing deletion: %1 entries found — %2</source>
<translation>Подготовка удаления: найдено объектов — %1; %2</translation>
</message>
<message>
<source>Deletion cancelled</source>
<translation>Удаление отменено</translation>
</message>
<message>
<source>Copy file</source>

Loading…
Cancel
Save