From 6c3fae68f9c7fe0d99d8d15cd0922145bde13f84 Mon Sep 17 00:00:00 2001 From: Nicolas Riendeau Date: Thu, 1 Aug 2013 00:28:24 -0400 Subject: [PATCH] Translation context chsnges and addition of comments --- mythtv/libs/libmythtv/commbreakmap.cpp | 27 +++++++++++++++++--------- mythtv/libs/libmythtv/commbreakmap.h | 6 ++++++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/mythtv/libs/libmythtv/commbreakmap.cpp b/mythtv/libs/libmythtv/commbreakmap.cpp index c993f5479b1..f11fa133450 100644 --- a/mythtv/libs/libmythtv/commbreakmap.cpp +++ b/mythtv/libs/libmythtv/commbreakmap.cpp @@ -231,9 +231,15 @@ bool CommBreakMap::AutoCommercialSkip(uint64_t &jumpToFrame, skipTime.sprintf("%d:%02d", skipped_seconds / 60, abs(skipped_seconds) % 60); if (kCommSkipOn == autocommercialskip) - comm_msg = QObject::tr("Skip %1").arg(skipTime); + { + //: %1 is the skip time + comm_msg = tr("Skip %1").arg(skipTime); + } else - comm_msg = QObject::tr("Commercial: %1").arg(skipTime); + { + //: %1 is the skip time + comm_msg = tr("Commercial: %1").arg(skipTime); + } if (kCommSkipOn == autocommercialskip) { @@ -263,7 +269,7 @@ bool CommBreakMap::DoSkipCommercials(uint64_t &jumpToFrame, if ((skipcommercials == (0 - lastCommSkipDirection)) && ((time(NULL) - lastCommSkipTime) <= 5)) { - comm_msg = QObject::tr("Skipping Back."); + comm_msg = tr("Skipping Back."); if (lastCommSkipStart > (2.0 * video_frame_rate)) lastCommSkipStart -= (long long) (2.0 * video_frame_rate); @@ -281,7 +287,7 @@ bool CommBreakMap::DoSkipCommercials(uint64_t &jumpToFrame, if ((commBreakIter == commBreakMap.begin()) && (skipcommercials < 0)) { - comm_msg = QObject::tr("Start of program."); + comm_msg = tr("Start of program."); jumpToFrame = 0; return true; } @@ -291,7 +297,7 @@ bool CommBreakMap::DoSkipCommercials(uint64_t &jumpToFrame, ((totalFrames) && ((commBreakIter.key() + (10 * video_frame_rate)) > totalFrames)))) { - comm_msg = QObject::tr("At End, cannot Skip."); + comm_msg = tr("At End, cannot Skip."); return false; } @@ -307,7 +313,7 @@ bool CommBreakMap::DoSkipCommercials(uint64_t &jumpToFrame, { if (commBreakIter == commBreakMap.begin()) { - comm_msg = QObject::tr("Start of program."); + comm_msg = tr("Start of program."); jumpToFrame = 0; return true; } @@ -335,7 +341,7 @@ bool CommBreakMap::DoSkipCommercials(uint64_t &jumpToFrame, ((commBreakIter.key() + (10 * video_frame_rate)) > totalFrames))) { - comm_msg = QObject::tr("At End, cannot Skip."); + comm_msg = tr("At End, cannot Skip."); return false; } } @@ -352,11 +358,14 @@ bool CommBreakMap::DoSkipCommercials(uint64_t &jumpToFrame, if ((lastIgnoredManualSkip.secsTo(MythDate::current()) > 3) && (abs(skipped_seconds) >= maxskip)) { - comm_msg = QObject::tr("Too Far %1").arg(skipTime); + //: %1 is the skip time + comm_msg = tr("Too Far %1").arg(skipTime); lastIgnoredManualSkip = MythDate::current(); return false; } - comm_msg = QObject::tr("Skip %1").arg(skipTime); + + //: %1 is the skip time + comm_msg = tr("Skip %1").arg(skipTime); uint64_t jumpto = (skipcommercials > 0) ? commBreakIter.key() - (long long)(commrewindamount * video_frame_rate): diff --git a/mythtv/libs/libmythtv/commbreakmap.h b/mythtv/libs/libmythtv/commbreakmap.h index 6ab747dbed4..82898a9abe9 100644 --- a/mythtv/libs/libmythtv/commbreakmap.h +++ b/mythtv/libs/libmythtv/commbreakmap.h @@ -1,12 +1,16 @@ #ifndef BREAKMAP_H #define BREAKMAP_H +// MythTV headers #include "tv.h" #include "programtypes.h" #include "playercontext.h" +// Qt headers #include #include +#include + #include #include @@ -15,6 +19,8 @@ class NuppelVideoPlayer; class CommBreakMap { + Q_DECLARE_TR_FUNCTIONS(CommBreakMap) + public: CommBreakMap(void);