diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts
index 413c4886..566f8689 100644
--- a/etc/Translation/LameXP_DE.ts
+++ b/etc/Translation/LameXP_DE.ts
@@ -8,9 +8,17 @@
-
+
+
+
+ Sie könner hier Dateien per Drag&Drop hinzufügen!
+
+
+
+ (Rechts-klicken um die DropBox zu schließen)
+ LogViewDialog
@@ -306,7 +314,7 @@ RUN\DOS\RUN
- Sie können hier Audio-Dateien per Drag&Drop einfügen!
+ Sie können hier Audio-Dateien hinein ziehen!
@@ -369,50 +377,14 @@ LameXP is free software and release versions won't expire.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -429,10 +401,6 @@ LameXP is free software and release versions won't expire.
-
-
-
-
@@ -457,10 +425,6 @@ LameXP is free software and release versions won't expire.
-
-
-
-
@@ -481,10 +445,6 @@ LameXP is free software and release versions won't expire.
-
-
-
-
@@ -513,10 +473,6 @@ LameXP is free software and release versions won't expire.
-
-
-
-
@@ -621,16 +577,96 @@ LameXP is free software and release versions won't expire.
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gui/DropBox.ui b/gui/DropBox.ui
index c828b1f1..f89b2c9e 100644
--- a/gui/DropBox.ui
+++ b/gui/DropBox.ui
@@ -25,9 +25,6 @@
-
- <b>LameXP DropBox</b><br><nobr>You can add files to LameXP via Drag&Drop here!</nobr><br><nobr>(Right-click to close the DropBox)</nobr>
- 0
@@ -54,6 +51,7 @@
+
diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm
index 741f4828..c5c0faaa 100644
Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ
diff --git a/src/Config.h b/src/Config.h
index fd4e5be5..ccbbbbfa 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 0
-#define VER_LAMEXP_BUILD 200
+#define VER_LAMEXP_BUILD 201
#define VER_LAMEXP_SUFFIX TechPreview
/*
diff --git a/src/Dialog_DropBox.cpp b/src/Dialog_DropBox.cpp
index 258e4a2c..0ca3b7f5 100644
--- a/src/Dialog_DropBox.cpp
+++ b/src/Dialog_DropBox.cpp
@@ -62,6 +62,9 @@ DropBox::DropBox(QWidget *parent, QAbstractItemModel *model, SettingsModel *sett
//Make transparent
setWindowOpacity(0.8);
+
+ //Translate UI
+ retranslateUi(this);
}
////////////////////////////////////////////////////////////
@@ -76,6 +79,11 @@ DropBox::~DropBox(void)
// PUBLIC SLOTS
////////////////////////////////////////////////////////////
+void DropBox::doRetranslate(void)
+{
+ retranslateUi(this);
+}
+
void DropBox::modelChanged(void)
{
if(m_model)
@@ -88,6 +96,19 @@ void DropBox::modelChanged(void)
// EVENTS
////////////////////////////////////////////////////////////
+/*
+ * Re-translate the UI
+ */
+void DropBox::changeEvent(QEvent *e)
+{
+ if(e->type() == QEvent::LanguageChange)
+ {
+ Ui::DropBox::retranslateUi(this);
+ dropBoxLabel->setToolTip(QString("%1 %2 %3").arg(tr("LameXP DropBox"), tr("You can add files to LameXP via Drag&Drop here!"), tr("(Right-click to close the DropBox)")));
+ }
+}
+
+
void DropBox::showEvent(QShowEvent *event)
{
QRect screenGeometry = QApplication::desktop()->availableGeometry();
diff --git a/src/Dialog_DropBox.h b/src/Dialog_DropBox.h
index 52563384..a9b1b532 100644
--- a/src/Dialog_DropBox.h
+++ b/src/Dialog_DropBox.h
@@ -60,8 +60,10 @@ protected:
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
+ void changeEvent(QEvent *e);
public slots:
void modelChanged(void);
+ void doRetranslate(void);
void showToolTip(void);
};
diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp
index e743ba5d..59e2c297 100644
--- a/src/Dialog_MainWindow.cpp
+++ b/src/Dialog_MainWindow.cpp
@@ -293,7 +293,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(m_fileListModel, SIGNAL(modelReset()), m_dropBox, SLOT(modelChanged()));
connect(m_fileListModel, SIGNAL(rowsInserted(QModelIndex,int,int)), m_dropBox, SLOT(modelChanged()));
connect(m_fileListModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), m_dropBox, SLOT(modelChanged()));
-
+
//Create message handler thread
m_messageHandler = new MessageHandlerThread();
m_delayedFileList = new QStringList();
@@ -304,10 +304,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(m_delayedFileTimer, SIGNAL(timeout()), this, SLOT(handleDelayedFiles()));
m_messageHandler->start();
- //Enable Drag & Drop
- this->setAcceptDrops(true);
-
- //Load translation & re-translate
+ //Load translation & re-translate UI
QList languageActions = m_languageActionGroup->actions();
while(!languageActions.isEmpty())
{
@@ -318,6 +315,15 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
languageActionActivated(currentLanguage);
}
}
+ if(m_languageActionGroup->checkedAction() == NULL)
+ {
+ qWarning("No langauge is currently selected, going to select FIRST one!");
+ m_languageActionGroup->actions().first()->setChecked(true);
+ languageActionActivated(m_languageActionGroup->actions().first());
+ }
+
+ //Enable Drag & Drop
+ this->setAcceptDrops(true);
}
////////////////////////////////////////////////////////////
@@ -362,25 +368,6 @@ MainWindow::~MainWindow(void)
// PRIVATE FUNCTIONS
////////////////////////////////////////////////////////////
-/*
- * Re-translate the UI
- */
-void MainWindow::retranslateUi(QMainWindow *MainWindow)
-{
- Ui::MainWindow::retranslateUi(MainWindow);
-
- if(lamexp_version_demo())
- {
- setWindowTitle(QString("%1 [%2]").arg(windowTitle(), tr("DEMO VERSION")));
- }
-
- m_dropNoteLabel->setText(QString("» %1 «").arg(tr("You can drop in audio files here!")));
- m_showDetailsContextAction->setText(tr("Show Details"));
- m_previewContextAction->setText(tr("Open File in External Application"));
- m_findFileContextAction->setText(tr("Browse File Location"));
- m_showFolderContextAction->setText(tr("Browse Selected Folder"));
-}
-
/*
* Add file to source list
*/
@@ -401,11 +388,11 @@ void MainWindow::addFiles(const QStringList &files)
if(analyzer->filesDenied())
{
- QMessageBox::warning(this, tr("Access Denied"), tr("%1 file(s) have been rejected, because read access was not granted! This usually means the file is locked by another process.").arg(analyzer->filesDenied()));
+ QMessageBox::warning(this, tr("Access Denied"), QString("%1 %2").arg(tr("%1 file(s) have been rejected, because read access was not granted!").arg(analyzer->filesDenied()), tr("This usually means the file is locked by another process.")));
}
if(analyzer->filesRejected())
{
- QMessageBox::warning(this, tr("Files Rejected"), tr("%1 file(s) have been rejected, because the file format could not be recognized! This usually means the file is damaged or the file format is not supported.").arg(analyzer->filesRejected()));
+ QMessageBox::warning(this, tr("Files Rejected"), QString("%1 %2").arg(tr("%1 file(s) have been rejected, because the file format could not be recognized!").arg(analyzer->filesRejected()), tr("This usually means the file is damaged or the file format is not supported.")));
}
LAMEXP_DELETE(analyzer);
@@ -441,6 +428,28 @@ void MainWindow::showEvent(QShowEvent *event)
}
}
+/*
+ * Re-translate the UI
+ */
+void MainWindow::changeEvent(QEvent *e)
+{
+ if(e->type() == QEvent::LanguageChange)
+ {
+ Ui::MainWindow::retranslateUi(this);
+
+ if(lamexp_version_demo())
+ {
+ setWindowTitle(QString("%1 [%2]").arg(windowTitle(), tr("DEMO VERSION")));
+ }
+
+ m_dropNoteLabel->setText(QString("» %1 «").arg(tr("You can drop in audio files here!")));
+ m_showDetailsContextAction->setText(tr("Show Details"));
+ m_previewContextAction->setText(tr("Open File in External Application"));
+ m_findFileContextAction->setText(tr("Browse File Location"));
+ m_showFolderContextAction->setText(tr("Browse Selected Folder"));
+ }
+}
+
/*
* File dragged over window
*/
@@ -730,7 +739,7 @@ void MainWindow::encodeButtonClicked(void)
QStringList tempFolderParts = lamexp_temp_folder().split("/", QString::SkipEmptyParts, Qt::CaseInsensitive);
tempFolderParts.takeLast();
if(m_settings->soundsEnabled()) PlaySound(MAKEINTRESOURCE(IDR_WAVE_WHAMMY), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
- switch(QMessageBox::warning(this, tr("Low Diskspace Warning"), tr("There are less than %1 GB of free diskspace available on your system's TEMP folder. It is highly recommend to free up more diskspace before proceeding with the encode!
Your TEMP folder is located at:").append(" %3 ").arg(QString::number(minimumFreeDiskspaceMultiplier), tempFolderParts.join("\\")), tr("Abort Encoding Process"), tr("Clean Disk Now"), tr("Ignore")))
+ switch(QMessageBox::warning(this, tr("Low Diskspace Warning"), QString("%1 %2
%3").arg(tr("There are less than %1 GB of free diskspace available on your system's TEMP folder.").arg(QString::number(minimumFreeDiskspaceMultiplier)), tr("It is highly recommend to free up more diskspace before proceeding with the encode!"), tr("Your TEMP folder is located at:")).append(" %3 ").arg(tempFolderParts.join("\\")), tr("Abort Encoding Process"), tr("Clean Disk Now"), tr("Ignore")))
{
case 1:
QProcess::startDetached(QString("%1/cleanmgr.exe").arg(lamexp_known_folder(lamexp_folder_systemfolder)), QStringList() << "/D" << tempFolderParts.first());
@@ -762,7 +771,7 @@ void MainWindow::encodeButtonClicked(void)
QFile writeTest(QString("%1/~%2.txt").arg(m_settings->outputDir(), QUuid::createUuid().toString()));
if(!writeTest.open(QIODevice::ReadWrite))
{
- QMessageBox::warning(this, tr("LameXP"), tr("Cannot write to the selected output directory. %1
Please choose a different directory!").arg(m_settings->outputDir()));
+ QMessageBox::warning(this, tr("LameXP"), QString("%1 %2
%3").arg(tr("Cannot write to the selected output directory."), m_settings->outputDir(), tr("Please choose a different directory!")));
tabWidget->setCurrentIndex(1);
return;
}
@@ -973,8 +982,6 @@ void MainWindow::languageActionActivated(QAction *action)
{
m_settings->currentLanguage(langId);
}
-
- retranslateUi(this);
}
/*
@@ -1149,7 +1156,7 @@ void MainWindow::makeFolderButtonClicked(void)
}
else
{
- QMessageBox::warning(this, tr("Failed to create folder"), tr("The new folder could not be created: %1
Drive is read-only or insufficient access rights!").arg(basePath.absoluteFilePath(newFolder)));
+ QMessageBox::warning(this, tr("Failed to create folder"), QString("%1 %2
%3").arg(tr("The new folder could not be created:"), basePath.absoluteFilePath(newFolder), tr("Drive is read-only or insufficient access rights!")));
}
}
break;
@@ -1604,7 +1611,7 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked)
{
if(QMessageBox::Yes == QMessageBox::question(this, tr("Disable Update Reminder"), tr("Do you really want to disable the update reminder?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No))
{
- QMessageBox::information(this, tr("Update Reminder"), tr("The update reminder has been disabled. Please remember to check for updates at regular intervals!"));
+ QMessageBox::information(this, tr("Update Reminder"), QString("%1 %2").arg(tr("The update reminder has been disabled."), tr("Please remember to check for updates at regular intervals!")));
m_settings->autoUpdateEnabled(false);
}
else
diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h
index 602ea7cc..c8fd2f51 100644
--- a/src/Dialog_MainWindow.h
+++ b/src/Dialog_MainWindow.h
@@ -103,7 +103,7 @@ protected:
void closeEvent(QCloseEvent *event);
void resizeEvent(QResizeEvent *event);
bool eventFilter(QObject *obj, QEvent *event);
- void retranslateUi(QMainWindow *MainWindow);
+ void changeEvent(QEvent *e);
private:
void addFiles(const QStringList &files);