From 41cb6528c21c88adab3ace8bff42d1356c60c272 Mon Sep 17 00:00:00 2001 From: ovari123 <ovari123@zoho.com> Date: Thu, 3 Oct 2024 15:32:31 -0400 Subject: [PATCH] misc: unify terminology MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit {Noun} {verb} successfully A(n) [type] error occurred while [attempting to] {verb} {noun}. placeAudioCall → startAudioCall placeVideoCall → startVideoCall reconnectTry → reconnectAttempt Change-Id: I918961894fc23989920727009031cc6a2ac1d8f3 GitLab: #1730 --- src/app/DaemonReconnectWindow.qml | 2 +- src/app/MainApplicationWindow.qml | 2 +- src/app/ViewCoordinator.qml | 6 +++--- src/app/dbuserrorhandler.cpp | 4 ++-- src/app/mainview/components/ChatViewHeader.qml | 4 ++-- src/app/net/jami/Constants/JamiStrings.qml | 14 ++++++-------- src/app/networkmanager.cpp | 2 +- src/app/screencastportal.cpp | 7 ++++--- .../components/PluginPreferencesView.qml | 2 +- src/app/systemtray.cpp | 2 +- src/app/utils.cpp | 10 ++++++---- src/app/utilsadapter.cpp | 2 +- src/app/videodevices.cpp | 6 +++--- src/libclient/contactmodel.cpp | 2 +- src/libclient/database.cpp | 8 ++++---- src/libclient/globalinstances.h | 2 +- src/libclient/shmrenderer.cpp | 13 +++++++------ 17 files changed, 45 insertions(+), 43 deletions(-) diff --git a/src/app/DaemonReconnectWindow.qml b/src/app/DaemonReconnectWindow.qml index 5a3fc8648..e3feb3741 100644 --- a/src/app/DaemonReconnectWindow.qml +++ b/src/app/DaemonReconnectWindow.qml @@ -85,7 +85,7 @@ ApplicationWindow { Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.topMargin: preferredMargin - text: connectionFailed ? JamiStrings.reconnectWarn : JamiStrings.reconnectTry + text: connectionFailed ? JamiStrings.reconnectWarn : JamiStrings.reconnectAttempt font.pointSize: 11 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/src/app/MainApplicationWindow.qml b/src/app/MainApplicationWindow.qml index 67f5ac409..18ce79e45 100644 --- a/src/app/MainApplicationWindow.qml +++ b/src/app/MainApplicationWindow.qml @@ -362,7 +362,7 @@ ApplicationWindow { function onUpdateCheckReplyReceived(ok, found) { if (!ok) { - // Show an error dialog describing that we could not successfully check for an update. + // Show an error dialog describing that an update check failed. presentUpdateInfoDialog(JamiStrings.updateCheckError); return; } diff --git a/src/app/ViewCoordinator.qml b/src/app/ViewCoordinator.qml index 4bd71e751..c978dafc5 100644 --- a/src/app/ViewCoordinator.qml +++ b/src/app/ViewCoordinator.qml @@ -145,7 +145,7 @@ QtObject { if (!view.managed) view.presented(); }, props)) { - print("could not create view:", viewName); + print("An error occurred while creating view:", viewName); } } @@ -184,7 +184,7 @@ QtObject { } else view = rootView.pop(StackView.Immediate); if (!view) { - print("could not pop view:", obj.objectName); + print("An error occurred while attempting to pop view:", obj.objectName); resolveStack(); return; } @@ -194,7 +194,7 @@ QtObject { if (view.managed) { var objectName = view ? view.objectName : obj.objectName; if (!viewManager.destroyView(resources[objectName])) { - print("could not destroy view:", objectName); + print("An error occurred while attempting to destroy view:", objectName); } else { print("destroyed view:", objectName); } diff --git a/src/app/dbuserrorhandler.cpp b/src/app/dbuserrorhandler.cpp index 4c474aa23..59b12c3c5 100644 --- a/src/app/dbuserrorhandler.cpp +++ b/src/app/dbuserrorhandler.cpp @@ -29,13 +29,13 @@ void DBusErrorHandler::errorCallback() { qDebug() << "Dring has possibly crashed, " - "or has been killed... will wait 2.5 seconds and try to reconnect"; + "or has been killed… will wait 2.5 seconds before attempting to reconnect."; Q_EMIT showDaemonReconnectPopup(true); QTimer::singleShot(2500, this, [this]() { if ((!lrc::api::Lrc::isConnected()) || (!lrc::api::Lrc::dbusIsValid())) { - qDebug() << "Could not reconnect to the daemon"; + qDebug() << "An error occurred while attempting to reconnect to the daemon."; Q_EMIT daemonReconnectFailed(); } else { static_cast<DBusErrorHandler&>(GlobalInstances::dBusErrorHandler()) diff --git a/src/app/mainview/components/ChatViewHeader.qml b/src/app/mainview/components/ChatViewHeader.qml index 05c12cedf..43f7f8b3d 100644 --- a/src/app/mainview/components/ChatViewHeader.qml +++ b/src/app/mainview/components/ChatViewHeader.qml @@ -152,7 +152,7 @@ Rectangle { visible: interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)) source: JamiResources.place_audiocall_24dp_svg - toolTipText: JamiStrings.placeAudioCall + toolTipText: JamiStrings.startAudioCall onClicked: CallAdapter.placeAudioOnlyCall() } @@ -164,7 +164,7 @@ Rectangle { CurrentAccount.videoEnabled_Video && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)) source: JamiResources.videocam_24dp_svg - toolTipText: JamiStrings.placeVideoCall + toolTipText: JamiStrings.startVideoCall onClicked: CallAdapter.placeCall() } diff --git a/src/app/net/jami/Constants/JamiStrings.qml b/src/app/net/jami/Constants/JamiStrings.qml index 6d7c3e628..19befd42f 100644 --- a/src/app/net/jami/Constants/JamiStrings.qml +++ b/src/app/net/jami/Constants/JamiStrings.qml @@ -29,7 +29,7 @@ Item { property string accept: qsTr("Accept") property string acceptAudio: qsTr("Accept in audio") property string acceptVideo: qsTr("Accept in video") - property string refuse: qsTr("Refuse") + property string refuse: qsTr("Decline") property string endCall: qsTr("End call") property string incomingAudioCallFrom: qsTr("Incoming audio call from {}") property string incomingVideoCallFrom: qsTr("Incoming video call from {}") @@ -40,8 +40,8 @@ Item { property string migrateConversation: qsTr("Migrate conversation") // DaemonReconnectWindow - property string reconnectWarn: qsTr("Could not re-connect to the Jami daemon (jamid).\nJami will now quit.") - property string reconnectTry: qsTr("Trying to reconnect to the Jami daemon (jamid)…") + property string reconnectWarn: qsTr("An error occurred while attempting to reconnect to the Jami daemon (jamid).\nJami will now quit.") + property string reconnectAttempt: qsTr("Attempting to reconnect to the Jami daemon (jamid)…") // AboutPopUp property string buildID: qsTr("Build ID") @@ -338,8 +338,6 @@ Item { // Chatview header property string hideChat: qsTr("Hide chat") - property string placeAudioCall: qsTr("Start audio call") - property string placeVideoCall: qsTr("Start video call") property string showExtensions: qsTr("Show available extensions") property string addToConversations: qsTr("Add to conversations") property string backendError: qsTr("A backend system error occurred: %0") @@ -416,11 +414,11 @@ Item { property string linkedOtherDevices: qsTr("Other linked devices") // CurrentAccountSettings && AdvancedSettings - property string backupSuccessful: qsTr("Backup successful") + property string backupSuccessful: qsTr("Backup completed successfully.") property string backupFailed: qsTr("An error occurred while backing up account.") - property string changePasswordSuccess: qsTr("Password changed successfully") + property string changePasswordSuccess: qsTr("Password changed successfully.") property string changePasswordFailed: qsTr("An error occurred while changing account password.") - property string setPasswordSuccess: qsTr("Password set successfully") + property string setPasswordSuccess: qsTr("Password set successfully.") property string setPasswordFailed: qsTr("An error occurred while setting account password.") property string changePassword: qsTr("Change password") property string setPassword: qsTr("Encrypt account") diff --git a/src/app/networkmanager.cpp b/src/app/networkmanager.cpp index 2957381aa..6d87a74e8 100644 --- a/src/app/networkmanager.cpp +++ b/src/app/networkmanager.cpp @@ -159,7 +159,7 @@ NetworkManager::downloadFile(const QUrl& url, if (!file->open(QIODevice::WriteOnly)) { Q_EMIT errorOccurred(GetError::ACCESS_DENIED); files_.remove(uuid); - qWarning() << Q_FUNC_INFO << "Could not open file for writing"; + qWarning() << Q_FUNC_INFO << "An error occurred while opening file for writing."; return 0; } diff --git a/src/app/screencastportal.cpp b/src/app/screencastportal.cpp index 07490395d..b0edf404d 100644 --- a/src/app/screencastportal.cpp +++ b/src/app/screencastportal.cpp @@ -454,7 +454,7 @@ ScreenCastPortal::getPipewireFd() g_main_loop_run(glib_main_loop); // The main loop will run until it's stopped by openPipewireRemote (if - // all DBus method calls were successfully), abort (in case of error) or + // all DBus method calls were successful), abort (in case of error) or // on_cancelled_callback (if a DBus request is cancelled). // In the latter two cases, pw_ctx->portal_error gets set to a nonzero value. if (portal_error) @@ -512,9 +512,10 @@ ScreenCastPortal::~ScreenCastPortal() // file descriptor needs to be closed by the client. if (close(pipewireFd) != 0) { int err = errno; - qWarning() << "Error while attempting to close PipeWire file descriptor: errno =" << err; + qWarning() << "An error occurred while attempting to close PipeWire file descriptor: errno =" + << err; } else { - qInfo() << "Successfully closed PipeWire file descriptor"; + qInfo() << "PipeWire file descriptor closed successfully."; } #endif } \ No newline at end of file diff --git a/src/app/settingsview/components/PluginPreferencesView.qml b/src/app/settingsview/components/PluginPreferencesView.qml index 737135da3..6fd0e6fe8 100644 --- a/src/app/settingsview/components/PluginPreferencesView.qml +++ b/src/app/settingsview/components/PluginPreferencesView.qml @@ -287,7 +287,7 @@ Item { PluginModel.uninstallPlugin(PluginId); PluginListModel.removePlugin(index); PluginAdapter.getPluginsFromStore(); - // could not call root from here + // Unable to call root from here settings.ListView.view.parent.closed(); }], "buttonRoles": [DialogButtonBox.AcceptRole, DialogButtonBox.RejectRole] diff --git a/src/app/systemtray.cpp b/src/app/systemtray.cpp index bcb8ed947..d9119ba37 100644 --- a/src/app/systemtray.cpp +++ b/src/app/systemtray.cpp @@ -168,7 +168,7 @@ SystemTray::hideNotification(const QString& id) // Close GError* error = nullptr; if (!notify_notification_close(notification->second.nn.get(), &error)) { - C_WARN << QString("could not close notification: %1").arg(error->message); + C_WARN << QString("An error occurred while closing notification: %1").arg(error->message); g_clear_error(&error); return false; } diff --git a/src/app/utils.cpp b/src/app/utils.cpp index 2291844b4..94686139e 100644 --- a/src/app/utils.cpp +++ b/src/app/utils.cpp @@ -170,7 +170,8 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName) #endif if (desktopPath.isEmpty() || !(QFile::exists(desktopPath))) { - qDebug() << "Could not locate .desktop file at" << desktopPath; + qDebug() << "An error occurred while attempting to locate .desktop file at" + << desktopPath; return false; } @@ -197,7 +198,8 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName) if (QDir().mkdir(autoStartDir)) { qDebug() << "Created autostart directory:" << autoStartDir; } else { - qWarning() << "Could not create autostart directory:" << autoStartDir; + qWarning() << "An error occurred while creating autostart directory:" + << autoStartDir; return false; } } @@ -207,7 +209,7 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName) QFile srcFile(desktopPath); bool result = srcFile.link(desktopFile); qDebug() << desktopFile - << (result ? "-> " + desktopPath + " successfully created" : "could not be created"); + << (result ? "-> " + desktopPath + " created successfully" : "unable to be created"); return result; #endif } @@ -265,7 +267,7 @@ Utils::DeleteStartupLink(const std::wstring& wstrAppName) QFile::remove(desktopFile); qDebug() << "Autostart disabled," << desktopFile << "removed"; } catch (...) { - qDebug() << "Could not remove" << desktopFile; + qDebug() << "Unable to remove" << desktopFile; } } else { qDebug() << desktopFile << "does not exist"; diff --git a/src/app/utilsadapter.cpp b/src/app/utilsadapter.cpp index e04e4088c..378889eaa 100644 --- a/src/app/utilsadapter.cpp +++ b/src/app/utilsadapter.cpp @@ -893,7 +893,7 @@ UtilsAdapter::createDummyImage() const qInfo() << "Dummy image created" << QDir::tempPath() + "/dummy.png"; return QDir::tempPath() + "/dummy.png"; } else { - C_WARN << "Could not create dummy image"; + C_WARN << "An error occurred while creating dummy image."; return ""; } } diff --git a/src/app/videodevices.cpp b/src/app/videodevices.cpp index f3003e43f..3364ac4a9 100644 --- a/src/app/videodevices.cpp +++ b/src/app/videodevices.cpp @@ -241,7 +241,7 @@ VideoDevices::startDevice(const QString& id, bool force) return {}; auto& avModel = lrcInstance_->avModel(); if (avModel.hasRenderer(id)) { - // If the device is already started AND we're NOT trying to + // If the device is already started AND we're NOT attempting to // force a format change, we can do nothing and return the // renderer id. if (!force) { @@ -263,7 +263,7 @@ VideoDevices::stopDevice(const QString& id) if (lrcInstance_->avModel().stopPreview(id)) { deviceOpen_ = false; } else { - C_DBG << "Failed to stop device" << id; + C_DBG << "An error occurred while attempting to stop device" << id; } } @@ -364,7 +364,7 @@ VideoDevices::onVideoDeviceEvent() auto& avModel = lrcInstance_->avModel(); QString callId = lrcInstance_->getCurrentCallId(); - // Decide whether a device has plugged, unplugged, or nothing has changed. + // Decide whether a device has been plugged in, unplugged, or nothing has changed. auto deviceList = avModel.getDevices(); auto currentDeviceListSize = deviceList.size(); auto previousDeviceListSize = get_listSize(); diff --git a/src/libclient/contactmodel.cpp b/src/libclient/contactmodel.cpp index 87ad4f7fb..e3673d484 100644 --- a/src/libclient/contactmodel.cpp +++ b/src/libclient/contactmodel.cpp @@ -1222,7 +1222,7 @@ ContactModelPimpl::slotUserSearchEnded(const QString& accountId, updateTemporaryMessage(""); break; case 3: /* ERROR */ - updateTemporaryMessage("could not find contact matching search"); + updateTemporaryMessage("Unable to find contact matching search"); break; default: break; diff --git a/src/libclient/database.cpp b/src/libclient/database.cpp index 6c3c252b3..a0d8ebc8e 100644 --- a/src/libclient/database.cpp +++ b/src/libclient/database.cpp @@ -104,7 +104,7 @@ Database::load() // open the database. if (not db_.open()) { std::stringstream ss; - ss << "cannot open database: " << connectionName_.toStdString(); + ss << "Unable to open database: " << connectionName_.toStdString(); throw std::runtime_error(ss.str()); } @@ -116,7 +116,7 @@ Database::load() QSqlDatabase::database(connectionName_).commit(); } catch (QueryError& e) { QSqlDatabase::database(connectionName_).rollback(); - throw std::runtime_error("Could not correctly create the database"); + throw std::runtime_error("An error occurred while creating the database."); } } else { migrateIfNeeded(); @@ -184,7 +184,7 @@ Database::migrateIfNeeded() QSqlDatabase::database().commit(); } catch (QueryError& e) { QSqlDatabase::database().rollback(); - throw std::runtime_error("Could not correctly migrate the database"); + throw std::runtime_error("An error occurred while migrating the database"); } } @@ -193,7 +193,7 @@ Database::migrateFromVersion(const QString& currentVersion) { // If we ever have a new version, we can migrate the database here. LC_WARN << "Database migration from version " << currentVersion << " to " << version_ - << " not implemented"; + << " not implemented."; } void diff --git a/src/libclient/globalinstances.h b/src/libclient/globalinstances.h index 12fa5e3dd..b136e64de 100644 --- a/src/libclient/globalinstances.h +++ b/src/libclient/globalinstances.h @@ -80,7 +80,7 @@ setInterface(Ts... args) auto i = new I(args...); setInterfaceInternal(i); } catch (void* e) { // TODO define some kind of object for errors like this - qDebug() << "Interface could not be set"; + qDebug() << "An error occurred while setting the interface."; } } diff --git a/src/libclient/shmrenderer.cpp b/src/libclient/shmrenderer.cpp index 27043cbec..f95c48d00 100644 --- a/src/libclient/shmrenderer.cpp +++ b/src/libclient/shmrenderer.cpp @@ -162,7 +162,7 @@ public: // map frame data if (!remapShm()) { - qDebug() << "Could not resize shared memory"; + qDebug() << "An error occurred resizing shared memory."; return false; } @@ -191,7 +191,7 @@ public: shmUnlock(); if (::munmap(shmArea, shmAreaLen)) { - qDebug() << "Could not unmap shared area: " << strerror(errno); + qDebug() << "An error occurred unmapping shared area:" << strerror(errno); return false; } @@ -199,7 +199,7 @@ public: = (SHMHeader*) ::mmap(nullptr, mapSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmArea == MAP_FAILED) { - qDebug() << "Could not remap shared area: " << strerror(errno); + qDebug() << "An error occurred remapping shared area:" << strerror(errno); return false; } @@ -261,8 +261,9 @@ ShmRenderer::startShm() pimpl_->fd = ::shm_open(pimpl_->path.toLatin1(), O_RDWR, 0); if (pimpl_->fd < 0) { - qWarning() << "could not open shm area" << pimpl_->path - << ", shm_open failed:" << strerror(errno); + qWarning() << "An error occurred opening shm area" + << pimpl_->path << ", shm_open failed:" + << strerror(errno); return false; } @@ -272,7 +273,7 @@ ShmRenderer::startShm() = (SHMHeader*) ::mmap(nullptr, mapSize, PROT_READ | PROT_WRITE, MAP_SHARED, pimpl_->fd, 0); if (pimpl_->shmArea == MAP_FAILED) { - qWarning() << "Could not remap shared area"; + qWarning() << "An error occurred while remapping shared area."; return false; } -- GitLab