Skip to content

Commit

Permalink
Translation context change and addition of a few disambiguation strings
Browse files Browse the repository at this point in the history
I'll have to revisit this call to fix a few concatenated strings.
  • Loading branch information
Nicolas Riendeau committed Jul 11, 2013
1 parent 0360465 commit 6749fee
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions mythtv/libs/libmythtv/tv_play.cpp
Expand Up @@ -98,7 +98,7 @@ using namespace std;
osd->HideWindow(WINDOW); \
ReturnOSDLock(CTX, osd); }

static const QString _Location = QObject::tr("TV Player");
static const QString _Location = TV::tr("TV Player");

const int TV::kInitFFRWSpeed = 0;
const uint TV::kInputKeysMax = 6;
Expand Down Expand Up @@ -1064,11 +1064,11 @@ TV::TV(void)
setObjectName("TV");
keyRepeatTimer.start();

sleep_times.push_back(SleepTimerInfo(QObject::tr("Off"), 0));
sleep_times.push_back(SleepTimerInfo(QObject::tr("30m"), 30*60));
sleep_times.push_back(SleepTimerInfo(QObject::tr("1h"), 60*60));
sleep_times.push_back(SleepTimerInfo(QObject::tr("1h30m"), 90*60));
sleep_times.push_back(SleepTimerInfo(QObject::tr("2h"), 120*60));
sleep_times.push_back(SleepTimerInfo(tr("Off", "Sleep timer"), 0));
sleep_times.push_back(SleepTimerInfo(tr("30m", "Sleep timer"), 30*60));
sleep_times.push_back(SleepTimerInfo(tr("1h", "Sleep timer"), 60*60));
sleep_times.push_back(SleepTimerInfo(tr("1h30m", "Sleep timer"), 90*60));
sleep_times.push_back(SleepTimerInfo(tr("2h", "Sleep timer"), 120*60));

