1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-02 13:55:40 +02:00

misc: unify terminology

{Noun} {verb} successfully
A(n) [type] error occurred while [attempting to] {verb} {noun}.
placeAudioCall → startAudioCall
placeVideoCall → startVideoCall
reconnectTry → reconnectAttempt

Change-Id: I918961894fc23989920727009031cc6a2ac1d8f3
GitLab: #1730
This commit is contained in:
ovari123 2024-10-03 15:32:31 -04:00 committed by ovari123@zoho.com
parent b6aa9eedfa
commit 41cb6528c2
17 changed files with 45 additions and 43 deletions

View file

@ -85,7 +85,7 @@ ApplicationWindow {
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.topMargin: preferredMargin Layout.topMargin: preferredMargin
text: connectionFailed ? JamiStrings.reconnectWarn : JamiStrings.reconnectTry text: connectionFailed ? JamiStrings.reconnectWarn : JamiStrings.reconnectAttempt
font.pointSize: 11 font.pointSize: 11
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -362,7 +362,7 @@ ApplicationWindow {
function onUpdateCheckReplyReceived(ok, found) { function onUpdateCheckReplyReceived(ok, found) {
if (!ok) { 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); presentUpdateInfoDialog(JamiStrings.updateCheckError);
return; return;
} }

View file

@ -145,7 +145,7 @@ QtObject {
if (!view.managed) if (!view.managed)
view.presented(); view.presented();
}, props)) { }, props)) {
print("could not create view:", viewName); print("An error occurred while creating view:", viewName);
} }
} }
@ -184,7 +184,7 @@ QtObject {
} else } else
view = rootView.pop(StackView.Immediate); view = rootView.pop(StackView.Immediate);
if (!view) { if (!view) {
print("could not pop view:", obj.objectName); print("An error occurred while attempting to pop view:", obj.objectName);
resolveStack(); resolveStack();
return; return;
} }
@ -194,7 +194,7 @@ QtObject {
if (view.managed) { if (view.managed) {
var objectName = view ? view.objectName : obj.objectName; var objectName = view ? view.objectName : obj.objectName;
if (!viewManager.destroyView(resources[objectName])) { if (!viewManager.destroyView(resources[objectName])) {
print("could not destroy view:", objectName); print("An error occurred while attempting to destroy view:", objectName);
} else { } else {
print("destroyed view:", objectName); print("destroyed view:", objectName);
} }

View file

@ -29,13 +29,13 @@ void
DBusErrorHandler::errorCallback() DBusErrorHandler::errorCallback()
{ {
qDebug() << "Dring has possibly crashed, " 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); Q_EMIT showDaemonReconnectPopup(true);
QTimer::singleShot(2500, this, [this]() { QTimer::singleShot(2500, this, [this]() {
if ((!lrc::api::Lrc::isConnected()) || (!lrc::api::Lrc::dbusIsValid())) { 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(); Q_EMIT daemonReconnectFailed();
} else { } else {
static_cast<DBusErrorHandler&>(GlobalInstances::dBusErrorHandler()) static_cast<DBusErrorHandler&>(GlobalInstances::dBusErrorHandler())

View file

@ -152,7 +152,7 @@ Rectangle {
visible: interactionButtonsVisibility && visible: interactionButtonsVisibility &&
(!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)) (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
source: JamiResources.place_audiocall_24dp_svg source: JamiResources.place_audiocall_24dp_svg
toolTipText: JamiStrings.placeAudioCall toolTipText: JamiStrings.startAudioCall
onClicked: CallAdapter.placeAudioOnlyCall() onClicked: CallAdapter.placeAudioOnlyCall()
} }
@ -164,7 +164,7 @@ Rectangle {
CurrentAccount.videoEnabled_Video && CurrentAccount.videoEnabled_Video &&
(!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)) (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
source: JamiResources.videocam_24dp_svg source: JamiResources.videocam_24dp_svg
toolTipText: JamiStrings.placeVideoCall toolTipText: JamiStrings.startVideoCall
onClicked: CallAdapter.placeCall() onClicked: CallAdapter.placeCall()
} }

View file

@ -29,7 +29,7 @@ Item {
property string accept: qsTr("Accept") property string accept: qsTr("Accept")
property string acceptAudio: qsTr("Accept in audio") property string acceptAudio: qsTr("Accept in audio")
property string acceptVideo: qsTr("Accept in video") 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 endCall: qsTr("End call")
property string incomingAudioCallFrom: qsTr("Incoming audio call from {}") property string incomingAudioCallFrom: qsTr("Incoming audio call from {}")
property string incomingVideoCallFrom: qsTr("Incoming video call from {}") property string incomingVideoCallFrom: qsTr("Incoming video call from {}")
@ -40,8 +40,8 @@ Item {
property string migrateConversation: qsTr("Migrate conversation") property string migrateConversation: qsTr("Migrate conversation")
// DaemonReconnectWindow // DaemonReconnectWindow
property string reconnectWarn: qsTr("Could not re-connect to the Jami daemon (jamid).\nJami will now quit.") property string reconnectWarn: qsTr("An error occurred while attempting to reconnect to the Jami daemon (jamid).\nJami will now quit.")
property string reconnectTry: qsTr("Trying to reconnect to the Jami daemon (jamid)…") property string reconnectAttempt: qsTr("Attempting to reconnect to the Jami daemon (jamid)…")
// AboutPopUp // AboutPopUp
property string buildID: qsTr("Build ID") property string buildID: qsTr("Build ID")
@ -338,8 +338,6 @@ Item {
// Chatview header // Chatview header
property string hideChat: qsTr("Hide chat") 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 showExtensions: qsTr("Show available extensions")
property string addToConversations: qsTr("Add to conversations") property string addToConversations: qsTr("Add to conversations")
property string backendError: qsTr("A backend system error occurred: %0") property string backendError: qsTr("A backend system error occurred: %0")
@ -416,11 +414,11 @@ Item {
property string linkedOtherDevices: qsTr("Other linked devices") property string linkedOtherDevices: qsTr("Other linked devices")
// CurrentAccountSettings && AdvancedSettings // 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 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 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 setPasswordFailed: qsTr("An error occurred while setting account password.")
property string changePassword: qsTr("Change password") property string changePassword: qsTr("Change password")
property string setPassword: qsTr("Encrypt account") property string setPassword: qsTr("Encrypt account")

View file

@ -159,7 +159,7 @@ NetworkManager::downloadFile(const QUrl& url,
if (!file->open(QIODevice::WriteOnly)) { if (!file->open(QIODevice::WriteOnly)) {
Q_EMIT errorOccurred(GetError::ACCESS_DENIED); Q_EMIT errorOccurred(GetError::ACCESS_DENIED);
files_.remove(uuid); 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; return 0;
} }

View file

@ -454,7 +454,7 @@ ScreenCastPortal::getPipewireFd()
g_main_loop_run(glib_main_loop); g_main_loop_run(glib_main_loop);
// The main loop will run until it's stopped by openPipewireRemote (if // 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). // on_cancelled_callback (if a DBus request is cancelled).
// In the latter two cases, pw_ctx->portal_error gets set to a nonzero value. // In the latter two cases, pw_ctx->portal_error gets set to a nonzero value.
if (portal_error) if (portal_error)
@ -512,9 +512,10 @@ ScreenCastPortal::~ScreenCastPortal()
// file descriptor needs to be closed by the client. // file descriptor needs to be closed by the client.
if (close(pipewireFd) != 0) { if (close(pipewireFd) != 0) {
int err = errno; 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 { } else {
qInfo() << "Successfully closed PipeWire file descriptor"; qInfo() << "PipeWire file descriptor closed successfully.";
} }
#endif #endif
} }

View file

@ -287,7 +287,7 @@ Item {
PluginModel.uninstallPlugin(PluginId); PluginModel.uninstallPlugin(PluginId);
PluginListModel.removePlugin(index); PluginListModel.removePlugin(index);
PluginAdapter.getPluginsFromStore(); PluginAdapter.getPluginsFromStore();
// could not call root from here // Unable to call root from here
settings.ListView.view.parent.closed(); settings.ListView.view.parent.closed();
}], }],
"buttonRoles": [DialogButtonBox.AcceptRole, DialogButtonBox.RejectRole] "buttonRoles": [DialogButtonBox.AcceptRole, DialogButtonBox.RejectRole]

View file

@ -168,7 +168,7 @@ SystemTray::hideNotification(const QString& id)
// Close // Close
GError* error = nullptr; GError* error = nullptr;
if (!notify_notification_close(notification->second.nn.get(), &error)) { 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); g_clear_error(&error);
return false; return false;
} }

View file

@ -170,7 +170,8 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName)
#endif #endif
if (desktopPath.isEmpty() || !(QFile::exists(desktopPath))) { 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; return false;
} }
@ -197,7 +198,8 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName)
if (QDir().mkdir(autoStartDir)) { if (QDir().mkdir(autoStartDir)) {
qDebug() << "Created autostart directory:" << autoStartDir; qDebug() << "Created autostart directory:" << autoStartDir;
} else { } else {
qWarning() << "Could not create autostart directory:" << autoStartDir; qWarning() << "An error occurred while creating autostart directory:"
<< autoStartDir;
return false; return false;
} }
} }
@ -207,7 +209,7 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName)
QFile srcFile(desktopPath); QFile srcFile(desktopPath);
bool result = srcFile.link(desktopFile); bool result = srcFile.link(desktopFile);
qDebug() << desktopFile qDebug() << desktopFile
<< (result ? "-> " + desktopPath + " successfully created" : "could not be created"); << (result ? "-> " + desktopPath + " created successfully" : "unable to be created");
return result; return result;
#endif #endif
} }
@ -265,7 +267,7 @@ Utils::DeleteStartupLink(const std::wstring& wstrAppName)
QFile::remove(desktopFile); QFile::remove(desktopFile);
qDebug() << "Autostart disabled," << desktopFile << "removed"; qDebug() << "Autostart disabled," << desktopFile << "removed";
} catch (...) { } catch (...) {
qDebug() << "Could not remove" << desktopFile; qDebug() << "Unable to remove" << desktopFile;
} }
} else { } else {
qDebug() << desktopFile << "does not exist"; qDebug() << desktopFile << "does not exist";

View file

@ -893,7 +893,7 @@ UtilsAdapter::createDummyImage() const
qInfo() << "Dummy image created" << QDir::tempPath() + "/dummy.png"; qInfo() << "Dummy image created" << QDir::tempPath() + "/dummy.png";
return QDir::tempPath() + "/dummy.png"; return QDir::tempPath() + "/dummy.png";
} else { } else {
C_WARN << "Could not create dummy image"; C_WARN << "An error occurred while creating dummy image.";
return ""; return "";
} }
} }

