More internationalization and localization... (again)

This commit is contained in:
LoRd_MuldeR 2010-12-30 17:34:19 +01:00
parent fdaf1909fc
commit e73946fc06
8 changed files with 160 additions and 96 deletions

View File

@ -8,9 +8,17 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;LameXP DropBox&lt;/b&gt;&lt;br&gt;&lt;nobr&gt;You can add files to LameXP via Drag&amp;amp;Drop here!&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;(Right-click to close the DropBox)&lt;/nobr&gt;</source>
<source>LameXP DropBox</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can add files to LameXP via Drag&amp;amp;Drop here!</source>
<translation type="unfinished">Sie könner hier Dateien per Drag&amp;amp;Drop hinzufügen!</translation>
</message>
<message>
<source>(Right-click to close the DropBox)</source>
<translation type="unfinished">(Rechts-klicken um die DropBox zu schließen)</translation>
</message>
</context>
<context>
<name>LogViewDialog</name>
@ -306,7 +314,7 @@ RUN\DOS\RUN
</message>
<message>
<source>You can drop in audio files here!</source>
<translation type="unfinished">Sie können hier Audio-Dateien per Drag&amp;Drop einfügen!</translation>
<translation type="unfinished">Sie können hier Audio-Dateien hinein ziehen!</translation>
</message>
<message>
<source>Open File in External Application</source>
@ -369,50 +377,14 @@ LameXP is free software and release versions won&apos;t expire.</source>
<source>Postpone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;nobr&gt;LameXP detected that your version of the Nero AAC encoder is outdated!&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The current version available is %1 (or later), but you still have version %2 installed.&lt;br&gt;&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can download the latest version of the Nero AAC encoder from the Nero website at:&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>AAC Encoder Outdated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;nobr&gt;The Nero AAC encoder could not be found. AAC encoding support will be disabled.&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please put &apos;neroAacEnc.exe&apos;, &apos;neroAacDec.exe&apos; and &apos;neroAacTag.exe&apos; into the LameXP directory!&lt;br&gt;&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your LameXP directory is located here:&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can download the Nero AAC encoder for free from the official Nero website at:&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>AAC Support Disabled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;nobr&gt;LameXP has detected that the WMA File Decoder component is not currently installed on your system.&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You won&apos;t be able to process WMA files as input unless the WMA File Decoder component is installed!&lt;/nobr&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WMA Decoder Missing</source>
<translation type="unfinished"></translation>
@ -429,10 +401,6 @@ LameXP is free software and release versions won&apos;t expire.</source>
<source>Low Diskspace Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;nobr&gt;There are less than %1 GB of free diskspace available on your system&apos;s TEMP folder.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;It is highly recommend to free up more diskspace before proceeding with the encode!&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;Your TEMP folder is located at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Abort Encoding Process</source>
<translation type="unfinished"></translation>
@ -457,10 +425,6 @@ LameXP is free software and release versions won&apos;t expire.</source>
<source>Sorry, an unsupported encoder has been chosen!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot write to the selected output directory.&lt;br&gt;&lt;nobr&gt;%1&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;Please choose a different directory!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add file(s)</source>
<translation type="unfinished"></translation>
@ -481,10 +445,6 @@ LameXP is free software and release versions won&apos;t expire.</source>
<source>Failed to create folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The new folder could not be created:&lt;br&gt;&lt;nobr&gt;%1&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;Drive is read-only or insufficient access rights!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Already running</source>
<translation type="unfinished"></translation>
@ -513,10 +473,6 @@ LameXP is free software and release versions won&apos;t expire.</source>
<source>Update Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The update reminder has been disabled.&lt;br&gt;Please remember to check for updates at regular intervals!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The update reminder has been re-enabled.</source>
<translation type="unfinished"></translation>
@ -621,16 +577,96 @@ LameXP is free software and release versions won&apos;t expire.</source>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;nobr&gt;%1 file(s) have been rejected, because read access was not granted!&lt;br&gt;This usually means the file is locked by another process.&lt;/nobr&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Files Rejected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;nobr&gt;%1 file(s) have been rejected, because the file format could not be recognized!&lt;br&gt;This usually means the file is damaged or the file format is not supported.&lt;/nobr&gt;</source>
<source>LameXP detected that your version of the Nero AAC encoder is outdated!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The current version available is %1 (or later), but you still have version %2 installed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can download the latest version of the Nero AAC encoder from the Nero website at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Nero AAC encoder could not be found. AAC encoding support will be disabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please put &apos;neroAacEnc.exe&apos;, &apos;neroAacDec.exe&apos; and &apos;neroAacTag.exe&apos; into the LameXP directory!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your LameXP directory is located here:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can download the Nero AAC encoder for free from the official Nero website at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP has detected that the WMA File Decoder component is not currently installed on your system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You won&apos;t be able to process WMA files as input unless the WMA File Decoder component is installed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot write to the selected output directory.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a different directory!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The new folder could not be created:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drive is read-only or insufficient access rights!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are less than %1 GB of free diskspace available on your system&apos;s TEMP folder.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is highly recommend to free up more diskspace before proceeding with the encode!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your TEMP folder is located at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%1 file(s) have been rejected, because read access was not granted!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This usually means the file is locked by another process.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%1 file(s) have been rejected, because the file format could not be recognized!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This usually means the file is damaged or the file format is not supported.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The update reminder has been disabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please remember to check for updates at regular intervals!</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -25,9 +25,6 @@
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLabel" name="dropBoxLabel">
<property name="toolTip">
<string>&lt;b&gt;LameXP DropBox&lt;/b&gt;&lt;br&gt;&lt;nobr&gt;You can add files to LameXP via Drag&amp;amp;Drop here!&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;(Right-click to close the DropBox)&lt;/nobr&gt;</string>
</property>
<property name="lineWidth">
<number>0</number>
</property>
@ -54,6 +51,7 @@
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
</resources>
<connections/>
</ui>

