From cc8e47cfc8d054f28ae54bf1e30863c3e6996885 Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 6 Oct 2026 19:00:18 +0200 Subject: [PATCH] chatgui: localize file drop hints and attachment rejection messages --- tools/chatgui/src/inputbar.cpp | 2 +- tools/chatgui/translations/chatgui_en.ts | 7 +++++++ tools/chatgui/translations/chatgui_ru.ts | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/chatgui/src/inputbar.cpp b/tools/chatgui/src/inputbar.cpp index 834019d8..65029c47 100644 --- a/tools/chatgui/src/inputbar.cpp +++ b/tools/chatgui/src/inputbar.cpp @@ -220,7 +220,7 @@ void InputBar::installFileDropTarget(QWidget* target) { target->setAcceptDrops(true); target->installEventFilter(this); m_dropTargets.insert(target); - connect(target, &QObject::destroyed, this, [this, target] { m_dropTargets.remove(target); }); + if (target != this) connect(target, &QObject::destroyed, this, [this, target] { m_dropTargets.remove(target); }); GUI_DEBUG("InputBar: file drop target installed class=%s", target->metaObject()->className()); } diff --git a/tools/chatgui/translations/chatgui_en.ts b/tools/chatgui/translations/chatgui_en.ts index d9f743ab..0431c402 100644 --- a/tools/chatgui/translations/chatgui_en.ts +++ b/tools/chatgui/translations/chatgui_en.ts @@ -2115,5 +2115,12 @@ Directories: %5 Cannot update group avatarCannot update group avatar Group avatar updatedGroup avatar updated Chat is stoppedChat is stopped + Drop a file to attachDrop a file to attach + Drop one file at a time.Drop one file at a time. + Only local files can be attached.Only local files can be attached. + Attachment cancelled: the chat changed or attachments are unavailable.Attachment cancelled: the chat changed or attachments are unavailable. + Select an existing, readable file.Select an existing, readable file. + Cannot attach an empty file.Cannot attach an empty file. + Cannot create the attachment directory.Cannot create the attachment directory. diff --git a/tools/chatgui/translations/chatgui_ru.ts b/tools/chatgui/translations/chatgui_ru.ts index 93a9c1ec..f7fcfdb6 100644 --- a/tools/chatgui/translations/chatgui_ru.ts +++ b/tools/chatgui/translations/chatgui_ru.ts @@ -2115,5 +2115,12 @@ Directories: %5 Cannot update group avatarНе удалось изменить аватарку группы Group avatar updatedАватарка группы обновлена Chat is stoppedЧат остановлен + Drop a file to attachПеретащите файл для прикрепления + Drop one file at a time.Перетаскивайте по одному файлу. + Only local files can be attached.Можно прикреплять только локальные файлы. + Attachment cancelled: the chat changed or attachments are unavailable.Прикрепление отменено: чат изменился или вложения недоступны. + Select an existing, readable file.Выберите существующий файл, доступный для чтения. + Cannot attach an empty file.Нельзя прикрепить пустой файл. + Cannot create the attachment directory.Не удалось создать каталог для вложения.