diff --git a/mythplugins/mytharchive/i18n/translate.pro b/mythplugins/mytharchive/i18n/translate.pro index d53d843..cfb004a 100644 --- a/mythplugins/mytharchive/i18n/translate.pro +++ b/mythplugins/mytharchive/i18n/translate.pro @@ -1,6 +1,7 @@ SOURCES += ../mytharchive/*.cpp SOURCES += ../mytharchive/*.h SOURCES += ./themestrings.h +SOURCES += ../mythburn/themes/burnthemestrings.h TRANSLATIONS = mytharchive_de.ts mytharchive_sl.ts mytharchive_fr.ts TRANSLATIONS += mytharchive_sv.ts mytharchive_nl.ts mytharchive_nb.ts diff --git a/mythplugins/mytharchive/mytharchive/themeselector.cpp b/mythplugins/mytharchive/mytharchive/themeselector.cpp index fcb24e5..8c71eb5 100644 --- a/mythplugins/mytharchive/mytharchive/themeselector.cpp +++ b/mythplugins/mytharchive/mytharchive/themeselector.cpp @@ -9,6 +9,7 @@ #include #include #include +#include // myth #include @@ -211,10 +212,10 @@ void DVDThemeSelector::themeChanged(MythUIButtonListItem *item) if (QFile::exists(themeDir + theme_list[itemNo] + "/description.txt")) { QString desc = loadFile(themeDir + theme_list[itemNo] + "/description.txt"); - themedesc_text->SetText(desc); + themedesc_text->SetText(QCoreApplication::translate("BurnThemeUI", desc.toUtf8().constData())); } else - themedesc_text->SetText("No description found!"); + themedesc_text->SetText(tr("No theme description file found!")); } QString DVDThemeSelector::loadFile(const QString &filename) @@ -224,20 +225,28 @@ QString DVDThemeSelector::loadFile(const QString &filename) QFile file(filename); if (!file.exists()) - return ""; - - if (file.open( QIODevice::ReadOnly )) { - QTextStream stream(&file); - - while ( !stream.atEnd() ) + res = tr("No theme description file found!"); + } + else { + if (file.open(QIODevice::ReadOnly)) { - res = res + stream.readLine(); + QTextStream stream(&file); + + if (!stream.atEnd()) + { + res = stream.readAll(); + res = res.replace("\n", " ").trimmed(); + } + else { + res = tr("Empty theme description!"); + } + file.close(); + } + else { + res = tr("Unable to open theme description file!"); } - file.close(); } - else - return ""; return res; } diff --git a/mythplugins/mytharchive/mythburn/themes/burnthemestrings.h b/mythplugins/mytharchive/mythburn/themes/burnthemestrings.h new file mode 100644 index 0000000..37c46b1 --- /dev/null +++ b/mythplugins/mytharchive/mythburn/themes/burnthemestrings.h @@ -0,0 +1,14 @@ +// This is an automatically generated file +// Do not edit + +void strings_null() { + BurnThemeUI::tr("Has an intro and contains a main menu with 4 recordings per page. Does not have a chapter selection submenu."); + BurnThemeUI::tr("Has an intro and contains a summary main menu with 10 recordings per page. Does not have a chapter selection submenu, recording titles, dates or category."); + BurnThemeUI::tr("Has an intro and contains a main menu with 6 recordings per page. Does not have a scene selection submenu."); + BurnThemeUI::tr("Has an intro and contains a main menu with 3 recordings per page and a scene selection submenu with 8 chapters points. Shows a program details page before each recording."); + BurnThemeUI::tr("Has an intro and contains a main menu with 3 recordings per page and a scene selection submenu with 8 chapters points. Shows a program details page before each recording. Uses animated thumb images."); + BurnThemeUI::tr("Has an intro and contains a main menu with 3 recordings per page and a scene selection submenu with 8 chapters points."); + BurnThemeUI::tr("Has an intro and contains a main menu with 3 recordings per page and a scene selection submenu with 8 chapters points. All the thumb images are animated."); + BurnThemeUI::tr("Creates an auto play DVD with no menus. Shows an intro movie then for each title shows a details page followed by the video in sequence."); + BurnThemeUI::tr("Creates an auto play DVD with no menus and no intro."); +}