Make 5 more strings translatable.

This commit is contained in:
LoRd_MuldeR 2011-01-14 19:45:14 +01:00
parent 636ca20034
commit f6465c7c74
13 changed files with 153 additions and 21 deletions

View File

@ -434,6 +434,13 @@ SectionEnd
Function CheckForUpdate Function CheckForUpdate
!insertmacro GetCommandlineParameter "Update" "error" $R0 !insertmacro GetCommandlineParameter "Update" "error" $R0
StrCmp $R0 "error" 0 EnableUpdateMode StrCmp $R0 "error" 0 EnableUpdateMode
StrCmp "$INSTDIR" "" 0 +2
Return
IfFileExists "$INSTDIR\*.*" +2
Return
IfFileExists "$INSTDIR\LameXP.exe" EnableUpdateMode IfFileExists "$INSTDIR\LameXP.exe" EnableUpdateMode
Return Return

View File

@ -871,6 +871,14 @@
</context> </context>
<context> <context>
<name>MetaInfoModel</name> <name>MetaInfoModel</name>
<message>
<source>Not Specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Full Path</source> <source>Full Path</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -935,6 +943,14 @@
<source>Unspecified</source> <source>Unspecified</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Edit Title</source> <source>Edit Title</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -1129,6 +1145,10 @@
<source>Process was aborted by the user after %1 file(s)!</source> <source>Process was aborted by the user after %1 file(s)!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Process was aborted prematurely by the user!</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>LameXP - Aborted</source> <source>LameXP - Aborted</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View File

@ -1012,6 +1012,22 @@
<source>Unspecified</source> <source>Unspecified</source>
<translation>Keine Angabe</translation> <translation>Keine Angabe</translation>
</message> </message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Abbrechen</translation>
</message>
<message>
<source>Not Specified</source>
<translation>Keine Angabe</translation>
</message>
<message>
<source>Unknown</source>
<translation>Unbekannt</translation>
</message>
</context> </context>
<context> <context>
<name>ProcessThread</name> <name>ProcessThread</name>
@ -1170,6 +1186,10 @@
<source>The playlist file could not be created:</source> <source>The playlist file could not be created:</source>
<translation>Die Wiedergabeliste konnte nicht erstellt werden:</translation> <translation>Die Wiedergabeliste konnte nicht erstellt werden:</translation>
</message> </message>
<message>
<source>Process was aborted prematurely by the user!</source>
<translation>Der Vorgang wurde vom Benutzer abgebrochen!</translation>
</message>
</context> </context>
<context> <context>
<name>ProgressModel</name> <name>ProgressModel</name>

View File

@ -1016,6 +1016,22 @@ Votre dossier TEMP est situé ici:</translation>
<source>Sorry, this property of the source file cannot be edited!</source> <source>Sorry, this property of the source file cannot be edited!</source>
<translation>Désolé, cette propriété du fichier source ne peut pas être modifiée!</translation> <translation>Désolé, cette propriété du fichier source ne peut pas être modifiée!</translation>
</message> </message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Annuler</translation>
</message>
<message>
<source>Not Specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown</source>
<translation type="unfinished">Inconnu</translation>
</message>
</context> </context>
<context> <context>
<name>ProcessThread</name> <name>ProcessThread</name>
@ -1174,6 +1190,10 @@ Votre dossier TEMP est situé ici:</translation>
<source>The playlist file could not be created:</source> <source>The playlist file could not be created:</source>
<translation>La liste de lecture n&apos;a pas pu être créée:</translation> <translation>La liste de lecture n&apos;a pas pu être créée:</translation>
</message> </message>
<message>
<source>Process was aborted prematurely by the user!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProgressModel</name> <name>ProgressModel</name>

View File

@ -1012,6 +1012,22 @@
<source>Unspecified</source> <source>Unspecified</source>
<translation>Non specificato</translation> <translation>Non specificato</translation>
</message> </message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancella</translation>
</message>
<message>
<source>Not Specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown</source>
<translation type="unfinished">Sconosciuto</translation>
</message>
</context> </context>
<context> <context>
<name>ProcessThread</name> <name>ProcessThread</name>
@ -1170,6 +1186,10 @@
<source>Alle files completed successfully.</source> <source>Alle files completed successfully.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Process was aborted prematurely by the user!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProgressModel</name> <name>ProgressModel</name>

View File