Binary file not shown.

View File

@ -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
/*

View File

@ -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("<b>%1</b><br><nobr>%2</nobr><br><nobr>%3</nobr>").arg(tr("LameXP DropBox"), tr("You can add files to LameXP via Drag&amp;Drop here!"), tr("(Right-click to close the DropBox)")));
}
}
void DropBox::showEvent(QShowEvent *event)
{
QRect screenGeometry = QApplication::desktop()->availableGeometry();

View File

@ -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);
};

View File

@ -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<QAction*> 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("<nobr>%1 file(s) have been rejected, because read access was not granted!<br>This usually means the file is locked by another process.</nobr>").arg(analyzer->filesDenied()));
QMessageBox::warning(this, tr("Access Denied"), QString("<nobr>%1<br>%2</nobr>").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("<nobr>%1 file(s) have been rejected, because the file format could not be recognized!<br>This usually means the file is damaged or the file format is not supported.</nobr>").arg(analyzer->filesRejected()));
QMessageBox::warning(this, tr("Files Rejected"), QString("<nobr>%1<br>%2</nobr>").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("<nobr>There are less than %1 GB of free diskspace available on your system's TEMP folder.</nobr><br><nobr>It is highly recommend to free up more diskspace before proceeding with the encode!</nobr><br><br>Your TEMP folder is located at:").append("<br><nobr><i><a href=\"file:///%3\">%3</a></i></nobr><br>").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("<nobr>%1</nobr><br><nobr>%2</nobr><br><br>%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("<br><nobr><i><a href=\"file:///%3\">%3</a></i></nobr><br>").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.<br><nobr>%1</nobr><br><br>Please choose a different directory!").arg(m_settings->outputDir()));
QMessageBox::warning(this, tr("LameXP"), QString("%1<br><nobr>%2</nobr><br><br>%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:<br><nobr>%1</nobr><br><br>Drive is read-only or insufficient access rights!").arg(basePath.absoluteFilePath(newFolder)));
QMessageBox::warning(this, tr("Failed to create folder"), QString("%1<br><nobr>%2</nobr><br><br>%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.<br>Please remember to check for updates at regular intervals!"));
QMessageBox::information(this, tr("Update Reminder"), QString("%1<br>%2").arg(tr("The update reminder has been disabled."), tr("Please remember to check for updates at regular intervals!")));
m_settings->autoUpdateEnabled(false);
}
else

View File

@ -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);