From dbb8eecf292626a59b52d3c524d41f102716f235 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 28 Jul 2019 16:16:02 +0200 Subject: [PATCH] media->file in error message, when image upload fails --- resources/langs/nheko_de.ts | 23 ++++------------------- resources/langs/nheko_el.ts | 23 ++++------------------- resources/langs/nheko_en.ts | 23 ++++------------------- resources/langs/nheko_fi.ts | 23 ++++------------------- resources/langs/nheko_fr.ts | 23 ++++------------------- resources/langs/nheko_nl.ts | 23 ++++------------------- resources/langs/nheko_pl.ts | 27 ++++++--------------------- resources/langs/nheko_ru.ts | 27 ++++++--------------------- resources/langs/nheko_zh_CN.ts | 27 ++++++--------------------- src/dialogs/MemberList.cpp | 2 +- src/dialogs/ReadReceipts.cpp | 2 +- src/dialogs/RoomSettings.cpp | 6 +++--- src/dialogs/UserProfile.cpp | 2 +- 13 files changed, 48 insertions(+), 183 deletions(-) diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index a3acae8..1f856b8 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -835,16 +835,11 @@ Medien-Größe: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -952,12 +947,7 @@ Medien-Größe: %2 - - ESC - - - - + Failed to enable encryption: %1 @@ -973,12 +963,12 @@ Medien-Größe: %2 - The selected media is not an image + The selected file is not an image - Error while reading media: %1 + Error while reading file: %1 @@ -1015,11 +1005,6 @@ Medien-Größe: %2 Devices - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 462f523..e50aada 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -833,16 +833,11 @@ Media size: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -950,12 +945,7 @@ Media size: %2 - - ESC - - - - + Failed to enable encryption: %1 @@ -971,12 +961,12 @@ Media size: %2 - The selected media is not an image + The selected file is not an image - Error while reading media: %1 + Error while reading file: %1 @@ -1013,11 +1003,6 @@ Media size: %2 Devices - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index afd4c81..e031c4e 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -833,16 +833,11 @@ Media size: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -950,12 +945,7 @@ Media size: %2 - - ESC - - - - + Failed to enable encryption: %1 @@ -971,12 +961,12 @@ Media size: %2 - The selected media is not an image + The selected file is not an image - Error while reading media: %1 + Error while reading file: %1 @@ -1013,11 +1003,6 @@ Media size: %2 Devices - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index 789a4eb..2baba55 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -833,16 +833,11 @@ Media size: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -950,12 +945,7 @@ Media size: %2 - - ESC - - - - + Failed to enable encryption: %1 @@ -971,12 +961,12 @@ Media size: %2 - The selected media is not an image + The selected file is not an image - Error while reading media: %1 + Error while reading file: %1 @@ -1013,11 +1003,6 @@ Media size: %2 Devices - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index b8c0d6d..355c432 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -836,16 +836,11 @@ Taille du média : %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -953,12 +948,7 @@ Taille du média : %2 - - ESC - - - - + Failed to enable encryption: %1 @@ -974,12 +964,12 @@ Taille du média : %2 - The selected media is not an image + The selected file is not an image - Error while reading media: %1 + Error while reading file: %1 @@ -1016,11 +1006,6 @@ Taille du média : %2 Devices - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index b1be013..db56dc0 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -835,16 +835,11 @@ Mediagrootte: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -952,12 +947,7 @@ Mediagrootte: %2 - - ESC - - - - + Failed to enable encryption: %1 @@ -973,12 +963,12 @@ Mediagrootte: %2 - The selected media is not an image + The selected file is not an image - Error while reading media: %1 + Error while reading file: %1 @@ -1015,11 +1005,6 @@ Mediagrootte: %2 Devices - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index 2f7c903..34a4ed2 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -835,16 +835,11 @@ Rozmiar multimediów: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -955,12 +950,7 @@ Rozmiar multimediów: %2 - - ESC - - - - + Failed to enable encryption: %1 Nie udało się włączyć szyfrowania: %1 @@ -976,13 +966,13 @@ Rozmiar multimediów: %2 - The selected media is not an image - Wybrany plik multimedialny nie jest obrazem + The selected file is not an image + - Error while reading media: %1 - Błąd odczytywania pliku: %1 + Error while reading file: %1 + @@ -1018,11 +1008,6 @@ Rozmiar multimediów: %2 Devices Urządzenia - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 097067d..afe36ef 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -836,16 +836,11 @@ Media size: %2 Close Закрыть - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -954,12 +949,7 @@ Media size: %2 - - ESC - - - - + Failed to enable encryption: %1 Не удалось включить шифрование: %1 @@ -975,13 +965,13 @@ Media size: %2 - The selected media is not an image - Выбранное медия не является изображением + The selected file is not an image + - Error while reading media: %1 - Ошибка при чтении медия: %1 + Error while reading file: %1 + @@ -1017,11 +1007,6 @@ Media size: %2 Devices Устройства - - - ESC - - emoji::Panel diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 2481f98..607b2ba 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -835,16 +835,11 @@ Media size: %2 Close - - - ESC - - dialogs::ReceiptItem - + Today %1 @@ -953,12 +948,7 @@ Media size: %2 - - ESC - - - - + Failed to enable encryption: %1 启用加密失败:%1 @@ -974,13 +964,13 @@ Media size: %2 - The selected media is not an image - 选择的媒体不是一个图像 + The selected file is not an image + - Error while reading media: %1 - 读取媒体时失败:%1 + Error while reading file: %1 + @@ -1016,11 +1006,6 @@ Media size: %2 Devices 设备 - - - ESC - - emoji::Panel diff --git a/src/dialogs/MemberList.cpp b/src/dialogs/MemberList.cpp index 3b957c1..88a9540 100644 --- a/src/dialogs/MemberList.cpp +++ b/src/dialogs/MemberList.cpp @@ -126,7 +126,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent) qCritical() << e.what(); } - auto closeShortcut = new QShortcut(QKeySequence("ESC"), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &MemberList::close); connect(okBtn, &QPushButton::clicked, this, &MemberList::close); } diff --git a/src/dialogs/ReadReceipts.cpp b/src/dialogs/ReadReceipts.cpp index 03ce306..5a0d98c 100644 --- a/src/dialogs/ReadReceipts.cpp +++ b/src/dialogs/ReadReceipts.cpp @@ -133,7 +133,7 @@ ReadReceipts::ReadReceipts(QWidget *parent) layout->addWidget(userList_); layout->addLayout(buttonLayout); - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &ReadReceipts::close); connect(okBtn, &QPushButton::clicked, this, &ReadReceipts::close); } diff --git a/src/dialogs/RoomSettings.cpp b/src/dialogs/RoomSettings.cpp index b2344f2..1fe5904 100644 --- a/src/dialogs/RoomSettings.cpp +++ b/src/dialogs/RoomSettings.cpp @@ -438,7 +438,7 @@ RoomSettings::RoomSettings(const QString &room_id, QWidget *parent) resetErrorLabel(); }); - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &RoomSettings::close); connect(okBtn, &QPushButton::clicked, this, &RoomSettings::close); } @@ -668,12 +668,12 @@ RoomSettings::updateAvatar() QFile file{fileName, this}; if (format != "image") { - displayErrorMessage(tr("The selected media is not an image")); + displayErrorMessage(tr("The selected file is not an image")); return; } if (!file.open(QIODevice::ReadOnly)) { - displayErrorMessage(tr("Error while reading media: %1").arg(file.errorString())); + displayErrorMessage(tr("Error while reading file: %1").arg(file.errorString())); return; } diff --git a/src/dialogs/UserProfile.cpp b/src/dialogs/UserProfile.cpp index b8040f9..6aea96a 100644 --- a/src/dialogs/UserProfile.cpp +++ b/src/dialogs/UserProfile.cpp @@ -183,7 +183,7 @@ UserProfile::UserProfile(QWidget *parent) qRegisterMetaType>(); - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &UserProfile::close); connect(okBtn, &QPushButton::clicked, this, &UserProfile::close); }