From 331e531dec9f72e45abedb2a5c71828a9c7d4a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 8 Apr 2023 12:03:47 +0200 Subject: Change the text of the action for authorization so that it is not joined from multiple strings and therefore translation could be clearer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/tdebluezauth/authdialog.ui | 3 +-- src/tdebluezauth/authorize.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tdebluezauth/authdialog.ui b/src/tdebluezauth/authdialog.ui index 8b0efcf..b36b6a0 100644 --- a/src/tdebluezauth/authdialog.ui +++ b/src/tdebluezauth/authdialog.ui @@ -39,8 +39,7 @@ <font size="+2">Bluetooth Authorization Request</font> -<p><b>%1</b> (device address <b>%2</b>) %3.</p> - +<p>%1</p> <p> If you aren't sure about the identity of the other party, then reject this authorization request.</p> diff --git a/src/tdebluezauth/authorize.cpp b/src/tdebluezauth/authorize.cpp index 26aa813..739c344 100644 --- a/src/tdebluezauth/authorize.cpp +++ b/src/tdebluezauth/authorize.cpp @@ -32,13 +32,15 @@ AuthorizeDialog::AuthorizeDialog(const TQString &addr, const TQString &devName, KGuiItem(i18n("Accept"), "accept"), KGuiItem(i18n("Reject"), "reject")) { - TQString action(i18n("wants to act as Input Device")); + TQString action; - if (!service.isEmpty()) - action.append(" for " + service); + action = (service.isEmpty() + ? i18n("%1 (device address %2) wants to act as Input Device.") + : i18n("%1 (device address %2) wants to act as Input Device for %3.")). + arg(devName).arg(addr).arg(service); authDlg = new AuthDialog(this); - authDlg->messageLabel->setText(authDlg->messageLabel->text().arg(devName).arg(addr).arg(action)); + authDlg->messageLabel->setText(authDlg->messageLabel->text().arg(action)); connect(this, SIGNAL(okClicked()), SLOT(close())); setMainWidget(authDlg); -- cgit v1.2.1