misc: unify terminology
8+3 filename → 8.3 filename
be ware → beware
{cannot, can not, can't, could not, couldn't} → unable to
familly → family
file name → filename
informations → information
plateform → platform
trial → attempt
trying to → attempting to
{web-server, webserver} → Web server
Change-Id: I33b1a0091b5af4f0f055bd4c21b2a05a39adbc50
GitLab: https://git.jami.net/savoirfairelinux/jami-client-qt/issues/1730
diff --git a/src/upnp/protocol/natpmp/nat_pmp.cpp b/src/upnp/protocol/natpmp/nat_pmp.cpp
index 60d6bf5..c7e3d6f 100644
--- a/src/upnp/protocol/natpmp/nat_pmp.cpp
+++ b/src/upnp/protocol/natpmp/nat_pmp.cpp
@@ -74,7 +74,7 @@
igd_->setPublicIp(IpAddr());
igd_->setUID("");
- if (logger_) logger_->debug("NAT-PMP: Trying to initialize IGD");
+ if (logger_) logger_->debug("NAT-PMP: Attempting to initialize IGD");
int err = initnatpmp(&natpmpHdl_, 0, 0);
@@ -82,10 +82,10 @@
if (logger_) logger_->warn("NAT-PMP: Initializing IGD using default gateway failed!");
const auto& localGw = ip_utils::getLocalGateway();
if (not localGw) {
- if (logger_) logger_->warn("NAT-PMP: Couldn't find valid gateway on local host");
+ if (logger_) logger_->warn("NAT-PMP: Unable to find valid gateway on local host");
err = NATPMP_ERR_CANNOTGETGATEWAY;
} else {
- if (logger_) logger_->warn("NAT-PMP: Trying to initialize using detected gateway {}",
+ if (logger_) logger_->warn("NAT-PMP: Attempting to initialize using detected gateway {}",
localGw.toString());
struct in_addr inaddr;
inet_pton(AF_INET, localGw.toString().c_str(), &inaddr);
@@ -94,7 +94,7 @@
}
if (err < 0) {
- if (logger_) logger_->error("NAT-PMP: Can't initialize libnatpmp -> {}", getNatPmpErrorStr(err));
+ if (logger_) logger_->error("NAT-PMP: Unable to initialize libnatpmp -> {}", getNatPmpErrorStr(err));
return;
}
@@ -206,7 +206,7 @@
}
});
} else {
- if (logger_) logger_->warn("NAT-PMP: Setup failed after {} trials. NAT-PMP will be disabled!",
+ if (logger_) logger_->warn("NAT-PMP: Setup failed after {} attempts. NAT-PMP will be disabled!",
MAX_RESTART_SEARCH_RETRIES);
}
}
@@ -440,7 +440,7 @@
if (!responseValid) {
// Unfortunately, libnatpmp only allows reading one response per request sent; calling
// readResponse again at this point would result in a NATPMP_ERR_NOPENDINGREQ error.
- // Since we can't know whether the mapping was actually created or not, we return an
+ // Since it is unable to known whether the mapping was actually created or not, we return an
// error to ensure the caller won't attempt to use a port mapping that doesn't exist.
return NATPMP_ERR_INVALIDARGS;
}
diff --git a/src/upnp/protocol/pupnp/pupnp.cpp b/src/upnp/protocol/pupnp/pupnp.cpp
index afb110a..b49a43a 100644
--- a/src/upnp/protocol/pupnp/pupnp.cpp
+++ b/src/upnp/protocol/pupnp/pupnp.cpp
@@ -29,7 +29,7 @@
constexpr static const char* ACTION_GET_STATUS_INFO {"GetStatusInfo"};
constexpr static const char* ACTION_GET_EXTERNAL_IP_ADDRESS {"GetExternalIPAddress"};
-// Error codes returned by router when trying to remove ports.
+// Error codes returned by router when attempting to remove ports.
constexpr static int ARRAY_IDX_INVALID = 713;
constexpr static int CONFLICT_IN_MAPPING = 718;
@@ -119,21 +119,21 @@
initialized_ = true;
return;
}else {
- if (logger_) logger_->error("PUPnP: Can't initialize libupnp: {}", UpnpGetErrorMessage(upnp_err));
+ if (logger_) logger_->error("PUPnP: Unable to initialize libupnp: {}", UpnpGetErrorMessage(upnp_err));
UpnpFinish();
initialized_ = false;
return;
}
}
- // Disable embedded WebServer if any.
+ // Disable embedded Web server if any.
if (UpnpIsWebserverEnabled() == 1) {
- if (logger_) logger_->warn("PUPnP: Web-server is enabled. Disabling");
+ if (logger_) logger_->warn("PUPnP: Web server is enabled. Disabling");
UpnpEnableWebserver(0);
if (UpnpIsWebserverEnabled() == 1) {
- if (logger_) logger_->error("PUPnP: Could not disable Web-server!");
+ if (logger_) logger_->error("PUPnP: Unable to disable Web server!");
} else {
- if (logger_) logger_->debug("PUPnP: Web-server successfully disabled");
+ if (logger_) logger_->debug("PUPnP: Web server successfully disabled");
}
}
@@ -173,7 +173,7 @@
// Register Upnp control point.
int upnp_err = UpnpRegisterClient(ctrlPtCallback, this, &ctrlptHandle_);
if (upnp_err != UPNP_E_SUCCESS) {
- if (logger_) logger_->error("PUPnP: Can't register client: {}", UpnpGetErrorMessage(upnp_err));
+ if (logger_) logger_->error("PUPnP: Unable to register client: {}", UpnpGetErrorMessage(upnp_err));
} else {
if (logger_) logger_->debug("PUPnP: Successfully registered client");
clientRegistered_ = true;
@@ -321,7 +321,7 @@
}
if (igdSearchCounter_++ >= PUPNP_MAX_RESTART_SEARCH_RETRIES) {
- if (logger_) logger_->warn("PUPnP: Setup failed after {:d} trials. PUPnP will be disabled!",
+ if (logger_) logger_->warn("PUPnP: Setup failed after {:d} attempts. PUPnP will be disabled!",
PUPNP_MAX_RESTART_SEARCH_RETRIES);
return;
}
@@ -492,7 +492,7 @@
if (const auto& localGw = ip_utils::getLocalGateway()) {
igd_candidate->setLocalIp(localGw);
} else {
- if (logger_) logger_->warn("PUPnP: Could not set internal address for IGD candidate {}",
+ if (logger_) logger_->warn("PUPnP: Unable to set internal address for IGD candidate {}",
igd_candidate->getUID().c_str());
return false;
}
@@ -856,7 +856,7 @@
int upnp_err = UpnpDownloadXmlDoc(locationUrl.c_str(), &doc_container_ptr);
std::lock_guard lk(ongoingOpsMtx_);
- // Trying to use libupnp functions after UpnpFinish has been called (which may
+ // Attempting to use libupnp functions after UpnpFinish has been called (which may
// be the case if destroying_ is true) can cause errors. It's probably not a
// problem here, but return early just in case.
if (destroying_)
@@ -1029,7 +1029,7 @@
auto actionRequest = UpnpActionComplete_get_ActionRequest(a_event);
// Abort if there is no action to process.
if (actionRequest == nullptr) {
- if (logger_) logger_->warn("PUPnP: Can't get the Action Request data from the event");
+ if (logger_) logger_->warn("PUPnP: Unable to get the Action Request data from the event");
break;
}
@@ -1089,7 +1089,7 @@
// Check the UDN to see if its already in our device list.
std::string UDN(getFirstDocItem(doc, "UDN"));
if (UDN.empty()) {
- if (logger_) logger_->warn("PUPnP: could not find UDN in description document of device");
+ if (logger_) logger_->warn("PUPnP: Unable to find UDN in description document of device");
return nullptr;
} else {
std::lock_guard lk(pupnpMutex_);