From effbe665668eace21dc99591b0acec737203d49e Mon Sep 17 00:00:00 2001 From: lordmulder Date: Fri, 14 Jan 2011 23:34:31 +0100 Subject: [PATCH] Make 8 more strings translatable. --- LameXP.vcproj | 34 +++++++++++++++++++ etc/Translation/Blank.ts | 35 +++++++++++++++++++ etc/Translation/LameXP_DE.ts | 35 +++++++++++++++++++ etc/Translation/LameXP_ES.ts | 35 +++++++++++++++++++ etc/Translation/LameXP_FR.ts | 35 +++++++++++++++++++ etc/Translation/LameXP_IT.ts | 35 +++++++++++++++++++ res/localization/LameXP_DE.qm | Bin 41910 -> 42389 bytes src/Config.h | 2 +- src/Dialog_About.cpp | 2 +- src/Dialog_MainWindow.cpp | 3 +- src/Global.cpp | 4 +-- src/Global.h | 2 +- src/Model_AudioFile.cpp | 61 ++++++++++++++++++++++++++++++---- src/Model_AudioFile.h | 6 +++- 14 files changed, 275 insertions(+), 14 deletions(-) diff --git a/LameXP.vcproj b/LameXP.vcproj index 50fb9d0d..700feff4 100644 --- a/LameXP.vcproj +++ b/LameXP.vcproj @@ -1105,6 +1105,36 @@ + + + + + + + + + + + diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index 7e4e6362..57505238 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -135,6 +135,37 @@ About Third-party Software + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -574,6 +605,10 @@ The current version available is %1 (or later), but you still have version %2 installed. + + n/a + + You can download the latest version of the Nero AAC encoder from the Nero website at: diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index 1baa5715..e4995499 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -135,6 +135,37 @@ About Third-party Software Über Drittsoftware + + n/a + n/v + + + + AudioFileModel + + Profile + Profil + + + Channels + Kanäle + + + Samplerate + Abtastrate + + + Bitdepth + Bittiefe + + + Type + Typ + + + Version + Version + DecoderRegistry @@ -843,6 +874,10 @@ Translation Files Übersetzungsdateien + + n/a + n/v + MetaInfo diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts index 19602926..bac4be10 100644 --- a/etc/Translation/LameXP_ES.ts +++ b/etc/Translation/LameXP_ES.ts @@ -136,6 +136,37 @@ About Third-party Software Acerca del Software de terceros + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -843,6 +874,10 @@ Quit LameXP Salir de LameXP + + n/a + + MetaInfo diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts index 7bee31ec..a8354620 100644 --- a/etc/Translation/LameXP_FR.ts +++ b/etc/Translation/LameXP_FR.ts @@ -138,6 +138,37 @@ About Third-party Software A propos des logiciels tiers + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -847,6 +878,10 @@ Votre dossier TEMP est situé ici: Quit LameXP Quitter LameXP + + n/a + + MetaInfo diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts index 7df507f7..771e5a57 100644 --- a/etc/Translation/LameXP_IT.ts +++ b/etc/Translation/LameXP_IT.ts @@ -135,6 +135,37 @@ Silk Icons - Over 700 icons in PNG format + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -843,6 +874,10 @@ Translation Files + + n/a + + MetaInfo diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm index bbb61c782f843a4ea6d8ba45fed0e341f664b41a..16ea56dd840a094c87004cf0e525258d8e5886a1 100644 GIT binary patch delta 3057 zcmZ`*d015S8h&TaHgjg?j2nrdAP50!qPWYFh=PC%pn@U-qYOAW4!a_TgDeroA_4|# z3YnP-DdH_PH$?M6&5K}erN+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= z3iDG(o*OX6Vo@&hL1ewf!>^g5I$#N^vok1?ElH)9fNnc1w#|exZ;mCSkX$dwu{bAs zvr(;OlT2!irIsTdGD+QS%eUS&)RK$k4|^EJ*J62KWuGo~&F5nq@Ma$^VE;niRpDB9 zzd)Xsr#X5$dUK;^TCeH+W49UFph!lf&onJG`Wz>}r%gLcPEAj=Y!+b*Bie%=I7#a%wwrV;QxsT4U#>z}WLz)17+$ zUZ(wN=|ej<579!$=!tf_IQD9TON%%bk({E#)Pg1?JftmVE$VE9VwzO!Sg`UTdLtCuk! z=38sG`4aJOtk(=0-!rvK1vVTpu%$%1 (%2)
").arg(toolName, verStr); diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index ea0afd90..3abc6930 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -450,6 +450,7 @@ void MainWindow::changeEvent(QEvent *e) m_showFolderContextAction->setText(tr("Browse Selected Folder")); m_metaInfoModel->clearData(); + updateEncoder(m_settings->compressionEncoder()); } } @@ -648,7 +649,7 @@ void MainWindow::windowShown(void) { QString messageText; messageText += QString("%1
").arg(tr("LameXP detected that your version of the Nero AAC encoder is outdated!")); - messageText += QString("%1

