Skip to content
Browse files

Add the new strings we will use for video metadata parsing

Refs #10613
  • Loading branch information...
1 parent cb1a06c commit de9ede4a8eeaa335584ab466f29f928db51238ba @nriendeau nriendeau committed Jul 15, 2012
Showing with 13 additions and 3 deletions.
  1. +10 −3 mythtv/libs/libmythmetadata/videometadata.cpp
  2. +3 −0 mythtv/libs/libmythmetadata/videometadata.h
View
13 mythtv/libs/libmythmetadata/videometadata.cpp
@@ -1015,8 +1015,15 @@ QString VideoMetadata::FilenameToMeta(const QString &file_name, int position)
cleanFilename.replace(QRegExp("_"), " ");
cleanFilename.replace(QRegExp("\\."), " ");
- QString season_translation = QObject::tr("Season");
- QString episode_translation = QObject::tr("Episode");
+ /*: Word(s) which should be recognized as "season" when parsing a video
+ * file name. To list more than one word, separate them with a '|'.
+ */
+ QString season_translation = tr("Season", "Metadata file name parsing");
+
+ /*: Word(s) which should be recognized as "episode" when parsing a video
+ * file name. To list more than one word, separate them with a '|'.
+ */
+ QString episode_translation = tr("Episode", "Metadata file name parsing");
// Primary Regexp
QString separator = "(?:\\s?(?:-|/)?\\s?)?";
@@ -1090,7 +1097,7 @@ namespace
{
const QRegExp &getTitleTrim(bool ignore_case)
{
- static QString pattern(QObject::tr("^(The |A |An )"));
+ static QString pattern(VideoMetadata::tr("^(The |A |An )"));
static QRegExp prefixes_case(pattern, Qt::CaseSensitive);
static QRegExp prefixes_nocase(pattern, Qt::CaseInsensitive);
return ignore_case ? prefixes_nocase : prefixes_case;
View
3 mythtv/libs/libmythmetadata/videometadata.h
@@ -6,6 +6,7 @@
#include <QString>
#include <QDate>
+#include <QCoreApplication>
#include "parentalcontrols.h"
#include "mythmetaexp.h"
@@ -24,6 +25,8 @@ typedef QHash<QString,QString> MetadataMap;
class META_PUBLIC VideoMetadata
{
+ Q_DECLARE_TR_FUNCTIONS(VideoMetadata)
+
public:
typedef std::pair<int, QString> genre_entry;
typedef std::pair<int, QString> country_entry;

0 comments on commit de9ede4

Please sign in to comment.
Something went wrong with that request. Please try again.