From 9926360aee302e3f4851a4dc3e59d0593b122ca7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 29 May 2017 11:49:00 +0200 Subject: [PATCH] imdb: localize output Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/47d920a3e2b6ac97726c3c6521d221d25d0b3e1c Author: vanhofen Date: 2017-05-29 (Mon, 29 May 2017) Origin message was: ------------------ - imdb: localize output ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 14 ++++++++++++++ data/locale/english.locale | 14 ++++++++++++++ src/gui/epgview.cpp | 2 +- src/gui/imdb.cpp | 27 +++++++++++++-------------- src/system/locals.h | 14 ++++++++++++++ src/system/locals_intern.h | 14 ++++++++++++++ 6 files changed, 70 insertions(+), 15 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index de98b8495..18de8ed29 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -868,6 +868,20 @@ imageinfo.kernel Kernel: imageinfo.license Lizenz imageinfo.vcs Git: imageinfo.version Version: +imdb.data_actors Darsteller +imdb.data_awards Awards +imdb.data_boxoffice Einspielergebnis +imdb.data_director Regisseur +imdb.data_failed Keine Daten gefunden +imdb.data_genre Genre +imdb.data_metascore Metascore +imdb.data_production Produktion +imdb.data_rating_failed Keine Bewertung +imdb.data_released Veröffentlicht +imdb.data_title Originaltitel +imdb.data_votes Stimmen +imdb.data_website Webseite +imdb.data_writer Drehbuchautor imdb.info IMDb-Info imdb.info_save Bild speichern inetradio.name Internetradio diff --git a/data/locale/english.locale b/data/locale/english.locale index 339f7f7c9..abf7b1a31 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -868,6 +868,20 @@ imageinfo.kernel Kernel: imageinfo.license License imageinfo.vcs Git: imageinfo.version Version: +imdb.data_actors Actors +imdb.data_awards Awards +imdb.data_boxoffice Boxoffice +imdb.data_director Director +imdb.data_failed No data found +imdb.data_genre Genre +imdb.data_metascore Metascore +imdb.data_production Production +imdb.data_rating_failed No rating +imdb.data_released Released +imdb.data_title Original title +imdb.data_votes Votes +imdb.data_website Website +imdb.data_writer Screenplay author imdb.info IMDb-Info imdb.info_save save Cover inetradio.name Internetradio diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index fb8d0665c..53d39bbfb 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1668,7 +1668,7 @@ int CEpgData::showIMDb(bool splash) if (imdb_rating == "N/A") { value = "0"; - imdb_rating = "Keine Bewertung"; + imdb_rating = g_Locale->getText(LOCALE_IMDB_DATA_RATING_FAILED); } else imdb_rating += "/10"; diff --git a/src/gui/imdb.cpp b/src/gui/imdb.cpp index 28cede3f2..e3e5c726d 100644 --- a/src/gui/imdb.cpp +++ b/src/gui/imdb.cpp @@ -341,24 +341,23 @@ void CIMDB::getIMDbData(std::string& txt) { if (m["imdbID"].empty() || m["Response"] != "True") { - txt = "Keine Daten gefunden"; + txt = g_Locale->getText(LOCALE_IMDB_DATA_FAILED); return; } - //TODO: localize - txt += "Stimmen: "+m["imdbVotes"]+"\n"; - txt += "Metascore: "+m["Metascore"]+(m["Metascore"] == "N/A" ? "\n" : "/100\n"); - txt += "Original-Titel: "+m["Title"]+"\n"; - txt += "Datum: "+m["Released"]+" | "+m["Country"]+" | "+m["Runtime"]+"\n"; - txt += "Genre: "+m["Genre"]+"\n"; - txt += "Awards: "+m["Awards"]+"\n"; - txt += "Regisseur: "+m["Director"]+"\n"; - txt += "Drehbuch: "+m["Writer"]+"\n"; - txt += "Produktionsfirma: "+m["Production"]+"\n"; - txt += "Webseite: "+m["Website"]+"\n"; - txt += "Einspielergebnis: "+m["BoxOffice"]+"\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_VOTES) + ": " + m["imdbVotes"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_METASCORE) + ": " + m["Metascore"] + (m["Metascore"] == "N/A" ? "\n" : "/100\n"); + txt += g_Locale->getString(LOCALE_IMDB_DATA_TITLE) + ": " + m["Title"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_RELEASED) + ": " + m["Released"] + " | " + m["Country"] + " | " + m["Runtime"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_GENRE) + ": " + m["Genre"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_AWARDS) + ": " + m["Awards"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_DIRECTOR) + ": " + m["Director"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_WRITER) + ": " + m["Writer"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_PRODUCTION) + ": " + m["Production"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_WEBSITE) + ": " + m["Website"] + "\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_BOXOFFICE) + ": " + m["BoxOffice"] + "\n"; txt += "\n"; - txt += "Darsteller: "+m["Actors"]+"\n"; + txt += g_Locale->getString(LOCALE_IMDB_DATA_ACTORS) + ": " + m["Actors"] + "\n"; txt += "\n"; txt += m["Plot"]; } diff --git a/src/system/locals.h b/src/system/locals.h index 47f92d4c5..3bd353492 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -895,6 +895,20 @@ typedef enum LOCALE_IMAGEINFO_LICENSE, LOCALE_IMAGEINFO_VCS, LOCALE_IMAGEINFO_VERSION, + LOCALE_IMDB_DATA_ACTORS, + LOCALE_IMDB_DATA_AWARDS, + LOCALE_IMDB_DATA_BOXOFFICE, + LOCALE_IMDB_DATA_DIRECTOR, + LOCALE_IMDB_DATA_FAILED, + LOCALE_IMDB_DATA_GENRE, + LOCALE_IMDB_DATA_METASCORE, + LOCALE_IMDB_DATA_PRODUCTION, + LOCALE_IMDB_DATA_RATING_FAILED, + LOCALE_IMDB_DATA_RELEASED, + LOCALE_IMDB_DATA_TITLE, + LOCALE_IMDB_DATA_VOTES, + LOCALE_IMDB_DATA_WEBSITE, + LOCALE_IMDB_DATA_WRITER, LOCALE_IMDB_INFO, LOCALE_IMDB_INFO_SAVE, LOCALE_INETRADIO_NAME, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index e6fd5a2d9..9d791d567 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -895,6 +895,20 @@ const char * locale_real_names[] = "imageinfo.license", "imageinfo.vcs", "imageinfo.version", + "imdb.data_actors", + "imdb.data_awards", + "imdb.data_boxoffice", + "imdb.data_director", + "imdb.data_failed", + "imdb.data_genre", + "imdb.data_metascore", + "imdb.data_production", + "imdb.data_rating_failed", + "imdb.data_released", + "imdb.data_title", + "imdb.data_votes", + "imdb.data_website", + "imdb.data_writer", "imdb.info", "imdb.info_save", "inetradio.name",