View file

@ -241,7 +241,7 @@ VideoDevices::startDevice(const QString& id, bool force)
return {}; return {};
auto& avModel = lrcInstance_->avModel(); auto& avModel = lrcInstance_->avModel();
if (avModel.hasRenderer(id)) { 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 // force a format change, we can do nothing and return the
// renderer id. // renderer id.
if (!force) { if (!force) {
@ -263,7 +263,7 @@ VideoDevices::stopDevice(const QString& id)
if (lrcInstance_->avModel().stopPreview(id)) { if (lrcInstance_->avModel().stopPreview(id)) {
deviceOpen_ = false; deviceOpen_ = false;
} else { } 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(); auto& avModel = lrcInstance_->avModel();
QString callId = lrcInstance_->getCurrentCallId(); 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 deviceList = avModel.getDevices();
auto currentDeviceListSize = deviceList.size(); auto currentDeviceListSize = deviceList.size();
auto previousDeviceListSize = get_listSize(); auto previousDeviceListSize = get_listSize();

View file

@ -1222,7 +1222,7 @@ ContactModelPimpl::slotUserSearchEnded(const QString& accountId,
updateTemporaryMessage(""); updateTemporaryMessage("");
break; break;
case 3: /* ERROR */ case 3: /* ERROR */
updateTemporaryMessage("could not find contact matching search"); updateTemporaryMessage("Unable to find contact matching search");
break; break;
default: default:
break; break;

View file

@ -104,7 +104,7 @@ Database::load()
// open the database. // open the database.
if (not db_.open()) { if (not db_.open()) {
std::stringstream ss; std::stringstream ss;
ss << "cannot open database: " << connectionName_.toStdString(); ss << "Unable to open database: " << connectionName_.toStdString();
throw std::runtime_error(ss.str()); throw std::runtime_error(ss.str());
} }
@ -116,7 +116,7 @@ Database::load()
QSqlDatabase::database(connectionName_).commit(); QSqlDatabase::database(connectionName_).commit();
} catch (QueryError& e) { } catch (QueryError& e) {
QSqlDatabase::database(connectionName_).rollback(); 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 { } else {
migrateIfNeeded(); migrateIfNeeded();
@ -184,7 +184,7 @@ Database::migrateIfNeeded()
QSqlDatabase::database().commit(); QSqlDatabase::database().commit();
} catch (QueryError& e) { } catch (QueryError& e) {
QSqlDatabase::database().rollback(); 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. // If we ever have a new version, we can migrate the database here.
LC_WARN << "Database migration from version " << currentVersion << " to " << version_ LC_WARN << "Database migration from version " << currentVersion << " to " << version_
<< " not implemented"; << " not implemented.";
} }
void void

View file

@ -80,7 +80,7 @@ setInterface(Ts... args)
auto i = new I(args...); auto i = new I(args...);
setInterfaceInternal(i); setInterfaceInternal(i);
} catch (void* e) { // TODO define some kind of object for errors like this } 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.";
} }
} }