@ -23,6 +23,8 @@ for %%f in (..\..\src\*.h) do (
) )
REM --------------------------- REM ---------------------------
for %%f in (*.ts) do ( for %%f in (*.ts) do (
del %%f.bak 2> NUL
copy %%f %%f.bak
lupdate.exe @update.lst -no-obsolete -ts %%f lupdate.exe @update.lst -no-obsolete -ts %%f
) )
REM --------------------------- REM ---------------------------

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 0 #define VER_LAMEXP_MINOR_LO 0
#define VER_LAMEXP_BUILD 228 #define VER_LAMEXP_BUILD 231
#define VER_LAMEXP_SUFFIX TechPreview #define VER_LAMEXP_SUFFIX TechPreview
/* /*

View File

@ -321,7 +321,7 @@ void ProcessingDialog::doneEncoding(void)
CHANGE_BACKGROUND_COLOR(frame_header, QColor("#FFF3BA")); CHANGE_BACKGROUND_COLOR(frame_header, QColor("#FFF3BA"));
WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarErrorState); WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarErrorState);
WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/error.png")); WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/error.png"));
SET_PROGRESS_TEXT((m_succeededJobs.count() > 0) ? tr("Process was aborted by the user after %1 file(s)!").arg(QString::number(m_succeededJobs.count())) : "Process was aborted prematurely by the user!"); SET_PROGRESS_TEXT((m_succeededJobs.count() > 0) ? tr("Process was aborted by the user after %1 file(s)!").arg(QString::number(m_succeededJobs.count())) : tr("Process was aborted prematurely by the user!"));
m_systemTray->showMessage(tr("LameXP - Aborted"), tr("Process was aborted by the user."), QSystemTrayIcon::Warning); m_systemTray->showMessage(tr("LameXP - Aborted"), tr("Process was aborted by the user."), QSystemTrayIcon::Warning);
m_systemTray->setIcon(QIcon(":/icons/cd_delete.png")); m_systemTray->setIcon(QIcon(":/icons/cd_delete.png"));
QApplication::processEvents(); QApplication::processEvents();

View File

@ -28,8 +28,8 @@
#define MODEL_ROW_COUNT 12 #define MODEL_ROW_COUNT 12
#define CHECK1(STR) (STR.isEmpty() ? (m_offset ? "(Not Specified)" : "(Unknown)") : STR) #define CHECK1(STR) (STR.isEmpty() ? (m_offset ? m_textNotSpecified : m_textUnknown) : STR)
#define CHECK2(VAL) ((VAL > 0) ? QString::number(VAL) : (m_offset ? "(Not Specified)" : "(Unknown)")) #define CHECK2(VAL) ((VAL > 0) ? QString::number(VAL) : (m_offset ? m_textNotSpecified : m_textUnknown))
#define CHECK3(STR) (STR.isEmpty() ? Qt::darkGray : QVariant()) #define CHECK3(STR) (STR.isEmpty() ? Qt::darkGray : QVariant())
#define CHECK4(VAL) ((VAL == 0) ? Qt::darkGray : QVariant()) #define CHECK4(VAL) ((VAL == 0) ? Qt::darkGray : QVariant())
@ -46,6 +46,9 @@ MetaInfoModel::MetaInfoModel(AudioFileModel *file, unsigned int offset)
throw "Offset is out of range!"; throw "Offset is out of range!";
} }
m_textUnknown = QString("(%1)").arg(tr("Unknown"));
m_textNotSpecified = QString("(%1)").arg(tr("Not Specified"));
m_audioFile = file; m_audioFile = file;
m_offset = offset; m_offset = offset;
} }
@ -247,13 +250,21 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
int val = -1; int val = -1;
QStringList generes(QString("(%1)").arg(tr("Unspecified"))); QStringList generes(QString("(%1)").arg(tr("Unspecified")));
QString temp; QString temp;
QInputDialog input(parent);
input.setOkButtonText(tr("OK"));
input.setCancelButtonText(tr("Cancel"));
input.setTextEchoMode(QLineEdit::Normal);
switch(index.row() + m_offset) switch(index.row() + m_offset)
{ {
case 5: case 5:
temp = QInputDialog::getText(parent, tr("Edit Title"), EXPAND(tr("Please enter the title for this file:")), QLineEdit::Normal, m_audioFile->fileName(), &ok).simplified(); input.setWindowTitle(tr("Edit Title"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the title for this file:")));
input.setTextValue(m_audioFile->fileName());
if(input.exec() != 0)
{ {
temp = input.textValue().simplified();
if(temp.isEmpty()) if(temp.isEmpty())
{ {
QMessageBox::warning(parent, tr("Edit Title"), tr("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!"));
@ -267,37 +278,52 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
} }
break; break;
case 6: case 6:
temp = QInputDialog::getText(parent, tr("Edit Artist"), EXPAND(tr("Please enter the artist for this file:")), QLineEdit::Normal, m_audioFile->fileArtist(), &ok).simplified(); input.setWindowTitle(tr("Edit Artist"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the artist for this file:")));
input.setTextValue(m_audioFile->fileArtist());
if(input.exec() != 0)
{ {
temp = input.textValue().simplified();
beginResetModel(); beginResetModel();
m_audioFile->setFileArtist(temp.isEmpty() ? QString() : temp); m_audioFile->setFileArtist(temp.isEmpty() ? QString() : temp);
endResetModel(); endResetModel();
} }
break; break;
case 7: case 7:
temp = QInputDialog::getText(parent, tr("Edit Album"), EXPAND(tr("Please enter the album for this file:")), QLineEdit::Normal, m_audioFile->fileAlbum(), &ok).simplified(); input.setWindowTitle(tr("Edit Album"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the album for this file:")));
input.setTextValue(m_audioFile->fileAlbum());
if(input.exec() != 0)
{ {
temp = input.textValue().simplified();
beginResetModel(); beginResetModel();
m_audioFile->setFileAlbum(temp.isEmpty() ? QString() : temp); m_audioFile->setFileAlbum(temp.isEmpty() ? QString() : temp);
endResetModel(); endResetModel();
} }
break; break;
case 8: case 8:
input.setWindowTitle(tr("Edit Genre"));
input.setLabelText(EXPAND(tr("Please enter the genre for this file:")));
for(int i = 0; g_lamexp_generes[i]; i++) generes << g_lamexp_generes[i]; for(int i = 0; g_lamexp_generes[i]; i++) generes << g_lamexp_generes[i];
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); input.setComboBoxItems(generes);
if(ok) input.setTextValue(m_audioFile->fileGenre());
if(input.exec() != 0)
{ {
temp = input.textValue().simplified();
beginResetModel(); beginResetModel();
m_audioFile->setFileGenre((temp.isEmpty() || !temp.compare(generes.at(0), Qt::CaseInsensitive)) ? QString() : temp); m_audioFile->setFileGenre((temp.isEmpty() || !temp.compare(generes.at(0), Qt::CaseInsensitive)) ? QString() : temp);
endResetModel(); endResetModel();
} }
break; break;
case 9: case 9:
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); input.setWindowTitle(tr("Edit Year"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the year for this file:")));
input.setIntRange(0, 2100);
input.setIntValue((m_audioFile->fileYear() ? m_audioFile->fileYear() : 1900));
input.setIntStep(1);
if(input.exec() != 0)
{ {
val = input.intValue();
beginResetModel(); beginResetModel();
m_audioFile->setFileYear(val); m_audioFile->setFileYear(val);
endResetModel(); endResetModel();
@ -306,9 +332,14 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
case 10: case 10:
if(!m_offset) if(!m_offset)
{ {
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); input.setWindowTitle(tr("Edit Position"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the position (track no.) for this file:")));
input.setIntRange(0, 99);
input.setIntValue((m_audioFile->filePosition() ? m_audioFile->filePosition() : 1));
input.setIntStep(1);
if(input.exec() != 0)
{ {
val = input.intValue();
beginResetModel(); beginResetModel();
m_audioFile->setFilePosition(val); m_audioFile->setFilePosition(val);
endResetModel(); endResetModel();
@ -318,9 +349,13 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
{ {
QStringList options; QStringList options;
options << tr("Unspecified (copy from source file)") << tr("Generate from list position"); 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); input.setWindowTitle(tr("Edit Position"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the position (track no.) for this file:")));
input.setComboBoxItems(options);
input.setTextValue(options.value((m_audioFile->filePosition() == UINT_MAX) ? 1 : 0));
if(input.exec() != 0)
{ {
temp = input.textValue().simplified();
beginResetModel(); beginResetModel();
m_audioFile->setFilePosition((options.indexOf(temp) == 1) ? UINT_MAX : 0); m_audioFile->setFilePosition((options.indexOf(temp) == 1) ? UINT_MAX : 0);
endResetModel(); endResetModel();
@ -328,9 +363,12 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
} }
break; break;
case 11: case 11:
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(); input.setWindowTitle(tr("Edit Comment"));
if(ok) input.setLabelText(EXPAND(tr("Please enter the comment for this file:")));
input.setTextValue((m_audioFile->fileComment().isEmpty() ? tr("Encoded with LameXP") : m_audioFile->fileComment()));
if(input.exec() != 0)
{ {
temp = input.textValue().simplified();
beginResetModel(); beginResetModel();
m_audioFile->setFileComment(temp.isEmpty() ? QString() : temp); m_audioFile->setFileComment(temp.isEmpty() ? QString() : temp);
endResetModel(); endResetModel();
@ -346,6 +384,9 @@ void MetaInfoModel::clearData(void)
{ {
beginResetModel(); beginResetModel();
m_textUnknown = QString("(%1)").arg(tr("Unknown"));
m_textNotSpecified = QString("(%1)").arg(tr("Not Specified"));
m_audioFile->setFilePath(QString()); m_audioFile->setFilePath(QString());
m_audioFile->setFileName(QString()); m_audioFile->setFileName(QString());
m_audioFile->setFileArtist(QString()); m_audioFile->setFileArtist(QString());

View File

@ -46,4 +46,6 @@ public:
private: private:
AudioFileModel* m_audioFile; AudioFileModel* m_audioFile;
unsigned int m_offset; unsigned int m_offset;
QString m_textNotSpecified;
QString m_textUnknown;
}; };