Permalink
Browse files

Make translatable strings extractable and change context.

  • Loading branch information...
nriendeau committed Jul 23, 2013
1 parent 5a3b6cc commit f8226309b2f6eea0fd0e398e94902dd2ee0aefc9
@@ -9,6 +9,8 @@ SOURCES += ../libs/libmythtv/*.cpp
SOURCES += ../libs/libmythtv/*.h
SOURCES += ../libs/libmythtv/AirPlay/*.cpp
SOURCES += ../libs/libmythtv/AirPlay/*.h
SOURCES += ../libs/libmythtv/Bluray/*.cpp
SOURCES += ../libs/libmythtv/Bluray/*.h
SOURCES += ../libs/libmythtv/channelscan/*.cpp
SOURCES += ../libs/libmythtv/channelscan/*.h
SOURCES += ../libs/libmythtv/DVD/*.cpp
@@ -169,7 +169,7 @@ void BDRingBuffer::GetDescForPos(QString &desc)
{
if (!m_infoLock.tryLock())
return;
desc = QObject::tr("Title %1 chapter %2")
desc = tr("Title %1 chapter %2")
.arg(m_currentTitleInfo->idx)
.arg(m_currentTitleInfo->chapters->idx);
m_infoLock.unlock();
@@ -312,7 +312,7 @@ bool BDRingBuffer::OpenFile(const QString &lfilename, uint retry_ms)
if (!bdnav)
{
lastError = QObject::tr("Couldn't open Blu-ray device: %1").arg(filename);
lastError = tr("Couldn't open Blu-ray device: %1").arg(filename);
rwlock.unlock();
mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL);
return false;
@@ -381,7 +381,7 @@ bool BDRingBuffer::OpenFile(const QString &lfilename, uint retry_ms)
// no title, no point trying any longer
bd_close(bdnav);
bdnav = NULL;
lastError = QObject::tr("Can't find any Bluray-compatible title");
lastError = tr("Can't find any Bluray-compatible title");
rwlock.unlock();
mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL);
return false;
@@ -481,7 +481,7 @@ bool BDRingBuffer::OpenFile(const QString &lfilename, uint retry_ms)
// no title, no point trying any longer
bd_close(bdnav);
bdnav = NULL;
lastError = QObject::tr("Can't find any usable Bluray title");
lastError = tr("Can't find any usable Bluray title");
rwlock.unlock();
mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL);
return false;
@@ -3,9 +3,11 @@
#define BD_BLOCK_SIZE 6144LL
//Qt headers
#include <QString>
#include <QRect>
#include <QHash>
#include <QCoreApplication>
// external/libmythbluray
#include "bluray.h"
@@ -49,6 +51,8 @@ class BDOverlay
class MTV_PUBLIC BDRingBuffer : public RingBuffer
{
Q_DECLARE_TR_FUNCTIONS(BDRingBuffer)
public:
BDRingBuffer(const QString &lfilename);
virtual ~BDRingBuffer();
@@ -251,7 +251,7 @@ QString MythBDPlayer::GetAngleName(int angle) const
{
if (angle >= 1 && angle <= GetNumAngles())
{
QString name = QObject::tr("Angle %1").arg(angle);
QString name = tr("Angle %1").arg(angle);
return name;
}
return QString();
@@ -274,7 +274,7 @@ bool MythBDPlayer::SwitchTitle(int title)
ResetCaptions();
if (OpenFile() != 0)
{
SetErrored(QObject::tr("Failed to switch title."));
SetErrored(tr("Failed to switch title."));
}
else
{
@@ -1,10 +1,16 @@
#ifndef MYTHBDPLAYER_H
#define MYTHBDPLAYER_H
// Qt headers
#include <QCoreApplication>
// MythTV headers
#include "mythplayer.h"
class MythBDPlayer : public MythPlayer
{
Q_DECLARE_TR_FUNCTIONS(MythBDPlayer)
public:
MythBDPlayer(PlayerFlags flags = kNoFlags);
virtual bool HasReachedEof(void) const;

0 comments on commit f822630

Please sign in to comment.