View file

@ -162,7 +162,7 @@ public:
// map frame data // map frame data
if (!remapShm()) { if (!remapShm()) {
qDebug() << "Could not resize shared memory"; qDebug() << "An error occurred resizing shared memory.";
return false; return false;
} }
@ -191,7 +191,7 @@ public:
shmUnlock(); shmUnlock();
if (::munmap(shmArea, shmAreaLen)) { if (::munmap(shmArea, shmAreaLen)) {
qDebug() << "Could not unmap shared area: " << strerror(errno); qDebug() << "An error occurred unmapping shared area:" << strerror(errno);
return false; return false;
} }
@ -199,7 +199,7 @@ public:
= (SHMHeader*) ::mmap(nullptr, mapSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); = (SHMHeader*) ::mmap(nullptr, mapSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (shmArea == MAP_FAILED) { if (shmArea == MAP_FAILED) {
qDebug() << "Could not remap shared area: " << strerror(errno); qDebug() << "An error occurred remapping shared area:" << strerror(errno);
return false; return false;
} }
@ -261,8 +261,9 @@ ShmRenderer::startShm()
pimpl_->fd = ::shm_open(pimpl_->path.toLatin1(), O_RDWR, 0); pimpl_->fd = ::shm_open(pimpl_->path.toLatin1(), O_RDWR, 0);
if (pimpl_->fd < 0) { if (pimpl_->fd < 0) {
qWarning() << "could not open shm area" << pimpl_->path qWarning() << "An error occurred opening shm area"
<< ", shm_open failed:" << strerror(errno); << pimpl_->path << ", shm_open failed:"
<< strerror(errno);
return false; return false;
} }
@ -272,7 +273,7 @@ ShmRenderer::startShm()
= (SHMHeader*) ::mmap(nullptr, mapSize, PROT_READ | PROT_WRITE, MAP_SHARED, pimpl_->fd, 0); = (SHMHeader*) ::mmap(nullptr, mapSize, PROT_READ | PROT_WRITE, MAP_SHARED, pimpl_->fd, 0);
if (pimpl_->shmArea == MAP_FAILED) { if (pimpl_->shmArea == MAP_FAILED) {
qWarning() << "Could not remap shared area"; qWarning() << "An error occurred while remapping shared area.";
return false; return false;
} }