Prevent rename pattern edit box from being translated, so the text won't be lost anymore.

This commit is contained in:
LoRd_MuldeR 2011-08-05 02:33:32 +02:00
parent 7e1f790e9b
commit 613c9721a7
14 changed files with 1422 additions and 733 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1556,51 +1556,55 @@
</message>
<message>
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
<translation> Ausgabedateien umbenennen </translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
<translation>Ausgabedateien umbenennen</translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
<translation>Titelnummer mit führender Null</translation>
</message>
<message>
<source>Track title</source>
<translation type="unfinished"></translation>
<translation>Titel</translation>
</message>
<message>
<source>Artist name</source>
<translation type="unfinished"></translation>
<translation>Künstlername</translation>
</message>
<message>
<source>Album name</source>
<translation type="unfinished"></translation>
<translation>Albumname</translation>
</message>
<message>
<source>Year with (at least) four digits</source>
<translation type="unfinished"></translation>
<translation>Jahr mit mind. vier Stellen</translation>
</message>
<message>
<source>Comment</source>
<translation type="unfinished">Kommentar</translation>
<translation>Kommentar</translation>
</message>
<message>
<source>Rename Macros</source>
<translation type="unfinished"></translation>
<translation>Platzhalter</translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation>Sie können hier Parameter eingeben!</translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation>Schema zum Umbennen hier eingeben!</translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation>&lt;a href=&quot;reset&quot;&gt;Zurücksetzen&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Verfügbare Platzhalter anzeigen&lt;/a&gt;</translation>
</message>
<message>
<source>File name without extension</source>
<translation>Dateiname ohne Erweiterung</translation>
</message>
</context>
<context>

View File

