- adzap: make locale to announce zap back more flexible

This commit is contained in:
svenhoefer
2016-02-28 01:47:46 +01:00
parent 40840cef36
commit 193ef7b14d
3 changed files with 6 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ GENRE.TRAVEL_HOBBIES.6 Einkauf
GENRE.TRAVEL_HOBBIES.7 Garten GENRE.TRAVEL_HOBBIES.7 Garten
GENRE.UNKNOWN Unbekannt GENRE.UNKNOWN Unbekannt
adzap Werbezapper adzap Werbezapper
adzap.announce In 15 Sekunden wird umgeschaltet auf adzap.announce In %d Sekunden wird umgeschaltet auf\n%s
adzap.cancel Deaktiviert adzap.cancel Deaktiviert
adzap.disable Deaktivieren adzap.disable Deaktivieren
adzap.enable Einmalig aktivieren adzap.enable Einmalig aktivieren

View File

@@ -108,7 +108,7 @@ GENRE.TRAVEL_HOBBIES.6 advertisement/shopping
GENRE.TRAVEL_HOBBIES.7 gardening GENRE.TRAVEL_HOBBIES.7 gardening
GENRE.UNKNOWN unknown GENRE.UNKNOWN unknown
adzap AdZap adzap AdZap
adzap.announce In 15 seconds, the channel will be switched to adzap.announce In %d seconds, the channel will be switched to\n%s
adzap.cancel Timer was cancelled adzap.cancel Timer was cancelled
adzap.disable Deactivate adzap.disable Deactivate
adzap.enable Activate once adzap.enable Activate once

View File

@@ -38,7 +38,7 @@
#include <driver/screen_max.h> #include <driver/screen_max.h>
#include <system/set_threadname.h> #include <system/set_threadname.h>
#define ZAPBACK_ALERT_PERIOD 15 // seconds. Keep this in sync with the locales. #define ZAPBACK_ALERT_PERIOD 15 // seconds
static CAdZapMenu *azm = NULL; static CAdZapMenu *azm = NULL;
@@ -152,9 +152,9 @@ void CAdZapMenu::Run()
{ {
if (channelId != curChannelId) if (channelId != curChannelId)
{ {
std::string name = g_Locale->getText(LOCALE_ADZAP_ANNOUNCE); char name[1024];
name += "\n" + channelName; snprintf(name, sizeof(name)-1, g_Locale->getText(LOCALE_ADZAP_ANNOUNCE), ZAPBACK_ALERT_PERIOD, channelName.c_str());
ShowHint(LOCALE_ADZAP, name.c_str()); ShowHint(LOCALE_ADZAP, name);
} }
alerted = true; alerted = true;
zapBackTime.tv_sec += ZAPBACK_ALERT_PERIOD; zapBackTime.tv_sec += ZAPBACK_ALERT_PERIOD;