diff options
author | Emanoil Kotsev <deloptes@gmail.com> | 2023-03-13 20:31:19 +0000 |
---|---|---|
committer | Emanoil Kotsev <deloptes@gmail.com> | 2023-03-20 07:25:45 +0000 |
commit | c95a42982628b4b06ceed0c01cada10806c9b53c (patch) | |
tree | ee5bb82e46741f57362bb5c4a0f2133d1d525cdb /src/libtdebluez/adapterImpl.cpp | |
parent | 66c9d2a5920b30474b595603a79915d2be38cdbe (diff) | |
download | tdebluez-c95a42982628b4b06ceed0c01cada10806c9b53c.tar.gz tdebluez-c95a42982628b4b06ceed0c01cada10806c9b53c.zip |
i18n and some minor corrections
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
Diffstat (limited to 'src/libtdebluez/adapterImpl.cpp')
-rw-r--r-- | src/libtdebluez/adapterImpl.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/libtdebluez/adapterImpl.cpp b/src/libtdebluez/adapterImpl.cpp index 703f06f..adf4388 100644 --- a/src/libtdebluez/adapterImpl.cpp +++ b/src/libtdebluez/adapterImpl.cpp @@ -32,6 +32,7 @@ #include <tqdbusproxy.h> #include <tqmessagebox.h> +#include <tdelocale.h> #include "adapterImpl.h" @@ -90,7 +91,7 @@ void AdapterImpl::powerOn(bool state) if (hcidx < 0) { // error handling - tqDebug("Index for the device %s not found", device.local8Bit().data()); + tqDebug(i18n("Index for the device %1 not found").arg(device)); return; } @@ -99,7 +100,7 @@ void AdapterImpl::powerOn(bool state) TQFile file("/dev/rfkill"); if (!file.open(IO_ReadWrite)) { - tqDebug("Failed to open %s", file.name().utf8().data()); + tqDebug(i18n("Failed to open %1").arg(file.name())); return; } @@ -110,10 +111,10 @@ void AdapterImpl::powerOn(bool state) else event.soft = 1; - tqDebug("Bluetooth device %s switches: idx(%i), soft(%d).", device.local8Bit().data(), event.idx, event.soft); + tqDebug(i18n("Bluetooth device %1 switches: idx(%2), soft(%3).").arg(device).arg(event.idx).arg(event.soft)); if (write(file.handle(), &event, sizeof(event)) < 0) - tqDebug("Failed to write to %s", file.name().utf8().data()); + tqDebug(i18n("Failed to write to %1").arg(file.name())); file.close(); } @@ -124,18 +125,18 @@ TQString AdapterImpl::getPath() void AdapterImpl::slotSetAlias(const TQString& alias) { - TQT_DBusError error; - setAlias(alias, error); - if (error.isValid()) - tqDebug("AdapterImpl::slotSetAlias(%s) failed: %s", alias.utf8().data(), error.message().utf8().data()); + TQT_DBusError dbuserror; + setAlias(alias, dbuserror); + if (dbuserror.isValid()) + tqDebug(i18n("AdapterImpl::slotSetAlias(%1) failed: %2").arg(alias).arg(dbuserror.message())); } void AdapterImpl::slotSetTimeout(int timeout) { - TQT_DBusError error; - setDiscoverableTimeout(timeout, error); - if (error.isValid()) - tqDebug("AdapterImpl::slotSetTimeout(%i) failed: %s", timeout, error.message().utf8().data()); + TQT_DBusError dbuserror; + setDiscoverableTimeout(timeout, dbuserror); + if (dbuserror.isValid()) + tqDebug(i18n("AdapterImpl::slotSetTimeout(%1) failed: %2").arg(timeout).arg(dbuserror.message())); } } // namespace TDEBluetooth |