Skip to content

Commit

Permalink
Make additional text strings translatable.
Browse files Browse the repository at this point in the history
This makes additional strings translatable. They were displayed by the application
but were not translatable.

Thanks goes to Gilles for reporting some of them!
  • Loading branch information
Nicolas Riendeau committed Mar 19, 2012
1 parent 8a5977d commit 2005a52
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 23 deletions.
2 changes: 2 additions & 0 deletions mythplugins/mythmusic/i18n/translate.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
SOURCES += ../mythmusic/*.cpp
SOURCES += ../mythmusic/*.h
SOURCES += ../mythmusic/goom/*.cpp
SOURCES += ../mythmusic/goom/*.h
SOURCES += ./themestrings.h

TRANSLATIONS = mythmusic_it.ts mythmusic_es.ts mythmusic_ca.ts
Expand Down
4 changes: 3 additions & 1 deletion mythplugins/mythmusic/mythmusic/bumpscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <iostream>
using namespace std;

#include <QCoreApplication>
#include <QPainter>

BumpScope::BumpScope() :
Expand Down Expand Up @@ -560,7 +561,8 @@ static class BumpScopeFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("BumpScope");
static QString name = QCoreApplication::translate("Visualizers",
"BumpScope");
return name;
}

Expand Down
4 changes: 3 additions & 1 deletion mythplugins/mythmusic/mythmusic/goom/mythgoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <iostream>
using namespace std;

#include <QCoreApplication>
#include <QPainter>

#include <compat.h>
Expand Down Expand Up @@ -107,7 +108,8 @@ static class GoomFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("Goom");
static QString name = QCoreApplication::translate("Visualizers",
"Goom");
return name;
}

Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mythmusic/mythmusic/musiccommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ void MusicCommon::customEvent(QEvent *event)

LOG(VB_GENERAL, LOG_ERR, QString("%1 %2").arg(statusString)
.arg(*aoe->errorMessage()));
ShowOkPopup(QString("MythMusic has encountered the following error:\n%1")
ShowOkPopup(QString(tr("MythMusic has encountered the following error:\n%1"))
.arg(*aoe->errorMessage()));
stopAll();
}
Expand Down Expand Up @@ -1169,7 +1169,7 @@ void MusicCommon::customEvent(QEvent *event)
LOG(VB_GENERAL, LOG_ERR, QString("%1 %2").arg(statusString)
.arg(*dxe->errorMessage()));

ShowOkPopup(QString("MythMusic has encountered the following error:\n%1")
ShowOkPopup(QString(tr("MythMusic has encountered the following error:\n%1"))
.arg(*dxe->errorMessage()));
}
else if (event->type() == DialogCompletionEvent::kEventType)
Expand Down Expand Up @@ -1885,7 +1885,7 @@ void MusicCommon::updatePlaylistStats(void)
QString playlistcurrent = QLocale::system().toString(m_currentTrack + 1);
QString playlisttotal = QLocale::system().toString(trackCount);

map["playlistposition"] = QString("%1 of %2").arg(playlistcurrent)
map["playlistposition"] = QString(tr("%1 of %2")).arg(playlistcurrent)
.arg(playlisttotal);
map["playlistcurrent"] = playlistcurrent;
map["playlistcount"] = playlisttotal;
Expand Down
4 changes: 3 additions & 1 deletion mythplugins/mythmusic/mythmusic/synaesthesia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using namespace std;

// Qt
#include <QCoreApplication>
#include <QPainter>
#include <QImage>

Expand Down Expand Up @@ -646,7 +647,8 @@ static class SynaesthesiaFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("Synaesthesia");
static QString name = QCoreApplication::translate("Visualizers",
"Synaesthesia");
return name;
}

Expand Down
22 changes: 15 additions & 7 deletions mythplugins/mythmusic/mythmusic/visualize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using namespace std;

// Qt
#include <QCoreApplication>
#include <QPainter>
#include <QImage>

Expand Down Expand Up @@ -531,7 +532,8 @@ static class StereoScopeFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("StereoScope");
static QString name = QCoreApplication::translate("Visualizers",
"StereoScope");
return name;
}

Expand All @@ -558,7 +560,8 @@ static class MonoScopeFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("MonoScope");
static QString name = QCoreApplication::translate("Visualizers",
"MonoScope");
return name;
}

Expand Down Expand Up @@ -804,7 +807,8 @@ static class SpectrumFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("Spectrum");
static QString name = QCoreApplication::translate("Visualizers",
"Spectrum");
return name;
}

Expand Down Expand Up @@ -897,7 +901,8 @@ static class SquaresFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("Squares");
static QString name = QCoreApplication::translate("Visualizers",
"Squares");
return name;
}

Expand Down Expand Up @@ -1368,7 +1373,8 @@ static class PianoFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("Piano");
static QString name = QCoreApplication::translate("Visualizers",
"Piano");
return name;
}

Expand Down Expand Up @@ -1553,7 +1559,8 @@ static class AlbumArtFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("AlbumArt");
static QString name = QCoreApplication::translate("Visualizers",
"AlbumArt");
return name;
}

Expand Down Expand Up @@ -1605,7 +1612,8 @@ static class BlankFactory : public VisFactory
public:
const QString &name(void) const
{
static QString name("Blank");
static QString name = QCoreApplication::translate("Visualizers",
"Blank");
return name;
}

Expand Down
21 changes: 11 additions & 10 deletions mythtv/programs/mythfrontend/scheduleeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,8 @@ void MetadataOptions::Load()
{
if (m_recordingRule->m_inetref.isEmpty())
{
CreateBusyDialog("Trying to automatically find this "
"recording online...");
CreateBusyDialog(tr("Trying to automatically find this "
"recording online..."));

m_metadataFactory->Lookup(m_recordingRule, false, false, true);
}
Expand Down Expand Up @@ -1450,8 +1450,8 @@ void MetadataOptions::PerformQuery()
{
m_lookup = new MetadataLookup();

CreateBusyDialog("Trying to manually find this "
"recording online...");
CreateBusyDialog(tr("Trying to manually find this "
"recording online..."));

m_lookup->SetStep(kLookupSearch);
m_lookup->SetType(kMetadataRecording);
Expand Down Expand Up @@ -1872,9 +1872,9 @@ void MetadataOptions::customEvent(QEvent *levent)
delete lookup;
lookup = NULL;

QString title = "No match found for this recording. You can "
"try entering a TVDB/TMDB number, season, and "
"episode manually.";
QString title = tr("No match found for this recording. You can "
"try entering a TVDB/TMDB number, season, and "
"episode manually.");

MythConfirmationDialog *okPopup =
new MythConfirmationDialog(m_popupStack, title, false);
Expand Down Expand Up @@ -1918,9 +1918,10 @@ void MetadataOptions::customEvent(QEvent *levent)
{
MetadataLookup *lookup = lul.takeFirst();

QString title = "This number, season, and episode combination "
"does not appear to be valid (or the site may "
"be down). Check your information and try again.";
QString title = tr("This number, season, and episode combination "
"does not appear to be valid (or the site may "
"be down). Check your information and try "
"again.");

MythConfirmationDialog *okPopup =
new MythConfirmationDialog(m_popupStack, title, false);
Expand Down

0 comments on commit 2005a52

Please sign in to comment.