Use parameters instead of concatenation in UI strings
Translations sometimes need to have different word order.
This commit is contained in:
parent
fb74751e32
commit
6ed837eaff
|
@ -256,7 +256,7 @@ Notification SnoreCore::getActiveNotificationByID(uint id) const
|
|||
void SnoreCore::displayExapleNotification()
|
||||
{
|
||||
Application app = SnoreCorePrivate::instance()->defaultApplication();
|
||||
QString text = QLatin1String("<i>") + tr("This is ") + app.name() + QLatin1String("</i><br>"
|
||||
QString text = QLatin1String("<i>") + tr("This is %1").arg(app.name()) + QLatin1String("</i><br>"
|
||||
"<b>") + tr("Everything is awesome!") + QLatin1String("</b><br>");
|
||||
if (!app.constHints().value("use-markup").toBool()) {
|
||||
text = Utils::normalizeMarkup(text, Utils::NO_MARKUP);
|
||||
|
|
|
@ -67,7 +67,7 @@ bool GrowlBackend::isReady()
|
|||
{
|
||||
bool running = Growl::isRunning(GROWL_TCP, settingsValue(QLatin1String("Host")).toString().toUtf8().constData());
|
||||
if (!running) {
|
||||
setErrorString(name() + tr(" is not running."));
|
||||
setErrorString(tr("%1 is not running.").arg(name()));
|
||||
}
|
||||
return running;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ bool SnarlBackend::isReady()
|
|||
{
|
||||
bool running = SnarlInterface::IsSnarlRunning();
|
||||
if (!running) {
|
||||
setErrorString(name() + tr(" is not running."));
|
||||
setErrorString(tr("%1 is not running.").arg(name()));
|
||||
}
|
||||
return running;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Snore;
|
|||
bool SnoreToast::isReady()
|
||||
{
|
||||
if (errorString().isEmpty() && QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS8) {
|
||||
setErrorString(name() + tr(" needs at least Windows 8 to run."));
|
||||
setErrorString(tr("%1 needs at least Windows 8 to run.").arg(name()));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -49,7 +49,7 @@ SettingsWindow::SettingsWindow(const QString &appName, QWidget *parent) :
|
|||
ui->comboBox->deleteLater();
|
||||
ui->label->deleteLater();
|
||||
SnoreCorePrivate::instance()->setLocalSttingsPrefix(appName);
|
||||
setWindowTitle(appName + tr(" Settings"));
|
||||
setWindowTitle(tr("%1 Settings").arg(appName));
|
||||
ui->widget->initTabs();
|
||||
ui->widget->setVisible(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue