Commit 144115b2 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

fixed untranslated strings in kid3-qt, added Estonian translation

parent 1dc931a4
......@@ -114,6 +114,7 @@ sub setTsTranslations($$%)
$translation =~ s/&/&/g;
$translation =~ s/</&lt;/g;
$translation =~ s/>/&gt;/g;
$translation =~ s/\\"/&quot;/g;
$translation =~ s/\\n/\n/g;
s/ type="unfinished"//;
s/<\/translation>/$translation<\/translation>/;
......@@ -130,7 +131,7 @@ sub setTsTranslations($$%)
# Generate .ts files from .po files.
sub generateTs()
{
my @languages = ("de", "es", "fr", "ru", "it", "pl", "nl");
my @languages = ("de", "es", "fr", "ru", "it", "pl", "nl", "et");
my $tmpdir = ".tsdir";
mkdir $tmpdir unless -d $tmpdir;
mkdir "po" unless -d "po";
......
......@@ -4,7 +4,7 @@ if (HAVE_TAGLIB)
set(TAGLIBEXT_LIBRARIES taglibext)
endif (HAVE_TAGLIB)
set(kid3_SRCS filelist.cpp filelistitem.cpp frame.cpp framelist.cpp frametable.cpp genres.cpp id3form.cpp kid3.cpp main.cpp m4afile.cpp mp3file.cpp configdialog.cpp exportdialog.cpp formatconfig.cpp formatbox.cpp importdialog.cpp importselector.cpp importparser.cpp generalconfig.cpp importconfig.cpp miscconfig.cpp freedbdialog.cpp freedbconfig.cpp freedbclient.cpp rendirdialog.cpp dirlist.cpp taggedfile.cpp musicbrainzdialog.cpp musicbrainzconfig.cpp musicbrainzclient.cpp numbertracksdialog.cpp oggfile.cpp vcedit.c flacfile.cpp commandstable.cpp taglibfile.cpp importsourceconfig.cpp importsourcedialog.cpp importsourceclient.cpp discogsdialog.cpp discogsclient.cpp discogsconfig.cpp musicbrainzreleasedialog.cpp musicbrainzreleaseclient.cpp externalprocess.cpp importtrackdata.cpp stringlistedit.cpp tracktypedialog.cpp tracktypeclient.cpp filterconfig.cpp filterdialog.cpp filefilter.cpp expressionparser.cpp pictureframe.cpp formatreplacer.cpp httpclient.cpp downloaddialog.cpp picturelabel.cpp browsecoverartdialog.cpp configtable.cpp attributedata.cpp)
set(kid3_SRCS filelist.cpp filelistitem.cpp frame.cpp framelist.cpp frametable.cpp genres.cpp id3form.cpp kid3.cpp main.cpp m4afile.cpp mp3file.cpp configdialog.cpp exportdialog.cpp formatconfig.cpp formatbox.cpp importdialog.cpp importselector.cpp importparser.cpp generalconfig.cpp importconfig.cpp miscconfig.cpp freedbdialog.cpp freedbconfig.cpp freedbclient.cpp rendirdialog.cpp dirlist.cpp taggedfile.cpp musicbrainzdialog.cpp musicbrainzconfig.cpp musicbrainzclient.cpp numbertracksdialog.cpp oggfile.cpp vcedit.c flacfile.cpp commandstable.cpp taglibfile.cpp importsourceconfig.cpp importsourcedialog.cpp importsourceclient.cpp discogsdialog.cpp discogsclient.cpp discogsconfig.cpp musicbrainzreleasedialog.cpp musicbrainzreleaseclient.cpp externalprocess.cpp importtrackdata.cpp stringlistedit.cpp tracktypedialog.cpp tracktypeclient.cpp filterconfig.cpp filterdialog.cpp filefilter.cpp expressionparser.cpp pictureframe.cpp formatreplacer.cpp httpclient.cpp downloaddialog.cpp picturelabel.cpp browsecoverartdialog.cpp configtable.cpp attributedata.cpp browserdialog.cpp imageviewer.cpp editframedialog.cpp editframefieldsdialog.cpp)
if (HAVE_QTDBUS)
set(kid3_SRCS ${kid3_SRCS} scriptinterface.cpp)
......
......@@ -28,17 +28,17 @@ kid3_LDADD += taglibext/libtaglibext.la
endif
# which sources should be compiled for kid3
kid3_SOURCES = filelist.cpp filelistitem.cpp frame.cpp framelist.cpp frametable.cpp genres.cpp id3form.cpp kid3.cpp main.cpp m4afile.cpp mp3file.cpp configdialog.cpp exportdialog.cpp formatconfig.cpp formatbox.cpp importdialog.cpp importselector.cpp importparser.cpp generalconfig.cpp importconfig.cpp miscconfig.cpp freedbdialog.cpp freedbconfig.cpp freedbclient.cpp rendirdialog.cpp dirlist.cpp taggedfile.cpp musicbrainzdialog.cpp musicbrainzconfig.cpp musicbrainzclient.cpp numbertracksdialog.cpp oggfile.cpp vcedit.c flacfile.cpp commandstable.cpp taglibfile.cpp importsourceconfig.cpp importsourcedialog.cpp importsourceclient.cpp discogsdialog.cpp discogsclient.cpp discogsconfig.cpp musicbrainzreleasedialog.cpp musicbrainzreleaseclient.cpp externalprocess.cpp importtrackdata.cpp stringlistedit.cpp tracktypedialog.cpp tracktypeclient.cpp scriptinterface.cpp filterconfig.cpp filterdialog.cpp filefilter.cpp expressionparser.cpp pictureframe.cpp formatreplacer.cpp httpclient.cpp downloaddialog.cpp picturelabel.cpp browsecoverartdialog.cpp configtable.cpp attributedata.cpp
kid3_SOURCES = filelist.cpp filelistitem.cpp frame.cpp framelist.cpp frametable.cpp genres.cpp id3form.cpp kid3.cpp main.cpp m4afile.cpp mp3file.cpp configdialog.cpp exportdialog.cpp formatconfig.cpp formatbox.cpp importdialog.cpp importselector.cpp importparser.cpp generalconfig.cpp importconfig.cpp miscconfig.cpp freedbdialog.cpp freedbconfig.cpp freedbclient.cpp rendirdialog.cpp dirlist.cpp taggedfile.cpp musicbrainzdialog.cpp musicbrainzconfig.cpp musicbrainzclient.cpp numbertracksdialog.cpp oggfile.cpp vcedit.c flacfile.cpp commandstable.cpp taglibfile.cpp importsourceconfig.cpp importsourcedialog.cpp importsourceclient.cpp discogsdialog.cpp discogsclient.cpp discogsconfig.cpp musicbrainzreleasedialog.cpp musicbrainzreleaseclient.cpp externalprocess.cpp importtrackdata.cpp stringlistedit.cpp tracktypedialog.cpp tracktypeclient.cpp scriptinterface.cpp filterconfig.cpp filterdialog.cpp filefilter.cpp expressionparser.cpp pictureframe.cpp formatreplacer.cpp httpclient.cpp downloaddialog.cpp picturelabel.cpp browsecoverartdialog.cpp configtable.cpp attributedata.cpp browserdialog.cpp imageviewer.cpp editframedialog.cpp editframefieldsdialog.cpp
# these headers are automatically built
BUILT_SOURCES =
CLEANFILES = allsys.h allsys.h.gch
# these are the headers for your project that won't be installed
noinst_HEADERS = configdialog.h exportdialog.h filelist.h filelistitem.h formatbox.h formatconfig.h frame.h framelist.h frametable.h freedbclient.h freedbconfig.h freedbdialog.h generalconfig.h genres.h id3form.h importconfig.h importdialog.h importparser.h importselector.h kid3.h miscconfig.h m4afile.h mp3file.h rendirdialog.h dirlist.h taggedfile.h musicbrainzclient.h musicbrainzconfig.h musicbrainzdialog.h numbertracksdialog.h oggfile.hpp vcedit.h flacfile.hpp commandstable.h taglibfile.h importsourceconfig.h importsourcedialog.h importsourceclient.h discogsdialog.h discogsclient.h discogsconfig.h musicbrainzreleasedialog.h musicbrainzreleaseclient.h qtcompatmac.h dirinfo.h externalprocess.h stringlistedit.h tracktypedialog.h tracktypeclient.h scriptinterface.h filterconfig.h filterdialog.h filefilter.h expressionparser.h pictureframe.h formatreplacer.h httpclient.h downloaddialog.h picturelabel.h browsecoverartdialog.h configtable.h attributedata.h
noinst_HEADERS = configdialog.h exportdialog.h filelist.h filelistitem.h formatbox.h formatconfig.h frame.h framelist.h frametable.h freedbclient.h freedbconfig.h freedbdialog.h generalconfig.h genres.h id3form.h importconfig.h importdialog.h importparser.h importselector.h kid3.h miscconfig.h m4afile.h mp3file.h rendirdialog.h dirlist.h taggedfile.h musicbrainzclient.h musicbrainzconfig.h musicbrainzdialog.h numbertracksdialog.h oggfile.hpp vcedit.h flacfile.hpp commandstable.h taglibfile.h importsourceconfig.h importsourcedialog.h importsourceclient.h discogsdialog.h discogsclient.h discogsconfig.h musicbrainzreleasedialog.h musicbrainzreleaseclient.h qtcompatmac.h dirinfo.h externalprocess.h stringlistedit.h tracktypedialog.h tracktypeclient.h scriptinterface.h filterconfig.h filterdialog.h filefilter.h expressionparser.h pictureframe.h formatreplacer.h httpclient.h downloaddialog.h picturelabel.h browsecoverartdialog.h configtable.h attributedata.h browserdialog.h imageviewer.h editframedialog.h editframefieldsdialog.h
# additional files in distribution
EXTRA_DIST = kid3.desktop kid3ui.rc hi16-app-kid3.png hi32-app-kid3.png hi48-app-kid3.png hisc-app-kid3.svgz de_qt.po ru_qt.po es_qt.po fr_qt.po
EXTRA_DIST = kid3.desktop kid3ui.rc hi16-app-kid3.png hi32-app-kid3.png hi48-app-kid3.png hisc-app-kid3.svgz de_qt.po ru_qt.po es_qt.po fr_qt.po it_qt.po pl_qt.po nl_qt.po et_qt.po
# generate precompiled header allsys.h.gch for GCC 3.4
pch:
......
/**
* \file browserdialog.cpp
* Help browser.
*
* \b Project: Kid3
* \author Urs Fleisch
* \date 10 Jun 2009
*
* Copyright (C) 2003-2009 Urs Fleisch
*
* This file is part of Kid3.
*
* Kid3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Kid3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "browserdialog.h"
#ifndef CONFIG_USE_KDE
#include <qtextbrowser.h>
#include <qlocale.h>
#include <qdir.h>
#include <qpushbutton.h>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <QVBoxLayout>
#else
#include <qlayout.h>
#endif
/**
* Constructor.
*
* @param parent parent widget
* @param caption dialog title
*/
BrowserDialog::BrowserDialog(QWidget* parent, QString& caption)
: QDialog(parent)
{
QCM_setWindowTitle(caption);
QVBoxLayout* vlayout = new QVBoxLayout(this);
if (!vlayout) {
return ;
}
vlayout->setSpacing(6);
vlayout->setMargin(6);
QString lang(QLocale::system().name().left(2));
QStringList docPaths;
#ifdef CFG_DOCDIR
docPaths += QString(CFG_DOCDIR) + "/kid3_" + lang + ".html";
docPaths += QString(CFG_DOCDIR) + "/kid3_en.html";
#endif
docPaths += QDir::QCM_currentPath() + "/kid3_" + lang + ".html";
docPaths += QDir::QCM_currentPath() + "/kid3_en.html";
for (QStringList::const_iterator it = docPaths.begin();
it != docPaths.end();
++it) {
m_filename = *it;
if (QFile::exists(m_filename)) break;
}
m_textBrowser = new QTextBrowser(this);
#if QT_VERSION >= 0x040000
m_textBrowser->setSource(QUrl::fromLocalFile(m_filename));
#else
m_textBrowser->setSource(m_filename);
#endif
vlayout->addWidget(m_textBrowser);
QHBoxLayout* hlayout = new QHBoxLayout;
QSpacerItem* hspacer = new QSpacerItem(16, 0, QSizePolicy::Expanding,
QSizePolicy::Minimum);
QPushButton* backButton = new QPushButton(i18n("&Back"), this);
QPushButton* forwardButton = new QPushButton(i18n("&Forward"), this);
QPushButton* closeButton = new QPushButton(i18n("&Close"), this);
if (hlayout && backButton && forwardButton && closeButton) {
hlayout->addWidget(backButton);
hlayout->addWidget(forwardButton);
hlayout->addItem(hspacer);
hlayout->addWidget(closeButton);
closeButton->setDefault(true);
backButton->setEnabled(false);
forwardButton->setEnabled(false);
connect(backButton, SIGNAL(clicked()), m_textBrowser, SLOT(backward()));
connect(forwardButton, SIGNAL(clicked()), m_textBrowser, SLOT(forward()));
connect(m_textBrowser, SIGNAL(backwardAvailable(bool)), backButton, SLOT(setEnabled(bool)));
connect(m_textBrowser, SIGNAL(forwardAvailable(bool)), forwardButton, SLOT(setEnabled(bool)));
connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()));
vlayout->addLayout(hlayout);
}
resize(500, 500);
}
/**
* Destructor.
*
* @param
*/
BrowserDialog::~BrowserDialog()
{}
/**
* Display help document at anchor.
*
* @param anchor anchor
*/
void BrowserDialog::goToAnchor(const QString& anchor)
{
#if QT_VERSION >= 0x040000
QUrl url = QUrl::fromLocalFile(m_filename);
url.setFragment(anchor);
m_textBrowser->setSource(url);
#else
if (!anchor.isEmpty()) {
m_textBrowser->setSource(m_filename + '#' + anchor);
} else {
m_textBrowser->setSource(m_filename);
}
#endif
}
#else // CONFIG_USE_KDE
BrowserDialog::BrowserDialog(QWidget*, QString&) {}
BrowserDialog::~BrowserDialog() {}
void BrowserDialog::goToAnchor(const QString&) {}
#endif // CONFIG_USE_KDE
/**
* \file browserdialog.h
* Help browser.
*
* \b Project: Kid3
* \author Urs Fleisch
* \date 10 Jun 2009
*
* Copyright (C) 2003-2009 Urs Fleisch
*
* This file is part of Kid3.
*
* Kid3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Kid3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BROWSERDIALOG_H
#define BROWSERDIALOG_H
#include "config.h"
#include <qdialog.h>
class QTextBrowser;
/**
* Help browser.
*/
class BrowserDialog : public QDialog {
Q_OBJECT
public:
/**
* Constructor.
*/
BrowserDialog(QWidget* parent, QString& caption);
/**
* Destructor.
*/
~BrowserDialog();
/**
* Show context help.
* @param anchor name of anchor
*/
void goToAnchor(const QString& anchor);
private:
QTextBrowser* m_textBrowser;
QString m_filename;
};
#endif // BROWSERDIALOG_H
/**
* \file editframedialog.cpp
* Field edit dialog.
*
* \b Project: Kid3
* \author Urs Fleisch
* \date 10 Jun 2009
*
* Copyright (C) 2003-2007 Urs Fleisch
*
* This file is part of Kid3.
*
* Kid3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Kid3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "editframedialog.h"
#include <qpushbutton.h>
#if QT_VERSION >= 0x040000
#include <QVBoxLayout>
#else
#include <qlayout.h>
#endif
/**
* Constructor.
*
* @param parent parent widget
* @param caption window title
* @param text text to edit
*/
EditFrameDialog::EditFrameDialog(QWidget* parent, const QString& caption,
const QString& text) :
QDialog(parent)
{
setModal(true);
QCM_setWindowTitle(caption);
QVBoxLayout* vlayout = new QVBoxLayout(this);
if (vlayout) {
vlayout->setSpacing(6);
vlayout->setMargin(6);
m_edit = new QTextEdit(this);
if (m_edit) {
m_edit->QCM_setPlainText(text);
#if QT_VERSION >= 0x040200
m_edit->moveCursor(QTextCursor::End);
#elif QT_VERSION >= 0x040000
QTextCursor cursor = m_edit->textCursor();
cursor.movePosition(QTextCursor::End);
m_edit->setTextCursor(cursor);
#else
m_edit->moveCursor(QTextEdit::MoveEnd, false);
#endif
vlayout->addWidget(m_edit);
}
}
QHBoxLayout* hlayout = new QHBoxLayout;
QSpacerItem* hspacer = new QSpacerItem(16, 0, QSizePolicy::Expanding,
QSizePolicy::Minimum);
m_okButton = new QPushButton(i18n("&OK"), this);
m_cancelButton = new QPushButton(i18n("&Cancel"), this);
if (hlayout && m_okButton && m_cancelButton) {
hlayout->addItem(hspacer);
hlayout->addWidget(m_okButton);
hlayout->addWidget(m_cancelButton);
m_okButton->setDefault(true);
connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
vlayout->addLayout(hlayout);
}
#if QT_VERSION >= 0x040000
setMinimumWidth(400);
#else
resize(400, -1);
#endif
}
/**
* Destructor.
*/
EditFrameDialog::~EditFrameDialog() {
}
/**
* \file editframedialog.h
* Field edit dialog.
*
* \b Project: Kid3
* \author Urs Fleisch
* \date 10 Jun 2009
*
* Copyright (C) 2003-2007 Urs Fleisch
*
* This file is part of Kid3.
*
* Kid3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Kid3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EDITFRAMEDIALOG_H
#define EDITFRAMEDIALOG_H
#include <qdialog.h>
#include <qtextedit.h>
#include "qtcompatmac.h"
class QPushButton;
/** Field edit dialog */
class EditFrameDialog : public QDialog {
Q_OBJECT
public:
/**
* Constructor.
*
* @param parent parent widget
* @param caption window title
* @param text text to edit
*/
EditFrameDialog(QWidget* parent, const QString& caption,
const QString& text);
/**
* Destructor.
*/
virtual ~EditFrameDialog();
/**
* Set text to edit.
* @param text text
*/
void setText(const QString& text) {
m_edit->QCM_setPlainText(text);
}
/**
* Get edited text.
* @return text.
*/
QString getText() const { return m_edit->QCM_toPlainText(); }
private:
QTextEdit* m_edit;
QPushButton* m_okButton;
QPushButton* m_cancelButton;
};
#endif // EDITFRAMEDIALOG_H
This diff is collapsed.
/**
* \file editframefieldsdialog.h
* Field edit dialog.
*
* \b Project: Kid3
* \author Urs Fleisch
* \date 10 Jun 2009
*
* Copyright (C) 2003-2007 Urs Fleisch
*
* This file is part of Kid3.
*
* Kid3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Kid3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EDITFRAMEFIELDSDIALOG_H
#define EDITFRAMEFIELDSDIALOG_H
#include <qdialog.h>
#include <qlabel.h>
#include "frame.h"
#if QT_VERSION >= 0x040000
#include <QList>
#else
#include <qptrlist.h>
#endif
/** Row of buttons to load, save and view binary data */
class BinaryOpenSave : public QWidget {
Q_OBJECT
public:
/**
* Constructor.
*
* @param parent parent widget
* @param field field containing binary data
*/
BinaryOpenSave(QWidget* parent, const Frame::Field& field);
/**
* Set label.
*
* @param txt label
*/
void setLabel(const QString& txt) { m_label->setText(txt); }
/**
* Check if data changed.
* @return true if data changed.
*/
bool isChanged() const { return m_isChanged; }
/**
* Get binary data.
* @return byte array.
*/
const QByteArray& getData() const { return m_byteArray; }
public slots:
/**
* Enable the "From Clipboard" button if the clipboard contains an image.
*/
void setClipButtonState();
/**
* Load image from clipboard.
*/
void clipData();
/**
* Request name of file to import binary data from.
* The data is imported later when Ok is pressed in the parent dialog.
*/
void loadData();
/**
* Request name of file and export binary data.
*/
void saveData();
/**
* Create image from binary data and display it in window.
*/
void viewData();
private:
/** Array with binary data */
QByteArray m_byteArray;
/** true if m_byteArray changed */
bool m_isChanged;
/** Label left of buttons */
QLabel* m_label;
/** From Clipboard button */
QPushButton* m_clipButton;
};
/** Base class for field controls */
class FieldControl : public QObject {
public:
/**
* Constructor.
*/
FieldControl() {}
/**
* Destructor.
*/
virtual ~FieldControl() {}
/**
* Update field from data in field control.
*/
virtual void updateTag() = 0;
/**
* Create widget to edit field data.
*
* @param parent parent widget
*
* @return widget to edit field data.
*/
virtual QWidget* createWidget(QWidget* parent) = 0;
};
/** List of field control pointers. */
#if QT_VERSION >= 0x040000
typedef QList<FieldControl*> FieldControlList;
#else
typedef QPtrList<FieldControl> FieldControlList;
#endif
/** Field edit dialog */
class EditFrameFieldsDialog : public QDialog {
Q_OBJECT
public:
/**
* Constructor.
*
* @param parent parent widget
* @param caption caption
* @param fields fields to edit
*/
EditFrameFieldsDialog(QWidget* parent, const QString& caption,
const Frame::FieldList& fields);
/**
* Destructor.
*/
virtual ~EditFrameFieldsDialog();
/**
* Update fields and get edited fields.
*
* @return field list.
*/
const Frame::FieldList& getUpdatedFieldList();
private:
Frame::FieldList m_fields;
FieldControlList m_fieldcontrols;
};
#endif // EDITFRAMEFIELDSDIALOG_H
msgid "&File"
msgstr "&Fail"
msgid "&Open..."
msgstr "&Ava..."
msgid "&Save"
msgstr "&Salvesta"