summaryrefslogtreecommitdiff
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.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)
66 if (doInstall) { 66 if (doInstall) {
67 // download firmware from server 67 // download firmware from server
68 emit logItem(tr("Downloading bootloader file..."), LOGINFO); 68 emit logItem(tr("Downloading bootloader file..."), LOGINFO);
69 connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallS5l::installStageMkdfu); 69 connect(this, &BootloaderInstallBase::downloadDone,
70 this, &BootloaderInstallS5l::installStageMkdfu);
70 downloadBlStart(m_blurl); 71 downloadBlStart(m_blurl);
71 } 72 }
72 else { 73 else {
@@ -87,8 +88,10 @@ void BootloaderInstallS5l::installStageMkdfu(void)
87 88
88 setProgress(0); 89 setProgress(0);
89 aborted = false; 90 aborted = false;
90 connect(this, &BootloaderInstallBase::installAborted, this, &BootloaderInstallS5l::abortInstall); 91 connect(this, &BootloaderInstallBase::installAborted,
91 connect(this, &BootloaderInstallBase::done, this, &BootloaderInstallS5l::installDone); 92 this, &BootloaderInstallS5l::abortInstall);
93 connect(this, &BootloaderInstallBase::done,
94 this, &BootloaderInstallS5l::installDone);
92 95
93 if (doInstall) { 96 if (doInstall) {
94 dfu_type = DFU_INST; 97 dfu_type = DFU_INST;
@@ -329,8 +332,10 @@ void BootloaderInstallS5l::installStageWaitForRemount(void)
329 } 332 }
330 emit logItem(tr("Device remounted."), LOGINFO); 333 emit logItem(tr("Device remounted."), LOGINFO);
331 334
332 emit logItem(tr("Bootloader successfully %1."). 335 if (doInstall)
333 arg(tr(doInstall ? "installed" : "uninstalled")), LOGOK); 336 emit logItem(tr("Bootloader successfully installed."), LOGOK);
337 else
338 emit logItem(tr("Bootloader successfully uninstalled."), LOGOK);
334 339
335 logInstall(doInstall ? LogAdd : LogRemove); 340 logInstall(doInstall ? LogAdd : LogRemove);
336 emit logProgress(1, 1); 341 emit logProgress(1, 1);
@@ -350,7 +355,8 @@ void BootloaderInstallS5l::abortInstall(void)
350{ 355{
351 LOG_INFO() << "abortInstall"; 356 LOG_INFO() << "abortInstall";
352 aborted = true; 357 aborted = true;
353 disconnect(this, &BootloaderInstallBase::installAborted, this, &BootloaderInstallS5l::abortInstall); 358 disconnect(this, &BootloaderInstallBase::installAborted,
359 this, &BootloaderInstallS5l::abortInstall);
354} 360}
355 361
356 362
@@ -358,8 +364,10 @@ bool BootloaderInstallS5l::abortDetected(void)
358{ 364{
359 if (aborted) { 365 if (aborted) {
360 LOG_ERROR() << "abortDetected"; 366 LOG_ERROR() << "abortDetected";
361 emit logItem(tr("%1 aborted by user."). 367 if (doInstall)
362 arg(tr(doInstall ? "Install" : "Uninstall")), LOGERROR); 368 emit logItem(tr("Install aborted by user."), LOGERROR);
369 else
370 emit logItem(tr("Uninstall aborted by user."), LOGERROR);
363 emit done(true); 371 emit done(true);
364 return true; 372 return true;
365 } 373 }