@ -1557,22 +1557,10 @@
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
@ -1601,6 +1589,22 @@
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1567,22 +1567,10 @@ Ouvrir le dossier récursivement...</translation>
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
@ -1611,6 +1599,22 @@ Ouvrir le dossier récursivement...</translation>
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1558,22 +1558,10 @@
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
@ -1602,6 +1590,22 @@
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1557,22 +1557,10 @@
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
@ -1601,6 +1589,22 @@
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1563,22 +1563,10 @@
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
@ -1607,6 +1595,22 @@
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1558,22 +1558,10 @@
<source> Rename Output Files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rename Output Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Original file name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
@ -1602,6 +1590,22 @@
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can eneter custom parameters here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Entere the pattern to rename the output files here!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -2049,6 +2049,12 @@
<family>Lucida Console</family>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>You can eneter custom parameters here!</string>
</property>
</widget>
</item>
<item row="2" column="2">
@ -2058,6 +2064,12 @@
<family>Lucida Console</family>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>You can eneter custom parameters here!</string>
</property>
</widget>
</item>
<item row="4" column="2">
@ -2067,6 +2079,12 @@
<family>Lucida Console</family>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>You can eneter custom parameters here!</string>
</property>
</widget>
</item>
<item row="3" column="2">
@ -2076,6 +2094,12 @@
<family>Lucida Console</family>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>You can eneter custom parameters here!</string>
</property>
</widget>
</item>
<item row="1" column="1">
@ -2223,6 +2247,12 @@
<family>Lucida Console</family>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>You can eneter custom parameters here!</string>
</property>
</widget>
</item>
<item row="5" column="1">
@ -2840,7 +2870,10 @@
</font>
</property>
<property name="text">
<string>[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</string>
<string notr="true">[&lt;TrackNo&gt;] &lt;Artist&gt; - &lt;Title&gt;</string>
</property>
<property name="placeholderText">
<string>Entere the pattern to rename the output files here!</string>
</property>
</widget>
</item>
@ -2907,11 +2940,8 @@
</item>
<item row="3" column="2">
<widget class="QLabel" name="labelShowRenameMacros">
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>&lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</string>
<string>&lt;a href=&quot;reset&quot;&gt;Reset&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;#&quot;&gt;Show List of Macros&lt;/a&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -3612,6 +3642,10 @@
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
</resources>
<connections>
<connection>

Binary file not shown.

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 7
#define VER_LAMEXP_BUILD 616
#define VER_LAMEXP_BUILD 618
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -269,7 +269,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(checkBoxRenameOutput, SIGNAL(clicked(bool)), this, SLOT(renameOutputEnabledChanged(bool)));
connect(lineEditRenamePattern, SIGNAL(editingFinished()), this, SLOT(renameOutputPatternChanged()));
connect(lineEditRenamePattern, SIGNAL(textChanged(QString)), this, SLOT(renameOutputPatternChanged(QString)));
connect(labelShowRenameMacros, SIGNAL(linkActivated(QString)), this, SLOT(showRenameMacros()));
connect(labelShowRenameMacros, SIGNAL(linkActivated(QString)), this, SLOT(showRenameMacros(QString)));
updateLameAlgoQuality(sliderLameAlgoQuality->value());
updateMaximumInstances(sliderMaxInstances->value());
toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value());
@ -2731,7 +2731,8 @@ void MainWindow::renameOutputEnabledChanged(bool checked)
*/
void MainWindow::renameOutputPatternChanged(void)
{
lineEditRenamePattern->setText(lineEditRenamePattern->text().simplified());
QString temp = lineEditRenamePattern->text().simplified();
lineEditRenamePattern->setText(temp.isEmpty() ? m_settings->renameOutputFilesPatternDefault() : temp);
m_settings->renameOutputFilesPattern(lineEditRenamePattern->text());
}
@ -2771,21 +2772,27 @@ void MainWindow::renameOutputPatternChanged(const QString &text)
/*
* Show list of rename macros
*/
void MainWindow::showRenameMacros(void)
void MainWindow::showRenameMacros(const QString &text)
{
if(text.compare("reset", Qt::CaseInsensitive) == 0)
{
lineEditRenamePattern->setText(m_settings->renameOutputFilesPatternDefault());
return;
}
const QString format = QString("<tr><td><tt>&lt;%1&gt;</tt></td><td>&nbsp;&nbsp;</td><td>%2</td></tr>");
QString text = QString("<table>");
text += QString(format).arg("BaseName", tr("Original file name without extension"));
text += QString(format).arg("TrackNo", tr("Track number with leading zero"));
text += QString(format).arg("Title", tr("Track title"));
text += QString(format).arg("Artist", tr("Artist name"));
text += QString(format).arg("Album", tr("Album name"));
text += QString(format).arg("Year", tr("Year with (at least) four digits"));
text += QString(format).arg("Comment", tr("Comment"));
text += "</table><br>";
QString message = QString("<table>");
message += QString(format).arg("BaseName", tr("File name without extension"));
message += QString(format).arg("TrackNo", tr("Track number with leading zero"));
message += QString(format).arg("Title", tr("Track title"));
message += QString(format).arg("Artist", tr("Artist name"));
message += QString(format).arg("Album", tr("Album name"));
message += QString(format).arg("Year", tr("Year with (at least) four digits"));
message += QString(format).arg("Comment", tr("Comment"));
message += "</table><br>";
QMessageBox::information(this, tr("Rename Macros"), text, tr("Discard"));
QMessageBox::information(this, tr("Rename Macros"), message, tr("Discard"));
}
/*

View File

@ -113,7 +113,7 @@ private slots:
void showDetailsButtonClicked(void);
void showDropBoxWidgetActionTriggered(bool checked);
void showFolderContextActionTriggered(void);
void showRenameMacros(void);
void showRenameMacros(const QString &text);
void sourceFilesContextMenu(const QPoint &pos);
void sourceModelChanged(void);
void styleActionActivated(QAction *action);

View File

@ -401,7 +401,8 @@ void ProcessThread::addFilter(AbstractFilter *filter)
void ProcessThread::setRenamePattern(const QString &pattern)
{
m_renamePattern = pattern.simplified();
QString newPattern = pattern.simplified();
if(!newPattern.isEmpty()) m_renamePattern = newPattern;
}
////////////////////////////////////////////////////////////