summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-08 22:09:19 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-08 22:13:48 +0100
commit0b8c6bd5f0291d96c6b53f948fc176ba8c1e418c (patch)
tree36ecfbe75409a2be076579a7489279af090c80dc
parentd148afca3ba07b273525829781ee703f2197738a (diff)
downloadrockbox-0b8c6bd5f0291d96c6b53f948fc176ba8c1e418c.tar.gz
rockbox-0b8c6bd5f0291d96c6b53f948fc176ba8c1e418c.tar.bz2
rockbox-0b8c6bd5f0291d96c6b53f948fc176ba8c1e418c.zip
rbutil: Fix log strings in s5l bootloader installation.
We can't use a ternary expression within the tr() function. While this initially might work as expected it completely breaks translating the actual string -- we need to use separate strings here, and replacing a single word in a sentence will also not work for translations. Change-Id: I556ff2a3bd0dc476b312a59c47d4e0dcd3b743e1
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstalls5l.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp b/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp
index 3621a27e26..6568ffb74d 100644
--- a/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp
@@ -66,7 +66,8 @@ bool BootloaderInstallS5l::installStage1(void)
if (doInstall) {
// download firmware from server
emit logItem(tr("Downloading bootloader file..."), LOGINFO);
- connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallS5l::installStageMkdfu);
+ connect(this, &BootloaderInstallBase::downloadDone,
+ this, &BootloaderInstallS5l::installStageMkdfu);
downloadBlStart(m_blurl);
}
else {
@@ -87,8 +88,10 @@ void BootloaderInstallS5l::installStageMkdfu(void)
setProgress(0);
aborted = false;
- connect(this, &BootloaderInstallBase::installAborted, this, &BootloaderInstallS5l::abortInstall);
- connect(this, &BootloaderInstallBase::done, this, &BootloaderInstallS5l::installDone);
+ connect(this, &BootloaderInstallBase::installAborted,
+ this, &BootloaderInstallS5l::abortInstall);
+ connect(this, &BootloaderInstallBase::done,
+ this, &BootloaderInstallS5l::installDone);
if (doInstall) {
dfu_type = DFU_INST;
@@ -329,8 +332,10 @@ void BootloaderInstallS5l::installStageWaitForRemount(void)
}
emit logItem(tr("Device remounted."), LOGINFO);
- emit logItem(tr("Bootloader successfully %1.").
- arg(tr(doInstall ? "installed" : "uninstalled")), LOGOK);
+ if (doInstall)
+ emit logItem(tr("Bootloader successfully installed."), LOGOK);
+ else
+ emit logItem(tr("Bootloader successfully uninstalled."), LOGOK);
logInstall(doInstall ? LogAdd : LogRemove);
emit logProgress(1, 1);
@@ -350,7 +355,8 @@ void BootloaderInstallS5l::abortInstall(void)
{
LOG_INFO() << "abortInstall";
aborted = true;
- disconnect(this, &BootloaderInstallBase::installAborted, this, &BootloaderInstallS5l::abortInstall);
+ disconnect(this, &BootloaderInstallBase::installAborted,
+ this, &BootloaderInstallS5l::abortInstall);
}
@@ -358,8 +364,10 @@ bool BootloaderInstallS5l::abortDetected(void)
{
if (aborted) {
LOG_ERROR() << "abortDetected";
- emit logItem(tr("%1 aborted by user.").
- arg(tr(doInstall ? "Install" : "Uninstall")), LOGERROR);
+ if (doInstall)
+ emit logItem(tr("Install aborted by user."), LOGERROR);
+ else
+ emit logItem(tr("Uninstall aborted by user."), LOGERROR);
emit done(true);
return true;
}