playerLock.lockForWrite();
player.push_back(new PlayerContext(kPlayerInUseID));
Expand Down Expand Up @@ -1962,7 +1962,7 @@ void TV::ShowOSDAskAllow(PlayerContext *ctx)
{
if (conflict_count > 1)
{
message = QObject::tr(
message = tr(
"MythTV wants to record these programs in %d seconds:");
message += "\n";
}
Expand All @@ -1988,7 +1988,7 @@ void TV::ShowOSDAskAllow(PlayerContext *ctx)

if (conflict_count > 1)
{
message += QObject::tr("\"%1\" on %2").arg(title).arg(channel);
message += tr("\"%1\" on %2").arg(title).arg(channel);
message += "\n";
}
else
Expand All @@ -2001,7 +2001,7 @@ void TV::ShowOSDAskAllow(PlayerContext *ctx)
if (conflict_count > 1)
{
message += "\n";
message += QObject::tr("Do you want to:");
message += tr("Do you want to:");
}

bool all_have_later = true;
Expand Down Expand Up @@ -2153,7 +2153,7 @@ TVState TV::RemoveRecording(TVState state)
static QString tv_i18n(const QString &msg)
{
QByteArray msg_arr = msg.toLatin1();
QString msg_i18n = QObject::tr(msg_arr.constData());
QString msg_i18n = TV::tr(msg_arr.constData());
QByteArray msg_i18n_arr = msg_i18n.toLatin1();
return (msg_arr == msg_i18n_arr) ? msg_i18n : msg;
}
Expand Down Expand Up @@ -4695,17 +4695,17 @@ void TV::SetBookmark(PlayerContext *ctx, bool clear)
if (clear)
{
ctx->player->SetBookmark(true);
SetOSDMessage(ctx, QObject::tr("Bookmark Cleared"));
SetOSDMessage(ctx, tr("Bookmark Cleared"));
}
else if (IsBookmarkAllowed(ctx))
{
ctx->player->SetBookmark();
osdInfo info;
ctx->CalcPlayerSliderPosition(info);
info.text["title"] = QObject::tr("Position");
info.text["title"] = tr("Position");
UpdateOSDStatus(ctx, info, kOSDFunctionalType_Default,
kOSDTimeout_Med);
SetOSDMessage(ctx, QObject::tr("Bookmark Saved"));
SetOSDMessage(ctx, tr("Bookmark Saved"));
}
}
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
Expand Down Expand Up @@ -8980,7 +8980,7 @@ void TV::ShowOSDSleep(void)
OSD *osd = GetOSDLock(mctx);
if (osd)
{
QString message = QObject::tr(
QString message = tr(
"MythTV was set to sleep after %1 minutes and "
"will exit in %d seconds.\n"
"Do you wish to continue watching?")
Expand Down Expand Up @@ -9044,7 +9044,7 @@ void TV::ShowOSDIdle(void)
OSD *osd = GetOSDLock(mctx);
if (osd)
{
QString message = QObject::tr(
QString message = tr(
"MythTV has been idle for %1 minutes and "
"will exit in %d seconds. Are you still watching?")
.arg(db_idle_timeout * (1.0f/60000.0f));
Expand Down Expand Up @@ -10042,14 +10042,14 @@ void TV::ShowOSDCutpoint(PlayerContext *ctx, const QString &type)
return;
}
osd->DialogShow(OSD_DLG_CUTPOINT,
QObject::tr("Exit Recording Editor"));
osd->DialogAddButton(QObject::tr("Save Cuts and Exit"),
tr("Exit Recording Editor"));
osd->DialogAddButton(tr("Save Cuts and Exit"),
"DIALOG_CUTPOINT_SAVEEXIT_0");
osd->DialogAddButton(QObject::tr("Exit Without Saving"),
osd->DialogAddButton(tr("Exit Without Saving"),
"DIALOG_CUTPOINT_REVERTEXIT_0");
osd->DialogAddButton(QObject::tr("Save Cuts"),
osd->DialogAddButton(tr("Save Cuts"),
"DIALOG_CUTPOINT_SAVEMAP_0");
osd->DialogAddButton(QObject::tr("Undo Changes"),
osd->DialogAddButton(tr("Undo Changes"),
"DIALOG_CUTPOINT_REVERT_0");
osd->DialogBack("", "DIALOG_CUTPOINT_DONOTHING_0", true);
QHash<QString,QString> map;
Expand Down Expand Up @@ -10296,7 +10296,7 @@ void TV::ChannelEditXDSFill(const PlayerContext *ctx, InfoMap &infoMap) const
QMap<QString,bool> modifiable;
if (!(modifiable["callsign"] = infoMap["callsign"].isEmpty()))
{
QString unsetsign = QObject::tr("UNKNOWN%1", "Synthesized callsign");
QString unsetsign = tr("UNKNOWN%1", "Synthesized callsign");
uint unsetcmpl = unsetsign.length() - 2;
unsetsign = unsetsign.left(unsetcmpl);
if (infoMap["callsign"].left(unsetcmpl) == unsetsign) // was unsetcmpl????
Expand Down Expand Up @@ -13092,7 +13092,7 @@ void TV::ShowOSDPromptDeleteRecording(PlayerContext *ctx, QString title,
OSD *osd = GetOSDLock(ctx);
if (osd && !osd->DialogVisible())
{
QString message = QObject::tr("Cannot delete program ") +
QString message = tr("Cannot delete program ") +
QString("%1 ")
.arg(pginfo.GetTitle());

Expand All @@ -13101,11 +13101,11 @@ void TV::ShowOSDPromptDeleteRecording(PlayerContext *ctx, QString title,

if (!pginfo.IsRecording())
{
message += QObject::tr("because it is not a recording.");
message += tr("because it is not a recording.");
}
else
{
message += QObject::tr("because it is in use by");
message += tr("because it is in use by");
QStringList byWho;
pginfo.QueryIsInUse(byWho);
for (uint i = 0; i+2 < (uint)byWho.size(); i+=3)
Expand Down

0 comments on commit 6749fee

Please sign in to comment.