Группа :: Архивирование/Прочее
Пакет: imagewriter
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: imagewriter-add-missing-i18n.patch
Скачать
Скачать
diff --git a/imagewriter/MainWindow.cpp b/imagewriter/MainWindow.cpp
index 50aa31b..bae0fe0 100644
--- a/imagewriter/MainWindow.cpp
+++ b/imagewriter/MainWindow.cpp
@@ -167,7 +167,7 @@ MainWindow::useNewUI()
directive->setText(tr("Drag disk image here\n or click to select."));
directive->setAlignment(Qt::AlignCenter);
deviceComboBox = new QComboBox;
- deviceComboBox->addItem(DROPDOWN_DIRECTIVE);
+ deviceComboBox->addItem(tr(DROPDOWN_DIRECTIVE));
writeButton = new QPushButton(tr("Write"));
connect(writeButton, SIGNAL(clicked()), this, SLOT(write()));
@@ -186,7 +186,7 @@ MainWindow::useNewUI()
mainLayout = new QVBoxLayout;
AboutLabel *aboutLabel = new AboutLabel();
- aboutLabel->setText("<u>About</u>");
+ aboutLabel->setText(tr("<u>About</u>"));
mainLayout->addWidget(aboutLabel,0,Qt::AlignTop|Qt::AlignLeft);
mainLayout->addLayout(logoLayout, Qt::AlignHCenter);
@@ -434,7 +434,7 @@ MainWindow::deviceRemoved(QDBusMessage message)
void
MainWindow::addMenuItem(const QString &item)
{
- if (deviceComboBox->itemText(0) == DROPDOWN_DIRECTIVE)
+ if (deviceComboBox->itemText(0) == tr(DROPDOWN_DIRECTIVE))
deviceComboBox->removeItem(0);
deviceComboBox->addItem(item, 0);
}
@@ -447,7 +447,7 @@ MainWindow::removeMenuItem(const QString &item)
{
deviceComboBox->removeItem(index);
if (deviceComboBox->count() == 0)
- deviceComboBox->addItem(DROPDOWN_DIRECTIVE);
+ deviceComboBox->addItem(tr(DROPDOWN_DIRECTIVE));
}
return(index);
}
@@ -461,7 +461,7 @@ MainWindow::setSizeLabel(const QString &fileName)
if(filecheck.exists())
{
int size = filecheck.size() / (1024*1024);
- fileSize->setText("(<b>" + QString::number(size) + " MB</b>)" );
+ fileSize->setText("(<b>" + QString::number(size) + tr(" MB") + "</b>)" );
}
}
else
@@ -506,7 +506,7 @@ void MainWindow::setFile(const QString &newFile)
fileLine->setText(file);
#endif
- fileLabel->setText("<b>Selected:</b> " + file);
+ fileLabel->setText(tr("<b>Selected:</b> ") + file);
}
else
{
@@ -623,10 +623,10 @@ void
AboutLabel::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event);
- QMessageBox about(QMessageBox::Information, "About SUSE Studio Imagewriter",
- "The <b>SUSE Studio Imagewriter</b> is (C) 2012, SUSE Linux Products GmbH<br><br>\
+ QMessageBox about(QMessageBox::Information, QObject::tr("About SUSE Studio Imagewriter"),
+ QObject::tr("The <b>SUSE Studio Imagewriter</b> is (C) 2012, SUSE Linux Products GmbH<br><br>\
It is cheerfully released under the GPL v2 license. You can find the source code on github: https://github.com/mbarringer/imagewriter<br><br>\
- It was written by Matt Barringer <matt@incoherent.de>. Please send complaints directly to him.");
+ It was written by Matt Barringer <matt@incoherent.de>. Please send complaints directly to him."));
about.exec();
}
diff --git a/imagewriter/MainWindow.h b/imagewriter/MainWindow.h
index b09992a..2e117d8 100644
--- a/imagewriter/MainWindow.h
+++ b/imagewriter/MainWindow.h
@@ -32,7 +32,7 @@
#include "Platform.h"
#include "DeviceItem.h"
-#define DROPDOWN_DIRECTIVE "Insert a USB device"
+#define DROPDOWN_DIRECTIVE QT_TRANSLATE_NOOP("MainWindow", "Insert a USB device")
class MainWindow : public QWidget
{
diff --git a/imagewriter/Platform.cpp b/imagewriter/Platform.cpp
index 282492d..5620d74 100644
--- a/imagewriter/Platform.cpp
+++ b/imagewriter/Platform.cpp
@@ -98,7 +98,7 @@ Platform::writeData(QString path, QString fileName, qint64 deviceSize)
return;
}
- QProgressDialog progress(" ", "Cancel", 0, 100);
+ QProgressDialog progress(" ", QObject::tr("Cancel"), 0, 100);
progress.setMinimumDuration(0);
progress.setWindowModality(Qt::WindowModal);
progress.setValue(100);
diff --git a/imagewriter/PlatformHal.cpp b/imagewriter/PlatformHal.cpp
index c113a1b..e2db15d 100644
--- a/imagewriter/PlatformHal.cpp
+++ b/imagewriter/PlatformHal.cpp
@@ -156,7 +156,7 @@ PlatformHal::getNewDevice(QString devicePath, LibHalContext *context)
{
devItem->setVendorString(vendor);
}
- QString newDisplayString = QString("%1 %2 - %3 (%4 MB)").arg(devItem->getVendorString()).arg(devItem->getModelString()).arg(devItem->getPath()).arg(devItem->getSize() / 1048576);
+ QString newDisplayString = QString(QObject::tr("%1 %2 - %3 (%4 MB)")).arg(devItem->getVendorString()).arg(devItem->getModelString()).arg(devItem->getPath()).arg(devItem->getSize() / 1048576);
devItem->setDisplayString(newDisplayString);
if (mKioskMode)
diff --git a/imagewriter/PlatformUdisks.cpp b/imagewriter/PlatformUdisks.cpp
index bb1a5ad..36dfa1e 100644
--- a/imagewriter/PlatformUdisks.cpp
+++ b/imagewriter/PlatformUdisks.cpp
@@ -172,7 +172,7 @@ PlatformUdisks::getNewDevice(QString devicePath)
{
devItem->setVendorString(vendor);
}
- QString newDisplayString = QString("%1 %2 - %3 (%4 MB)")
+ QString newDisplayString = QString(QObject::tr("%1 %2 - %3 (%4 MB)"))
.arg(devItem->getVendorString())
.arg(devItem->getModelString())
.arg(devItem->getPath())
diff --git a/imagewriter/PlatformUdisks2.cpp b/imagewriter/PlatformUdisks2.cpp
index 21c9416..2ce4521 100644
--- a/imagewriter/PlatformUdisks2.cpp
+++ b/imagewriter/PlatformUdisks2.cpp
@@ -162,7 +162,7 @@ PlatformUdisks2::buildDevice(QVariantMap &blockProperties, QVariantMap &drivePro
{
devItem->setVendorString(vendor);
}
- QString newDisplayString = QString("%1 %2 - %3 (%4 MB)")
+ QString newDisplayString = QString(QObject::tr("%1 %2 - %3 (%4 MB)"))
.arg(devItem->getVendorString())
.arg(devItem->getModelString())
.arg(devItem->getPath())