diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index 566f8689..2bb0cd28 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -1,6 +1,141 @@ + + AboutDialog + + LameXP - Audio Encoder Front-end + LameXP - Audio Kodierer Oberfläche + + + Please visit %1 for news and updates! + + + + Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!! + + + + Special thanks go out to "John33" from %1 for his continuous support. + + + + About LameXP + + + + Show License Text + + + + Accept License + + + + Decline License + + + + 3rd Party S/W + + + + Contributors + + + + About Qt4 + + + + Discard + + + + The following people have contributed to LameXP: + + + + Translators: + + + + If you are willing to contribute a LameXP translation, feel free to contact us! + + + + About Contributors + + + + The following third-party software is used in LameXP: + + + + LAME - OpenSource mp3 Encoder + + + + Released under the terms of the GNU Leser General Public License. + + + + OggEnc - Ogg Vorbis Encoder + + + + Completely open and patent-free audio encoding technology. + + + + Nero AAC reference MPEG-4 Encoder + + + + Freeware state-of-the-art HE-AAC encoder with 2-Pass support. + + + + Available from vendor web-site as free download: + + + + FLAC - Free Lossless Audio Codec + + + + Open and patent-free lossless audio compression technology. + + + + AC3Filter Tools - AC3/DTS Decoder + + + + MediaInfo - Media File Analysis Tool + + + + SoX - Sound eXchange + + + + GnuPG - The GNU Privacy Guard + + + + Silk Icons - Over 700 icons in PNG format + + + + By Mark James, released under the Creative Commons 'by' License. + + + + About Third-party Software + + + DropBox @@ -26,17 +161,6 @@ Log View - - <b>Log File</b><br>The log file shows detailed information about the selected job. - - - - C:\DOS -C:\DOS\RUN -RUN\DOS\RUN - - - Discard @@ -49,6 +173,14 @@ RUN\DOS\RUN Copy to Clipboard + + Log File + + + + The log file shows detailed information about the selected job. + + MainWindow @@ -531,7 +663,7 @@ LameXP is free software and release versions won't expire. Download && Install - + Herunterladen && Installieren Cancel @@ -674,11 +806,7 @@ LameXP is free software and release versions won't expire. MetaInfo Meta Information - - - - <b>Meta Information</b><br>The following meta information have been extracted from the original file. - + Meta Informationen Edit @@ -686,7 +814,161 @@ LameXP is free software and release versions won't expire. Close - + Schießen + + + + MetaInfoDialog + + Meta Information + Meta Informationen + + + The following meta information have been extracted from the original file. + Die folgenden Meta-Informationen wurden aus der Original-Datei extrahiert. + + + + MetaInfoModel + + Container + Container + + + Compression + Kompression + + + Duration + Dauer + + + Title + Titel + + + Artist + Künstler + + + Album + Album + + + Genre + Genre + + + Year + Jahr + + + Position + Position + + + Generate from list position + Aus Playlisten-Position erzeugen + + + Comment + Kommentar + + + Property + Eigenschaft + + + Value + Wert + + + Edit Title + Titel bearbeiten + + + Please enter the title for this file: + Bitte geben Sie den Titel für diese Datei ein: + + + The title must not be empty. Generating title from file name! + Der Titel kann nicht leer sein. Titel wird aus Dateiname generiert! + + + Edit Artist + Künstler Bearbeiten + + + Please enter the artist for this file: + Bitte geben Sie den Künstler für diese Datei ein: + + + Edit Album + Album Bearbeiten + + + Please enter the album for this file: + Bitte geben Sie das Album für diese Datei ein: + + + Edit Genre + Genre Bearbeiten + + + Please enter the genre for this file: + Bitte geben Sie das Genre für diese Datei ein: + + + Edit Year + Jahr Bearbeiten + + + Please enter the year for this file: + Bitte geben Sie das Jahr für diese Datei ein: + + + Edit Position + Position Bearbeiten + + + Please enter the position (track no.) for this file: + Bitte geben Sie die Position (Track Nr.) für diese Datei ein: + + + Unspecified (copy from source file) + Keine Angabe (aus Quelle kopieren) + + + Edit Comment + Kommentar Bearbeiten + + + Please enter the comment for this file: + Bitte geben Sie den Kommentar für diese Datei ein: + + + Encoded with LameXP + Enkodiert mit LameXP + + + Not editable + Nicht Editierbar + + + Sorry, this property of the source file cannot be edited! + Diese Eigenschaft der Datei kann nicht bearbeitet werden! + + + Full Path + Datei Pfad + + + Format + Format + + + Unspecified + Keine Angabe @@ -695,24 +977,24 @@ LameXP is free software and release versions won't expire. LameXP - Processing - - <b>Encoding Files</b><br>Your files are being encoded, please be patient... - - Initializing, please wait... - - (VERSION_TAG) - - Abort Close + Schießen + + + Encoding Files + + + + Your files are being encoded, please be patient... @@ -720,7 +1002,7 @@ LameXP is free software and release versions won't expire. SplashScreen LameXP is launching... - + LameXP wird gestartet... @@ -731,54 +1013,91 @@ LameXP is free software and release versions won't expire. Please wait... - - - - $(HINT_TEXT) - + Bitte warten... Latest version available: - - - - (Unknown) - + Neuste verfügbare Version: Currently installed version: - - - - $(INFORMATION) - + Derzeit installierte Version: Retry - + Wiederholen Show Log - + Lag Anzeigen Download && Install - + Herunterladen && Installieren Close - + Schießen - - - WorkingBanner - Frame + Build + Buildnummer + + + Testing your internet connection, please wait... - $(Status) + Network connectivity test has faild! + + Please make sure your internet connection is working properly and try again. + + + + Checking for new updates online, please wait... + + + + Failed to fetch update information from server! + + + + Sorry, the update server might be busy at this time. Plase try again later. + + + + More information available at: + Weitere Informationen verfügbar unter: + + + A new version of LameXP is available! + + + + We highly recommend all users to install this update as soon as possible. + + + + No new updates available at this time. + + + + Your version of LameXP is still up-to-date. Please check for updates regularly! + + + + Your version appears to be newer than the latest release. + + + + This usually indicates your are currently using a pre-release version of LameXP. + + + + Unknown + Unbekannt + diff --git a/etc/Translation/update.bat b/etc/Translation/update.bat index 8b5ffba8..bde20814 100644 --- a/etc/Translation/update.bat +++ b/etc/Translation/update.bat @@ -17,6 +17,9 @@ for %%f in (..\..\gui\*.ui) do ( for %%f in (..\..\src\*.cpp) do ( echo %%f >> update.lst ) +for %%f in (..\..\src\*.h) do ( + echo %%f >> update.lst +) REM --------------------------- for %%f in (*.ts) do ( lupdate.exe @update.lst -no-obsolete -ts %%f diff --git a/gui/LogViewDialog.ui b/gui/LogViewDialog.ui index 0b65d036..a321a1c0 100644 --- a/gui/LogViewDialog.ui +++ b/gui/LogViewDialog.ui @@ -172,7 +172,7 @@ - <b>Log File</b><br>The log file shows detailed information about the selected job. + <b>HEADER</b><br>(more header text) @@ -286,7 +286,7 @@ ArrowCursor - C:\DOS + C:\DOS C:\DOS\RUN RUN\DOS\RUN @@ -372,6 +372,7 @@ RUN\DOS\RUN + diff --git a/gui/MetaInfo.ui b/gui/MetaInfo.ui index bfeb960a..ab066860 100644 --- a/gui/MetaInfo.ui +++ b/gui/MetaInfo.ui @@ -137,7 +137,7 @@ - <b>Meta Information</b><br>The following meta information have been extracted from the original file. + <b>HEADER</b><br>(more header text) @@ -318,6 +318,7 @@ + diff --git a/gui/ProcessingDialog.ui b/gui/ProcessingDialog.ui index 236b5a56..2fdf7939 100644 --- a/gui/ProcessingDialog.ui +++ b/gui/ProcessingDialog.ui @@ -182,7 +182,7 @@ - <b>Encoding Files</b><br>Your files are being encoded, please be patient... + <b>Header</b><br>(more status details) @@ -355,7 +355,7 @@ PointingHandCursor - (VERSION_TAG) + (VERSION_TAG) Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -436,6 +436,8 @@ + + diff --git a/gui/UpdateDialog.ui b/gui/UpdateDialog.ui index 023ea3d8..b3e3c090 100644 --- a/gui/UpdateDialog.ui +++ b/gui/UpdateDialog.ui @@ -212,7 +212,7 @@ - $(HINT_TEXT) + $(HINT_TEXT) @@ -246,7 +246,7 @@ - (Unknown) + (Unknown) @@ -260,7 +260,7 @@ - (Unknown) + (Unknown) @@ -340,7 +340,7 @@ - $(INFORMATION) + $(INFORMATION) @@ -555,6 +555,10 @@ + + + + diff --git a/gui/WorkingBanner.ui b/gui/WorkingBanner.ui index a2f53b3f..86d75db4 100644 --- a/gui/WorkingBanner.ui +++ b/gui/WorkingBanner.ui @@ -87,7 +87,7 @@ - Frame + Working @@ -123,7 +123,7 @@ - $(Status) + $(Status) Qt::AlignCenter @@ -142,6 +142,7 @@ + diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm index c5c0faaa..9c63bd03 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 192e896b..d383be6f 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 202 +#define VER_LAMEXP_BUILD 204 #define VER_LAMEXP_SUFFIX TechPreview /* diff --git a/src/Dialog_About.cpp b/src/Dialog_About.cpp index 56428008..96f8f4e4 100644 --- a/src/Dialog_About.cpp +++ b/src/Dialog_About.cpp @@ -42,7 +42,7 @@ //Helper macros #define LINK(URL) QString("%2").arg(URL).arg(URL) #define CONTRIBUTOR(LANG, CNTR, ICON) QString("  %2  %3").arg(ICON, LANG, CNTR); -#define VSTR(BASE,TOOL,FORMAT) QString(BASE).arg(lamexp_version2string(FORMAT, lamexp_tool_version(TOOL))) +#define VSTR(BASE,TOOL,FORMAT) BASE.arg(lamexp_version2string(FORMAT, lamexp_tool_version(TOOL))) //Constants const char *AboutDialog::neroAacUrl = "http://www.nero.com/eng/technologies-aac-codec.html"; @@ -58,11 +58,10 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta { QString aboutText; - aboutText += "

LameXP - Audio Encoder Front-end

"; + aboutText += QString("

%1

").arg(tr("LameXP - Audio Encoder Front-end")); aboutText += QString("Copyright (C) 2004-%1 LoRd_MuldeR <MuldeR2@GMX.de>. Some rights reserved.
").arg(max(lamexp_version_date().year(),QDate::currentDate().year())); aboutText += QString().sprintf("Version %d.%02d %s, Build %d [%s]

", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build(), lamexp_version_date().toString(Qt::ISODate).toLatin1().constData()); - aboutText += "Please visit "; //the official web-site at - aboutText += LINK("http://forum.doom9.org/showthread.php?t=157726") += " for news and updates!
"; //LINK("http://mulder.dummwiedeutsch.de/") + aboutText += QString("%1
").arg(tr("Please visit %1 for news and updates!").arg(LINK("http://forum.doom9.org/showthread.php?t=157726"))); aboutText += "

"; aboutText += "This program is free software; you can redistribute it and/or
"; aboutText += "modify it under the terms of the GNU General Public License
"; @@ -77,52 +76,52 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta aboutText += "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

"; aboutText += "
"; aboutText += ""; - aboutText += ""; + aboutText += QString("").arg(tr("Note: LameXP is free software. Do not pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should not respond to the offer !!!")); aboutText += "
 Note: LameXP is free software. Do not pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should not respond to the offer !!!%1


"; - aboutText += QString("Special thanks go out to \"John33\" from %1 for his continuous support.
").arg(LINK("http://www.rarewares.org/")); + aboutText += QString("%1
").arg(tr("Special thanks go out to \"John33\" from %1 for his continuous support.").arg(LINK("http://www.rarewares.org/"))); setText(aboutText); setIconPixmap(dynamic_cast(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); - setWindowTitle("About LameXP"); + setWindowTitle(tr("About LameXP")); if(firstStart) { - QPushButton *firstButton = addButton("Show License Text", QMessageBox::AcceptRole); + QPushButton *firstButton = addButton(tr("Show License Text"), QMessageBox::AcceptRole); firstButton->setIcon(QIcon(":/icons/script.png")); firstButton->setMinimumWidth(135); firstButton->disconnect(); connect(firstButton, SIGNAL(clicked()), this, SLOT(openLicenseText())); - QPushButton *secondButton = addButton("Accept License", QMessageBox::AcceptRole); + QPushButton *secondButton = addButton(tr("Accept License"), QMessageBox::AcceptRole); secondButton->setIcon(QIcon(":/icons/accept.png")); secondButton->setMinimumWidth(120); - QPushButton *thirdButton = addButton("Decline License", QMessageBox::AcceptRole); + QPushButton *thirdButton = addButton(tr("Decline License"), QMessageBox::AcceptRole); thirdButton->setIcon(QIcon(":/icons/delete.png")); thirdButton->setMinimumWidth(120); thirdButton->setEnabled(false); } else { - QPushButton *firstButton = addButton("3rd Party S/W", QMessageBox::AcceptRole); + QPushButton *firstButton = addButton(tr("3rd Party S/W"), QMessageBox::AcceptRole); firstButton->setIcon(QIcon(":/icons/page_white_cplusplus.png")); firstButton->setMinimumWidth(120); firstButton->disconnect(); connect(firstButton, SIGNAL(clicked()), this, SLOT(showMoreAbout())); - QPushButton *secondButton = addButton("Contributors", QMessageBox::AcceptRole); + QPushButton *secondButton = addButton(tr("Contributors"), QMessageBox::AcceptRole); secondButton->setIcon(QIcon(":icons/user_suit.png")); secondButton->setMinimumWidth(120); secondButton->disconnect(); connect(secondButton, SIGNAL(clicked()), this, SLOT(showAboutContributors())); - QPushButton *thirdButton = addButton("About Qt4", QMessageBox::AcceptRole); + QPushButton *thirdButton = addButton(tr("About Qt4"), QMessageBox::AcceptRole); thirdButton->setIcon(QIcon(":/images/Qt.svg")); thirdButton->setMinimumWidth(120); thirdButton->disconnect(); connect(thirdButton, SIGNAL(clicked()), this, SLOT(showAboutQt())); - QPushButton *fourthButton = addButton("Discard", QMessageBox::AcceptRole); + QPushButton *fourthButton = addButton(tr("Discard"), QMessageBox::AcceptRole); fourthButton->setIcon(QIcon(":/icons/cross.png")); fourthButton->setMinimumWidth(90); } @@ -191,24 +190,24 @@ void AboutDialog::showAboutQt(void) void AboutDialog::showAboutContributors(void) { QString contributorsAboutText; - contributorsAboutText += "

The following people have contributed to LameXP:

"; - contributorsAboutText += "Translators:"; + contributorsAboutText += QString("

%1

").arg(tr("The following people have contributed to LameXP:")); + contributorsAboutText += QString("%1").arg(tr("Translators:")); contributorsAboutText += ""; contributorsAboutText += CONTRIBUTOR("Englisch", "LoRd_MuldeR <MuldeR2@GMX.de>", ":/flags/gb.png"); contributorsAboutText += CONTRIBUTOR("Deutsch", "LoRd_MuldeR <MuldeR2@GMX.de>", ":/flags/de.png"); contributorsAboutText += "
"; contributorsAboutText += "

"; - contributorsAboutText += "If you are willing to contribute a LameXP translation, feel free to contact us!
"; + contributorsAboutText += QString("%1
").arg(tr("If you are willing to contribute a LameXP translation, feel free to contact us!")); QMessageBox *contributorsAboutBox = new QMessageBox(this); contributorsAboutBox->setText(contributorsAboutText); contributorsAboutBox->setIconPixmap(dynamic_cast(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); - QPushButton *closeButton = contributorsAboutBox->addButton("Discard", QMessageBox::AcceptRole); + QPushButton *closeButton = contributorsAboutBox->addButton(tr("Discard"), QMessageBox::AcceptRole); closeButton->setIcon(QIcon(":/icons/cross.png")); closeButton->setMinimumWidth(90); - contributorsAboutBox->setWindowTitle("About Contributors"); + contributorsAboutBox->setWindowTitle(tr("About Contributors")); contributorsAboutBox->setIconPixmap(QIcon(":/images/Logo_Contributors.png").pixmap(QSize(64,74))); contributorsAboutBox->setWindowIcon(QIcon(":/icons/user_suit.png")); contributorsAboutBox->exec(); @@ -219,52 +218,52 @@ void AboutDialog::showAboutContributors(void) void AboutDialog::showMoreAbout(void) { QString moreAboutText; - moreAboutText += "

The following third-party software is used in LameXP:

"; + moreAboutText += QString("

%1

").arg(tr("The following third-party software is used in LameXP:")); moreAboutText += "
    "; - moreAboutText += VSTR( "
  • LAME - OpenSource mp3 Encoder (%1)
    ", "lame.exe", "v?.?? a??"); - moreAboutText += "Released under the terms of the GNU Leser General Public License.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("LAME - OpenSource mp3 Encoder")), "lame.exe", "v?.?? a??"); + moreAboutText += QString("%1
    ").arg(tr("Released under the terms of the GNU Leser General Public License.")); moreAboutText += LINK("http://lame.sourceforge.net/"); moreAboutText += "

    "; - moreAboutText += VSTR("
  • OggEnc - Ogg Vorbis Encoder (%1)", "oggenc2_i386.exe", "v?.??"); - moreAboutText += "
    Completely open and patent-free audio encoding technology.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("OggEnc - Ogg Vorbis Encoder")), "oggenc2_i386.exe", "v?.??"); + moreAboutText += QString("%1
    ").arg(tr("Completely open and patent-free audio encoding technology.")); moreAboutText += LINK("http://www.vorbis.com/"); moreAboutText += "

    "; - moreAboutText += VSTR("
  • Nero AAC reference MPEG-4 Encoder (%1)
    ", "neroAacEnc.exe", "v?.?.?.?"); - moreAboutText += "Freeware state-of-the-art HE-AAC encoder with 2-Pass support.
    "; - moreAboutText += "Available from vendor web-site as free download:
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("Nero AAC reference MPEG-4 Encoder")), "neroAacEnc.exe", "v?.?.?.?"); + moreAboutText += QString("%1
    ").arg(tr("Freeware state-of-the-art HE-AAC encoder with 2-Pass support.")); + moreAboutText += QString("%1
    ").arg(tr("Available from vendor web-site as free download:")); moreAboutText += LINK(neroAacUrl); moreAboutText += "

    "; - moreAboutText += VSTR("
  • FLAC - Free Lossless Audio Codec (%1)
    ", "flac.exe", "v?.?.?"); - moreAboutText += "Open and patent-free lossless audio compression technology.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("FLAC - Free Lossless Audio Codec")), "flac.exe", "v?.?.?"); + moreAboutText += QString("%1
    ").arg(tr("Open and patent-free lossless audio compression technology.")); moreAboutText += LINK("http://flac.sourceforge.net/"); moreAboutText += "

    "; - moreAboutText += VSTR("
  • AC3Filter Tools - AC3/DTS Decoder (%1)
    ", "valdec.exe", "v?.??"); - moreAboutText += "Released under the terms of the GNU Leser General Public License.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("AC3Filter Tools - AC3/DTS Decoder")), "valdec.exe", "v?.??"); + moreAboutText += QString("%1
    ").arg(tr("Released under the terms of the GNU Leser General Public License.")); moreAboutText += LINK("http://www.ac3filter.net/projects/tools"); moreAboutText += "

    "; - moreAboutText += VSTR("
  • MediaInfo - Media File Analysis Tool (%1)
    ", "mediainfo_i386.exe", "v?.?.?"); - moreAboutText += "Released under the terms of the GNU Leser General Public License.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("MediaInfo - Media File Analysis Tool")), "mediainfo_i386.exe", "v?.?.?"); + moreAboutText += QString("%1
    ").arg(tr("Released under the terms of the GNU Leser General Public License.")); moreAboutText += LINK("http://mediainfo.sourceforge.net/"); moreAboutText += "

    "; - moreAboutText += VSTR("
  • SoX - Sound eXchange (%1)
    ", "sox.exe", "v??.?.?"); - moreAboutText += "Released under the terms of the GNU Leser General Public License.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("SoX - Sound eXchange")), "sox.exe", "v??.?.?"); + moreAboutText += QString("%1
    ").arg(tr("Released under the terms of the GNU Leser General Public License.")); moreAboutText += LINK("http://sox.sourceforge.net/"); moreAboutText += "

    "; - moreAboutText += VSTR("
  • GnuPG - The GNU Privacy Guard (%1)
    ", "gpgv.exe", "v?.?.??"); - moreAboutText += "Released under the terms of the GNU Leser General Public License.
    "; + moreAboutText += VSTR(QString("
  • %1 (%2)
    ").arg(tr("GnuPG - The GNU Privacy Guard")), "gpgv.exe", "v?.?.??"); + moreAboutText += QString("%1
    ").arg(tr("Released under the terms of the GNU Leser General Public License.")); moreAboutText += LINK("http://www.gnupg.org/"); moreAboutText += "

    "; - moreAboutText += "
  • Silk Icons - Over 700 icons in PNG format (v1.3)
    "; - moreAboutText += "By Mark James, released under the Creative Commons 'by' License.
    "; + moreAboutText += QString("
  • %1 (v1.3)
    ").arg(tr("Silk Icons - Over 700 icons in PNG format")); + moreAboutText += QString("%1
    ").arg(tr("By Mark James, released under the Creative Commons 'by' License.")); moreAboutText += LINK("http://www.famfamfam.com/lab/icons/silk/"); moreAboutText += "
"; @@ -272,11 +271,11 @@ void AboutDialog::showMoreAbout(void) moreAboutBox->setText(moreAboutText); moreAboutBox->setIconPixmap(dynamic_cast(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); - QPushButton *closeButton = moreAboutBox->addButton("Discard", QMessageBox::AcceptRole); + QPushButton *closeButton = moreAboutBox->addButton(tr("Discard"), QMessageBox::AcceptRole); closeButton->setIcon(QIcon(":/icons/cross.png")); closeButton->setMinimumWidth(90); - moreAboutBox->setWindowTitle("About Third-party Software"); + moreAboutBox->setWindowTitle(tr("About Third-party Software")); moreAboutBox->setIconPixmap(QIcon(":/images/Logo_Software.png").pixmap(QSize(64,71))); moreAboutBox->setWindowIcon(QIcon(":/icons/page_white_cplusplus.png")); moreAboutBox->exec(); diff --git a/src/Dialog_DropBox.cpp b/src/Dialog_DropBox.cpp index 9ff66b0f..721407d1 100644 --- a/src/Dialog_DropBox.cpp +++ b/src/Dialog_DropBox.cpp @@ -64,7 +64,8 @@ DropBox::DropBox(QWidget *parent, QAbstractItemModel *model, SettingsModel *sett setWindowOpacity(0.8); //Translate UI - retranslateUi(this); + QEvent languageChangeEvent(QEvent::LanguageChange); + changeEvent(&languageChangeEvent); } //////////////////////////////////////////////////////////// @@ -79,11 +80,6 @@ DropBox::~DropBox(void) // PUBLIC SLOTS //////////////////////////////////////////////////////////// -void DropBox::doRetranslate(void) -{ - retranslateUi(this); -} - void DropBox::modelChanged(void) { if(m_model) diff --git a/src/Dialog_DropBox.h b/src/Dialog_DropBox.h index 6e2c1a3a..2fe16db7 100644 --- a/src/Dialog_DropBox.h +++ b/src/Dialog_DropBox.h @@ -64,6 +64,5 @@ protected: public slots: void modelChanged(void); - void doRetranslate(void); void showToolTip(void); }; diff --git a/src/Dialog_LogView.cpp b/src/Dialog_LogView.cpp index 83915e4f..62b320d6 100644 --- a/src/Dialog_LogView.cpp +++ b/src/Dialog_LogView.cpp @@ -32,7 +32,9 @@ LogViewDialog::LogViewDialog(QWidget *parent) //Init the dialog, from the .ui file setupUi(this); setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint); - //setWindowFlags(windowFlags() & (~Qt::WindowMaximizeButtonHint)); + + //Translate + headerText->setText(QString("%1
%2").arg(tr("Log File"), tr("The log file shows detailed information about the selected job."))); //Clear textEdit->clear(); diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index d652ee9d..50c3e02a 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -316,6 +316,10 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S } } + //Re-translate (make sure we translate once) + QEvent languageChangeEvent(QEvent::LanguageChange); + changeEvent(&languageChangeEvent); + //Enable Drag & Drop this->setAcceptDrops(true); } @@ -1560,8 +1564,14 @@ void MainWindow::findFileContextActionTriggered(void) QModelIndex index = sourceFileView->currentIndex(); if(index.isValid()) { - QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment(); - QString systemRootPath = procEnv.value("SystemRoot", procEnv.value("windir")); + QString systemRootPath; + + QDir systemRoot(lamexp_known_folder(lamexp_folder_systemfolder)); + if(systemRoot.exists() && systemRoot.cdUp()) + { + systemRootPath = systemRoot.canonicalPath(); + } + if(!systemRootPath.isEmpty()) { QFileInfo explorer(QString("%1/explorer.exe").arg(systemRootPath)); @@ -1571,8 +1581,10 @@ void MainWindow::findFileContextActionTriggered(void) return; } } - qWarning("SystemRoot directory could not be detected!"); - QProcess::execute("explorer.exe", QStringList() << "/select," << QDir::toNativeSeparators(m_fileListModel->getFile(index).filePath())); + else + { + qWarning("SystemRoot directory could not be detected!"); + } } } diff --git a/src/Dialog_MetaInfo.cpp b/src/Dialog_MetaInfo.cpp index 5f112dfd..057ff7e1 100644 --- a/src/Dialog_MetaInfo.cpp +++ b/src/Dialog_MetaInfo.cpp @@ -48,6 +48,9 @@ MetaInfoDialog::MetaInfoDialog(QWidget *parent) connect(upButton, SIGNAL(clicked()), this, SLOT(upButtonClicked())); connect(downButton, SIGNAL(clicked()), this, SLOT(downButtonClicked())); connect(editButton, SIGNAL(clicked()), this, SLOT(editButtonClicked())); + + //Translate + labelHeaderText->setText(QString("%1
%2").arg(tr("Meta Information"), tr("The following meta information have been extracted from the original file."))); } MetaInfoDialog::~MetaInfoDialog(void) diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index a7474487..4be49429 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -128,6 +128,9 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel } } + //Translate + label_headerStatus->setText(QString("%1
%2").arg(tr("Encoding Files"), tr("Your files are being encoded, please be patient..."))); + //Enable system tray icon connect(m_systemTray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(systemTrayActivated(QSystemTrayIcon::ActivationReason))); diff --git a/src/Dialog_Update.cpp b/src/Dialog_Update.cpp index 07131136..7566453d 100644 --- a/src/Dialog_Update.cpp +++ b/src/Dialog_Update.cpp @@ -135,8 +135,8 @@ void UpdateDialog::showEvent(QShowEvent *event) { QDialog::showEvent(event); - labelVersionInstalled->setText(QString("Build %1 (%2)").arg(QString::number(lamexp_version_build()), lamexp_version_date().toString(Qt::ISODate))); - labelVersionLatest->setText("(Unknown)"); + labelVersionInstalled->setText(QString("%1 %2 (%3)").arg(tr("Build"), QString::number(lamexp_version_build()), lamexp_version_date().toString(Qt::ISODate))); + labelVersionLatest->setText(QString("(%1)").arg(tr("Unknown"))); QTimer::singleShot(0, this, SLOT(updateInit())); installButton->setEnabled(false); @@ -201,7 +201,7 @@ void UpdateDialog::checkForUpdates(void) QApplication::processEvents(); QApplication::setOverrideCursor(Qt::WaitCursor); - statusLabel->setText("Testing your internet connection, please wait..."); + statusLabel->setText(tr("Testing your internet connection, please wait...")); m_logFile->clear(); m_logFile->append("Checking internet connection..."); @@ -228,10 +228,10 @@ void UpdateDialog::checkForUpdates(void) closeButton->setEnabled(true); retryButton->setEnabled(true); logButton->setEnabled(true); - statusLabel->setText("Network connectivity test has faild!"); + statusLabel->setText(tr("Network connectivity test has faild!")); progressBar->setValue(progressBar->maximum()); hintIcon->setPixmap(QIcon(":/icons/error.png").pixmap(16,16)); - hintLabel->setText("Please make sure your internet connection is working properly and try again."); + hintLabel->setText(tr("Please make sure your internet connection is working properly and try again.")); hintIcon->show(); hintLabel->show(); LAMEXP_DELETE(m_updateInfo); @@ -241,7 +241,7 @@ void UpdateDialog::checkForUpdates(void) return; } - statusLabel->setText("Checking for new updates online, please wait..."); + statusLabel->setText(tr("Checking for new updates online, please wait...")); m_logFile->append("Checking for updates online..."); for(int i = 0; update_mirrors[i]; i++) @@ -266,10 +266,10 @@ void UpdateDialog::checkForUpdates(void) closeButton->setEnabled(true); retryButton->setEnabled(true); logButton->setEnabled(true); - statusLabel->setText("Failed to fetch update information from server!"); + statusLabel->setText(tr("Failed to fetch update information from server!")); progressBar->setValue(progressBar->maximum()); hintIcon->setPixmap(QIcon(":/icons/server_error.png").pixmap(16,16)); - hintLabel->setText("Sorry, the update server might be busy at this time. Plase try again later."); + hintLabel->setText(tr("Sorry, the update server might be busy at this time. Plase try again later.")); hintIcon->show(); hintLabel->show(); LAMEXP_DELETE(m_updateInfo); @@ -277,35 +277,35 @@ void UpdateDialog::checkForUpdates(void) return; } - labelVersionLatest->setText(QString("Build %1 (%2)").arg(QString::number(m_updateInfo->m_buildNo), m_updateInfo->m_buildDate.toString(Qt::ISODate))); + labelVersionLatest->setText(QString("%1 %2 (%3)").arg(tr("Build"), QString::number(m_updateInfo->m_buildNo), m_updateInfo->m_buildDate.toString(Qt::ISODate))); infoLabel->show(); - infoLabel->setText(QString("More information available at:
%1").arg(m_updateInfo->m_downloadSite)); + infoLabel->setText(QString("%1
%2").arg(tr("More information available at:"), m_updateInfo->m_downloadSite)); QApplication::processEvents(); if(m_updateInfo->m_buildNo > lamexp_version_build()) { installButton->setEnabled(true); - statusLabel->setText("A new version of LameXP is available!"); + statusLabel->setText(tr("A new version of LameXP is available!")); hintIcon->setPixmap(QIcon(":/icons/bell.png").pixmap(16,16)); - hintLabel->setText("We highly recommend all users to install this update as soon as possible."); + hintLabel->setText(tr("We highly recommend all users to install this update as soon as possible.")); hintIcon->show(); hintLabel->show(); MessageBeep(MB_ICONINFORMATION); } else if(m_updateInfo->m_buildNo == lamexp_version_build()) { - statusLabel->setText("No new updates available at this time."); + statusLabel->setText(tr("No new updates available at this time.")); hintIcon->setPixmap(QIcon(":/icons/information.png").pixmap(16,16)); - hintLabel->setText("Your version of LameXP is still up-to-date. Please check for updates regularly!"); + hintLabel->setText(tr("Your version of LameXP is still up-to-date. Please check for updates regularly!")); hintIcon->show(); hintLabel->show(); MessageBeep(MB_ICONINFORMATION); } else { - statusLabel->setText("Your version appears to be newer than the latest release."); + statusLabel->setText(tr("Your version appears to be newer than the latest release.")); hintIcon->setPixmap(QIcon(":/icons/bug.png").pixmap(16,16)); - hintLabel->setText("This usually indicates your are currently using a pre-release version of LameXP."); + hintLabel->setText(tr("This usually indicates your are currently using a pre-release version of LameXP.")); hintIcon->show(); hintLabel->show(); MessageBeep(MB_ICONEXCLAMATION); diff --git a/src/Global.cpp b/src/Global.cpp index e81a1cd7..0d87cbc4 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -721,13 +721,7 @@ QString lamexp_rand_str(void) */ const QString &lamexp_temp_folder(void) { - typedef HRESULT (WINAPI *SHGetKnownFolderPathFun)(__in const GUID &rfid, __in DWORD dwFlags, __in HANDLE hToken, __out PWSTR *ppszPath); - typedef HRESULT (WINAPI *SHGetFolderPathFun)(__in HWND hwndOwner, __in int nFolder, __in HANDLE hToken, __in DWORD dwFlags, __out LPWSTR pszPath); - static const char *TEMP_STR = "Temp"; - static const int CSIDL_LOCAL_APPDATA = 0x001c; - static const GUID LocalAppDataID={0xF1B32785,0x6FBA,0x4FCF,{0x9D,0x55,0x7B,0x8E,0x7F,0x15,0x70,0x91}}; - static const GUID LocalAppDataLowID={0xA520A1A4,0x1780,0x4FF6,{0xBD,0x18,0x16,0x73,0x43,0xC5,0xAF,0x16}}; if(g_lamexp_temp_folder.isEmpty()) { diff --git a/src/Model_MetaInfo.cpp b/src/Model_MetaInfo.cpp index fefb7f61..1b87f875 100644 --- a/src/Model_MetaInfo.cpp +++ b/src/Model_MetaInfo.cpp @@ -75,40 +75,40 @@ QVariant MetaInfoModel::data(const QModelIndex &index, int role) const switch(index.row() + m_offset) { case 0: - return (!index.column()) ? "Full Path" : CHECK1(m_audioFile->filePath()); + return (!index.column()) ? tr("Full Path") : CHECK1(m_audioFile->filePath()); break; case 1: - return (!index.column()) ? "Format" : CHECK1(m_audioFile->formatAudioBaseInfo()); + return (!index.column()) ? tr("Format") : CHECK1(m_audioFile->formatAudioBaseInfo()); break; case 2: - return (!index.column()) ? "Container" : CHECK1(m_audioFile->formatContainerInfo()); + return (!index.column()) ? tr("Container") : CHECK1(m_audioFile->formatContainerInfo()); break; case 3: - return (!index.column()) ? "Compression" : CHECK1(m_audioFile->formatAudioCompressInfo()); + return (!index.column()) ? tr("Compression") : CHECK1(m_audioFile->formatAudioCompressInfo()); break; case 4: - return (!index.column()) ? "Duration" : CHECK1(m_audioFile->fileDurationInfo()); + return (!index.column()) ? tr("Duration") : CHECK1(m_audioFile->fileDurationInfo()); break; case 5: - return (!index.column()) ? "Title" : CHECK1(m_audioFile->fileName()); + return (!index.column()) ? tr("Title") : CHECK1(m_audioFile->fileName()); break; case 6: - return (!index.column()) ? "Artist" : CHECK1(m_audioFile->fileArtist()); + return (!index.column()) ? tr("Artist") : CHECK1(m_audioFile->fileArtist()); break; case 7: - return (!index.column()) ? "Album" : CHECK1(m_audioFile->fileAlbum()); + return (!index.column()) ? tr("Album") : CHECK1(m_audioFile->fileAlbum()); break; case 8: - return (!index.column()) ? "Genre" : CHECK1(m_audioFile->fileGenre()); + return (!index.column()) ? tr("Genre") : CHECK1(m_audioFile->fileGenre()); break; case 9: - return (!index.column()) ? "Year" : CHECK2(m_audioFile->fileYear()); + return (!index.column()) ? tr("Year") : CHECK2(m_audioFile->fileYear()); break; case 10: - return (!index.column()) ? "Position" : ((m_audioFile->filePosition() == UINT_MAX) ? "Generate from list position" : CHECK2(m_audioFile->filePosition())); + return (!index.column()) ? tr("Position") : ((m_audioFile->filePosition() == UINT_MAX) ? tr("Generate from list position") : CHECK2(m_audioFile->filePosition())); break; case 11: - return (!index.column()) ? "Comment" : CHECK1(m_audioFile->fileComment()); + return (!index.column()) ? tr("Comment") : CHECK1(m_audioFile->fileComment()); break; default: return QVariant(); @@ -220,10 +220,10 @@ QVariant MetaInfoModel::headerData(int section, Qt::Orientation orientation, int switch(section) { case 0: - return QVariant("Property"); + return QVariant(tr("Property")); break; case 1: - return QVariant("Value"); + return QVariant(tr("Value")); break; default: return QVariant(); @@ -245,18 +245,18 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) { bool ok = false; int val = -1; - QStringList generes("(Unspecified)"); + QStringList generes(QString("(%1)").arg(tr("Unspecified"))); QString temp; switch(index.row() + m_offset) { case 5: - temp = QInputDialog::getText(parent, "Edit Title", EXPAND("Please enter the title for this file:"), QLineEdit::Normal, m_audioFile->fileName(), &ok).simplified(); + temp = QInputDialog::getText(parent, tr("Edit Title"), EXPAND(tr("Please enter the title for this file:")), QLineEdit::Normal, m_audioFile->fileName(), &ok).simplified(); if(ok) { if(temp.isEmpty()) { - QMessageBox::warning(parent, "Edit Title", "The title must not be empty. Generating title from file name!"); + QMessageBox::warning(parent, tr("Edit Title"), tr("The title must not be empty. Generating title from file name!")); temp = QFileInfo(m_audioFile->filePath()).completeBaseName().replace("_", " ").simplified(); int index = temp.lastIndexOf(" - "); if(index >= 0) temp = temp.mid(index + 3).trimmed(); @@ -267,7 +267,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } break; case 6: - temp = QInputDialog::getText(parent, "Edit Artist", EXPAND("Please enter the artist for this file:"), QLineEdit::Normal, m_audioFile->fileArtist(), &ok).simplified(); + temp = QInputDialog::getText(parent, tr("Edit Artist"), EXPAND(tr("Please enter the artist for this file:")), QLineEdit::Normal, m_audioFile->fileArtist(), &ok).simplified(); if(ok) { beginResetModel(); @@ -276,7 +276,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } break; case 7: - temp = QInputDialog::getText(parent, "Edit Album", EXPAND("Please enter the album for this file:"), QLineEdit::Normal, m_audioFile->fileAlbum(), &ok).simplified(); + temp = QInputDialog::getText(parent, tr("Edit Album"), EXPAND(tr("Please enter the album for this file:")), QLineEdit::Normal, m_audioFile->fileAlbum(), &ok).simplified(); if(ok) { beginResetModel(); @@ -286,7 +286,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) break; case 8: for(int i = 0; g_lamexp_generes[i]; i++) generes << g_lamexp_generes[i]; - temp = QInputDialog::getItem(parent, "Edit Genre", EXPAND("Please enter the genre for this file:"), generes, (m_audioFile->fileGenre().isEmpty() ? 1 : generes.indexOf(m_audioFile->fileGenre())), false, &ok); + temp = QInputDialog::getItem(parent, tr("Edit Genre"), EXPAND(tr("Please enter the genre for this file:")), generes, (m_audioFile->fileGenre().isEmpty() ? 1 : generes.indexOf(m_audioFile->fileGenre())), false, &ok); if(ok) { beginResetModel(); @@ -295,7 +295,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } break; case 9: - val = QInputDialog::getInt(parent, "Edit Year", EXPAND("Please enter the year for this file:"), (m_audioFile->fileYear() ? m_audioFile->fileYear() : 1900), 0, 2100, 1, &ok); + val = QInputDialog::getInt(parent, tr("Edit Year"), EXPAND(tr("Please enter the year for this file:")), (m_audioFile->fileYear() ? m_audioFile->fileYear() : 1900), 0, 2100, 1, &ok); if(ok) { beginResetModel(); @@ -306,7 +306,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) case 10: if(!m_offset) { - val = QInputDialog::getInt(parent, "Edit Position", EXPAND("Please enter the position (track no.) for this file:"), (m_audioFile->filePosition() ? m_audioFile->filePosition() : 1), 0, 99, 1, &ok); + val = QInputDialog::getInt(parent, tr("Edit Position"), EXPAND(tr("Please enter the position (track no.) for this file:")), (m_audioFile->filePosition() ? m_audioFile->filePosition() : 1), 0, 99, 1, &ok); if(ok) { beginResetModel(); @@ -317,8 +317,8 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) else { QStringList options; - options << "Unspecified (copy from source file)" << "Generate from list position"; - temp = QInputDialog::getItem(parent, "Edit Position", EXPAND("Please enter the position (track no.) for this file:"), options, ((m_audioFile->filePosition() == UINT_MAX) ? 1 : 0), false, &ok); + options << tr("Unspecified (copy from source file)") << tr("Generate from list position"); + temp = QInputDialog::getItem(parent, tr("Edit Position"), EXPAND(tr("Please enter the position (track no.) for this file:")), options, ((m_audioFile->filePosition() == UINT_MAX) ? 1 : 0), false, &ok); if(ok) { beginResetModel(); @@ -328,7 +328,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } break; case 11: - temp = QInputDialog::getText(parent, "Edit Comment", EXPAND("Please enter the comment for this file:"), QLineEdit::Normal, (m_audioFile->fileComment().isEmpty() ? "Encoded with LameXP" : m_audioFile->fileComment()), &ok).simplified(); + temp = QInputDialog::getText(parent, tr("Edit Comment"), EXPAND(tr("Please enter the comment for this file:")), QLineEdit::Normal, (m_audioFile->fileComment().isEmpty() ? tr("Encoded with LameXP") : m_audioFile->fileComment()), &ok).simplified(); if(ok) { beginResetModel(); @@ -337,7 +337,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } break; default: - QMessageBox::warning(parent, "Not editable", "Sorry, this property of the source file cannot be edited!"); + QMessageBox::warning(parent, tr("Not editable"), tr("Sorry, this property of the source file cannot be edited!")); break; } } @@ -351,7 +351,7 @@ void MetaInfoModel::clearData(void) m_audioFile->setFileArtist(QString()); m_audioFile->setFileAlbum(QString()); m_audioFile->setFileGenre(QString()); - m_audioFile->setFileComment("Encoded with LameXP"); + m_audioFile->setFileComment(tr("Encoded with LameXP")); m_audioFile->setFileYear(0); m_audioFile->setFilePosition(UINT_MAX); m_audioFile->setFileDuration(0);