Commit 9c180ffd authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Improve translated messages in Android device dialog.



Reduce duplication, remove some HTML formatting.

Change-Id: Ia419a5c9a5bbeefca2863acd5d893f13acb34866
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent bf593e3f
......@@ -370,6 +370,19 @@ QModelIndex AndroidDeviceModel::indexFor(const QString &serial)
/////////////////
// AndroidDeviceDialog
/////////////////
static inline QString msgConnect()
{
return AndroidDeviceDialog::tr("<p>Connect an Android device via USB and activate developer mode on it. "
"Some devices require the installation of a USB driver.</p>");
}
static inline QString msgAdbListDevices()
{
return AndroidDeviceDialog::tr("<p>The adb tool in the Android SDK lists all connected devices if run via &quot;adb devices&quot;.</p>");
}
AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, QWidget *parent) :
QDialog(parent),
m_model(new AndroidDeviceModel(apiLevel, abi)),
......@@ -387,14 +400,10 @@ AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, QWidg
m_ui->defaultDeviceCheckBox->setText(tr("Always use this device for architecture %1").arg(abi));
m_ui->noDeviceFoundLabel->setText(tr("<p align=\"center\"><span style=\" font-size:16pt;\">"
"No Device Found</span></p>"
"<br/>"
"<p>Connect an Android device via USB and activate developer mode on it. "
"Some devices require the installation of a USB driver.</p>"
"<br/>"
"<p>The adb tool in the Android SDK lists all connected devices if run via &quot;adb devices&quot;.</p>"
));
m_ui->noDeviceFoundLabel->setText(QLatin1String("<p align=\"center\"><span style=\" font-size:16pt;\">")
+ tr("No Device Found") + QLatin1String("</span></p><br/>")
+ msgConnect() + QLatin1String("<br/>")
+ msgAdbListDevices());
connect(m_ui->missingLabel, SIGNAL(linkActivated(QString)),
this, SLOT(showHelp()));
......@@ -489,8 +498,5 @@ void AndroidDeviceDialog::showHelp()
{
QPoint pos = m_ui->missingLabel->pos();
pos = m_ui->missingLabel->parentWidget()->mapToGlobal(pos);
QToolTip::showText(pos, tr("<p>Connect an Android device via USB and activate developer mode on it. "
"Some devices require the installation of a USB driver.</p>"
"<p>The adb tool in the Android SDK lists all connected devices if run via &quot;adb devices&quot;.</p>"),
this);
QToolTip::showText(pos, msgConnect() + msgAdbListDevices(), this);
}
......@@ -79,7 +79,7 @@
<item row="0" column="0">
<widget class="QLabel" name="noDeviceFoundLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment