From d6ecaf855b97468e20fe31681b261b0f23798c1a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 2 Dec 2016 21:31:04 +0100 Subject: [PATCH] Messages: add localized osd timeout option for interactive/static messages TODO: add locales for hints --- data/locale/deutsch.locale | 4 +++- data/locale/english.locale | 2 ++ data/locale/nederlands.locale | 3 +++ data/locale/slovak.locale | 3 +++ src/gui/osd_setup.cpp | 2 +- src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/system/settings.h | 23 ++++++++++++----------- 8 files changed, 26 insertions(+), 13 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index fe07f8f8d..31f290f1b 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1433,7 +1433,8 @@ menu.hint_streaminfo Aktuelle Sender-Informationen über PIDs, SNR-Verhältnis, menu.hint_subchannel_pos Wählen Sie die Anzeigeposition der Unterkanäle aus menu.hint_sw_update System aktualisieren, Image sichern und wiederherstellen menu.hint_theme Wählen Sie ein vordefiniertes Farbschema, speichern oder laden Sie ihre eigenen Farbschemata -menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert) +menu.hint_timeouts Anzeigedauer für Menüs oder Infofenster, die sich automatisch schließen (0 deaktiviert) +menu.hint_timeouts_static_messages Anzeigedauer für bestimmte Meldungen mit Benutzerinteraktion menu.hint_timer_followscreenings Zeige Terminauswahl mit Folge-Events zur Timerprogrammierung menu.hint_timers Hinzufügen, entfernen und bearbeiten geplanter Aufnahmen oder anderer Timer menu.hint_timezone Wählen Sie ihre Zeitzone aus @@ -2407,6 +2408,7 @@ timing.infobar_radio Infobar (Radiobetrieb) timing.menu Menü timing.numericzap Umschalten mit Zifferntasten timing.popup_messages Popup Meldungen +timing.static_messages Interaktive Meldungen timing.volumebar Lautstärkeanzeige tmdb.api_key TMDb API Schlüssel tmdb.enabled TMDb-Unterstützung diff --git a/data/locale/english.locale b/data/locale/english.locale index fec3ec423..0772e7e91 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1434,6 +1434,7 @@ menu.hint_subchannel_pos Select subchannels menu position menu.hint_sw_update Update software menu.hint_theme Select pre-defined color theme\nSave or load theme from files menu.hint_timeouts Configure time to hide GUI windows\nin seconds +menu.hint_timeouts_static_messages Timeout for specific messages with user interaction menu.hint_timer_followscreenings Show selection with followscreenings for timer programming menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc. menu.hint_timezone Select your timezone @@ -2407,6 +2408,7 @@ timing.infobar_radio Infobar (radio mode) timing.menu Menu timing.numericzap Numeric Zap timing.popup_messages Popup messages +timing.static_messages Interactive messages timing.volumebar Volume bar tmdb.api_key TMDb API key tmdb.enabled TMDb support diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index 092ca0fb3..6450a1866 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -1326,6 +1326,7 @@ menu.hint_subchannel_pos Selecteer menu positie van subkanalen menu.hint_sw_update Update software menu.hint_theme Select voorgedefinieerde thema\n Opslaan of laad thema van bestand menu.hint_timeouts Verberg gebruikers interface na bepaald aantal seconden. +menu.hint_timeouts_static_messages Timeout for specific messages with user interaction menu.hint_timers Toevoegen/Verplaats/Bewerk \ngeplande opnames of timers etc. menu.hint_timezone Selecteer uw tijdzone menu.hint_tools Start tools @@ -2201,6 +2202,8 @@ timing.infobar_radio Infobalk (radio modus) timing.menu Menu timing.numericzap Numeriek Zap timing.volumebar Volume balk +timing.popup_messages Popup messages +timing.static_messages Interactive messages tmdb.read_data Zoeken TMDB data... unicable.lnb Invoer Unicable unicable.qrg Unicable Frequentie diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index c3f774481..194fb3a84 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -1433,6 +1433,7 @@ menu.hint_subchannel_pos Pozícia menu výberu sub-kanálov menu.hint_sw_update Aktualizácia software menu.hint_theme Výber prednastavených farebných vzhľadov\nUloženie alebo nahranie vzhľadu zo súborov menu.hint_timeouts Konfigurácia času zmiznutia GUI okien\nv sekundách +menu.hint_timeouts_static_messages Timeout for specific messages with user interaction menu.hint_timers Pridanie/Odstránenie/Upravenie plánovaného\nnahrávania, pripomienky atď. menu.hint_timezone Výber časového pásma menu.hint_tmdb_api_key Vložte váš TMDb API kľúč. Neuvedením údajov sa vypne podpora TMDb @@ -2402,6 +2403,8 @@ timing.infobar_radio Stavový riadok (rádio mód) timing.menu Ponuka timing.numericzap Prepínanie číslami timing.volumebar Ukazateľ hlasitosti +timing.popup_messages Popup messages +timing.static_messages Interactive messages tmdb.api_key TMDb API kľúč tmdb.enabled TMDb podpora tmdb.read_data Vyhľadávanie údajov TMDB... diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index aa2403342..aa7e0f0a3 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -1016,7 +1016,7 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout) { CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 180); ch->setNumberFormat(nf); - ch->setHint("", LOCALE_MENU_HINT_OSD_TIMING); + ch->setHint("", timing_setting[i].hint); menu_timeout->addItem(ch); } diff --git a/src/system/locals.h b/src/system/locals.h index d638c71c3..94681d367 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1461,6 +1461,7 @@ typedef enum LOCALE_MENU_HINT_SW_UPDATE, LOCALE_MENU_HINT_THEME, LOCALE_MENU_HINT_TIMEOUTS, + LOCALE_MENU_HINT_TIMEOUTS_STATIC_MESSAGES, LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS, LOCALE_MENU_HINT_TIMERS, LOCALE_MENU_HINT_TIMEZONE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index ef44b6316..46b5a0ba0 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1461,6 +1461,7 @@ const char * locale_real_names[] = "menu.hint_sw_update", "menu.hint_theme", "menu.hint_timeouts", + "menu.hint_timeouts_static_messages", "menu.hint_timer_followscreenings", "menu.hint_timers", "menu.hint_timezone", diff --git a/src/system/settings.h b/src/system/settings.h index 488bf97a2..9ae0e8049 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -863,21 +863,22 @@ typedef struct time_settings_t { const int default_timing; const neutrino_locale_t name; + const neutrino_locale_t hint; } time_settings_struct_t; const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_COUNT] = { - { 0, LOCALE_TIMING_MENU }, - { 60, LOCALE_TIMING_CHANLIST }, - { 240, LOCALE_TIMING_EPG }, - { 6, LOCALE_TIMING_INFOBAR }, - { 0, LOCALE_TIMING_INFOBAR_RADIO }, - { 6, LOCALE_TIMING_INFOBAR_MOVIEPLAYER}, - { 3, LOCALE_TIMING_VOLUMEBAR }, - { 60, LOCALE_TIMING_FILEBROWSER }, - { 3, LOCALE_TIMING_NUMERICZAP }, - { 6, LOCALE_TIMING_POPUP_MESSAGES}, - { 0, LOCALE_TIMING_STATIC_MESSAGES} + { 0, LOCALE_TIMING_MENU, LOCALE_MENU_HINT_OSD_TIMING},//TODO: add hint locales + { 60, LOCALE_TIMING_CHANLIST, LOCALE_MENU_HINT_OSD_TIMING}, + { 240, LOCALE_TIMING_EPG, LOCALE_MENU_HINT_OSD_TIMING}, + { 6, LOCALE_TIMING_INFOBAR, LOCALE_MENU_HINT_OSD_TIMING}, + { 0, LOCALE_TIMING_INFOBAR_RADIO, LOCALE_MENU_HINT_OSD_TIMING}, + { 6, LOCALE_TIMING_INFOBAR_MOVIEPLAYER, LOCALE_MENU_HINT_OSD_TIMING}, + { 3, LOCALE_TIMING_VOLUMEBAR, LOCALE_MENU_HINT_OSD_TIMING}, + { 60, LOCALE_TIMING_FILEBROWSER, LOCALE_MENU_HINT_OSD_TIMING}, + { 3, LOCALE_TIMING_NUMERICZAP, LOCALE_MENU_HINT_OSD_TIMING}, + { 6, LOCALE_TIMING_POPUP_MESSAGES, LOCALE_MENU_HINT_OSD_TIMING}, + { 60, LOCALE_TIMING_STATIC_MESSAGES, LOCALE_MENU_HINT_TIMEOUTS_STATIC_MESSAGES} }; // lcdd