summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2023-04-08 12:03:47 +0200
committerSlávek Banko <slavek.banko@axis.cz>2023-04-27 01:24:05 +0200
commit331e531dec9f72e45abedb2a5c71828a9c7d4a78 (patch)
tree41c5ae5849e7b6fffed587480b2155674425ef6a
parentfadb46f704506567b42aab2eeedf8f8947dd3e40 (diff)
downloadtdebluez-331e531dec9f72e45abedb2a5c71828a9c7d4a78.tar.gz
tdebluez-331e531dec9f72e45abedb2a5c71828a9c7d4a78.zip
Change the text of the action for authorization so that it is not joined
from multiple strings and therefore translation could be clearer. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--src/tdebluezauth/authdialog.ui3
-rw-r--r--src/tdebluezauth/authorize.cpp10
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 @@
</property>
<property name="text">
<string>&lt;font size="+2"&gt;Bluetooth Authorization Request&lt;/font&gt;
-&lt;p&gt;&lt;b&gt;%1&lt;/b&gt; (device address &lt;b&gt;%2&lt;/b&gt;) %3.&lt;/p&gt;
-
+&lt;p&gt;%1&lt;/p&gt;
&lt;p&gt;
If you aren't sure about the identity of the other party, then reject
this authorization request.&lt;/p&gt;</string>
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("<b>%1</b> (device address <b>%2</b>) wants to act as Input Device.")
+ : i18n("<b>%1</b> (device address <b>%2</b>) 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);