").arg(tr("The current version available is %1 (or later), but you still have version %2 installed.").arg(lamexp_version2string("?.?.?.?", lamexp_toolver_neroaac()), lamexp_version2string("?.?.?.?", lamexp_tool_version("neroAacEnc.exe")))); + messageText += QString("%1

").arg(tr("The current version available is %1 (or later), but you still have version %2 installed.").arg(lamexp_version2string("?.?.?.?", lamexp_toolver_neroaac(), tr("n/a")), lamexp_version2string("?.?.?.?", lamexp_tool_version("neroAacEnc.exe"), tr("n/a")))); messageText += QString("%1
").arg(tr("You can download the latest version of the Nero AAC encoder from the Nero website at:")); messageText += "" + LINK(AboutDialog::neroAacUrl) + "
"; QMessageBox::information(this, tr("AAC Encoder Outdated"), messageText); diff --git a/src/Global.cpp b/src/Global.cpp index 5279fca0..0a563f95 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -841,11 +841,11 @@ unsigned int lamexp_tool_version(const QString &toolName) /* * Version number to human-readable string */ -const QString lamexp_version2string(const QString &pattern, unsigned int version) +const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText) { if(version == UINT_MAX) { - return "n/a"; + return defaultText; } QString result = pattern; diff --git a/src/Global.h b/src/Global.h index 7a3e052e..4ee912cb 100644 --- a/src/Global.h +++ b/src/Global.h @@ -103,7 +103,7 @@ static const char* LAMEXP_DEFAULT_LANGID = "en"; //Auxiliary functions bool lamexp_clean_folder(const QString folderPath); -const QString lamexp_version2string(const QString &pattern, unsigned int version); +const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText); QString lamexp_known_folder(lamexp_known_folder_t folder_id); __int64 lamexp_free_diskspace(const QString &path); bool lamexp_remove_file(const QString &filename); diff --git a/src/Model_AudioFile.cpp b/src/Model_AudioFile.cpp index b7dbf405..53d0b748 100644 --- a/src/Model_AudioFile.cpp +++ b/src/Model_AudioFile.cpp @@ -22,6 +22,7 @@ #include "Model_AudioFile.h" #include +#include //////////////////////////////////////////////////////////// // Constructor & Destructor @@ -39,6 +40,52 @@ AudioFileModel::AudioFileModel(const QString &path, const QString &name) m_formatAudioBitdepth = 0; } +AudioFileModel::AudioFileModel(const AudioFileModel &model) +{ + setFilePath(model.m_filePath); + setFileName(model.m_fileName); + setFileArtist(model.m_fileArtist); + setFileAlbum(model.m_fileAlbum); + setFileGenre(model.m_fileGenre); + setFileComment(model.m_fileComment); + setFileYear(model.m_fileYear); + setFilePosition(model.m_filePosition); + setFileDuration(model.m_fileDuration); + + setFormatContainerType(model.m_formatContainerType); + setFormatContainerProfile(model.m_formatContainerProfile); + setFormatAudioType(model.m_formatAudioType); + setFormatAudioProfile(model.m_formatAudioProfile); + setFormatAudioVersion(model.m_formatAudioVersion); + setFormatAudioSamplerate(model.m_formatAudioSamplerate); + setFormatAudioChannels(model.m_formatAudioChannels); + setFormatAudioBitdepth(model.m_formatAudioBitdepth); +} + +AudioFileModel &AudioFileModel::operator=(const AudioFileModel &model) +{ + setFilePath(model.m_filePath); + setFileName(model.m_fileName); + setFileArtist(model.m_fileArtist); + setFileAlbum(model.m_fileAlbum); + setFileGenre(model.m_fileGenre); + setFileComment(model.m_fileComment); + setFileYear(model.m_fileYear); + setFilePosition(model.m_filePosition); + setFileDuration(model.m_fileDuration); + + setFormatContainerType(model.m_formatContainerType); + setFormatContainerProfile(model.m_formatContainerProfile); + setFormatAudioType(model.m_formatAudioType); + setFormatAudioProfile(model.m_formatAudioProfile); + setFormatAudioVersion(model.m_formatAudioVersion); + setFormatAudioSamplerate(model.m_formatAudioSamplerate); + setFormatAudioChannels(model.m_formatAudioChannels); + setFormatAudioBitdepth(model.m_formatAudioBitdepth); + + return (*this); +} + AudioFileModel::~AudioFileModel(void) { } @@ -154,7 +201,7 @@ const QString AudioFileModel::formatContainerInfo(void) const if(!m_formatContainerType.isEmpty()) { QString info = m_formatContainerType; - if(!m_formatContainerProfile.isEmpty()) info.append(" (Profile: ").append(m_formatContainerProfile).append(")"); + if(!m_formatContainerProfile.isEmpty()) info.append(QString(" (%1: %2)").arg(tr("Profile"), m_formatContainerProfile)); return info; } else @@ -171,17 +218,17 @@ const QString AudioFileModel::formatAudioBaseInfo(void) const if(m_formatAudioChannels) { if(!info.isEmpty()) info.append(", "); - info.append("Channels: ").append(QString::number(m_formatAudioChannels)); + info.append(QString("%1: %2").arg(tr("Channels"), QString::number(m_formatAudioChannels))); } if(m_formatAudioSamplerate) { if(!info.isEmpty()) info.append(", "); - info.append("Samplerate: ").append(QString::number(m_formatAudioSamplerate)).append(" Hz"); + info.append(QString("%1: %2 Hz").arg(tr("Samplerate"), QString::number(m_formatAudioSamplerate))); } if(m_formatAudioBitdepth) { if(!info.isEmpty()) info.append(", "); - info.append("Bitdepth: ").append(QString::number(m_formatAudioBitdepth)).append(" Bit"); + info.append(QString("%1: %2 Bit").arg(tr("Bitdepth"), QString::number(m_formatAudioBitdepth))); } return info; } @@ -198,16 +245,16 @@ const QString AudioFileModel::formatAudioCompressInfo(void) const QString info; if(!m_formatAudioProfile.isEmpty() || !m_formatAudioVersion.isEmpty()) { - info.append("Type: "); + info.append(QString("%1: ").arg(tr("Type"))); } info.append(m_formatAudioType); if(!m_formatAudioProfile.isEmpty()) { - info.append(", Profile: ").append(m_formatAudioProfile); + info.append(QString(", %1: %2").arg(tr("Profile"), m_formatAudioProfile)); } if(!m_formatAudioVersion.isEmpty()) { - info.append(", Version: ").append(m_formatAudioVersion); + info.append(QString(", %1: %2").arg(tr("Version"), m_formatAudioVersion)); } return info; } diff --git a/src/Model_AudioFile.h b/src/Model_AudioFile.h index c66152b5..9733e89e 100644 --- a/src/Model_AudioFile.h +++ b/src/Model_AudioFile.h @@ -21,13 +21,17 @@ #pragma once +#include #include -class AudioFileModel +class AudioFileModel : public QObject { + Q_OBJECT public: AudioFileModel(const QString &path = QString(), const QString &name = QString()); + AudioFileModel(const AudioFileModel &model); + AudioFileModel &operator=(const AudioFileModel &model); ~AudioFileModel(void); //-----------------------