diff options
-rw-r--r-- | i18n.cpp | 37 | ||||
-rw-r--r-- | pages/schedule.ecpp | 152 |
2 files changed, 112 insertions, 77 deletions
@@ -1,21 +1,22 @@ /* These are translations of strings used in live. If you provide us with translations for one of the missing languages or stings, - please keep the following line in your file and submit your extended - version of i18n.cpp. (If you would like to submit a patch read below) + please keep the following line in your file and submit your + extended version of i18n.cpp. (If you would like to submit a patch + add more context like described below) - $Id: i18n.cpp,v 1.92 2007/06/17 22:04:58 tadi Exp $ + $Id: i18n.cpp,v 1.93 2007/06/18 19:15:59 tadi Exp $ Note to developers: How to safely integrate translations from third parties: - move your current verion to a safe name. i.E. i18n.cpp.current >$ mv i18n.cpp i18n.cpp.current - - checkout the revision of the submitted translations (see header line) + - checkout the revision of the submitted translations (see Id line) >$ cvs update -r<revision> i18n.cpp - create a patch with more than normal context (because of the quite reqular structure of this file). 20 lines of context are safe. >$ diff -Nur -U 20 i18n.cpp i18n.cpp.translated > i18n.diff - - IMPORTANT: reset your verion of the file: (clears the sticky tag created - on checkout above) + - IMPORTANT: reset your version of the file: (clears the sticky + tag created on checkout above) >$ cvs update -A i18n.cpp - restore your current version: >$ mv i18n.cpp.current i18n.cpp @@ -1329,7 +1330,7 @@ const tI18nPhrase Phrases[] = { "", // Czech }, { "Show dynamic VDR information box", // English - "Zeige eine dynamische VDR Status Box", // Deutsch + "Zeige dynamische VDR Status Box", // Deutsch "", // Slovenski "", // Italiano "", // Nederlands @@ -1372,6 +1373,28 @@ const tI18nPhrase Phrases[] = { "", // Dansk "", // Czech }, + { "No schedules available for this channel", // English + "Für diesen Kanal liegen keine EPG-Informationen vor", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, { "Search term", // English "Suchbegriff", // Deutsch "", // Slovenski diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index ef03fdf..e27ef4b 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -24,9 +24,9 @@ bool logged_in(false); cChannel* Channel; </%request> <%include>page_init.eh</%include> -<{ +<%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -}> +</%cpp> <%cpp> pageTitle = tr("Schedule"); @@ -53,8 +53,6 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") ); cSchedule const* Schedule = schedules->GetSchedule( Channel ); - if ( Schedule == 0 ) - throw HtmlError( tr("No schedules available for this channel.") ); </%cpp> <& pageelems.doc_type &> <html> @@ -68,82 +66,96 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <& pageelems.logo &> <& menu active=("schedule") component=("schedule.channel_selection")> <div class="inhalt"> +<%cpp> + if ( Schedule == 0 ) { +</%cpp> + <$ tr("No schedules available for this channel") $>. +<%cpp> + } + else { +</%cpp> <table class="listing" cellspacing="0" cellpadding="0"> -<{ - EpgEvents epgEvents; +<%cpp> + EpgEvents epgEvents; - string current_day = ""; - const cEvent* PresentEvent = Schedule->GetPresentEvent(); - time_t now = time(NULL) - ::Setup.EPGLinger * 60; - tChannelID channel_id(Channel->GetChannelID()); - int evntNr = 0; - for (const cEvent *Event = Schedule->Events()->First(); Event; Event = Schedule->Events()->Next(Event)) { - if (Event->EndTime() <= now && Event != PresentEvent) - continue; + string current_day = ""; + const cEvent* PresentEvent = Schedule->GetPresentEvent(); + time_t now = time(NULL) - ::Setup.EPGLinger * 60; + tChannelID channel_id(Channel->GetChannelID()); + int evntNr = 0; + for (const cEvent *Event = Schedule->Events()->First(); Event; Event = Schedule->Events()->Next(Event)) { + if (Event->EndTime() <= now && Event != PresentEvent) + continue; - string evntId("eventId_"); - evntId += lexical_cast<std::string, int>(++evntNr); - EpgEventPtr epgEvent(new EpgEvent(evntId, Event, Channel->Name())); - epgEvents.push_back(epgEvent); + string evntId("eventId_"); + evntId += lexical_cast<std::string, int>(++evntNr); + EpgEventPtr epgEvent(new EpgEvent(evntId, Event, Channel->Name())); + epgEvents.push_back(epgEvent); - string title(Event->Title() ? Event->Title() : ""); - string short_description(Event->ShortText() ? Event->ShortText() : ""); - string description(Event->Description() ? Event->Description() : ""); - string start(Event->StartTime() ? FormatDateTime(tr("%I:%M %p"), Event->StartTime()) : ""); - string end(Event->EndTime() ? FormatDateTime(tr("%I:%M %p"), Event->EndTime()) : ""); - string day(Event->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), Event->StartTime()) : ""); - tEventID event = Event->EventID(); - ostringstream os; - os << Event->EventID(); - string strEventID = os.str(); - bool truncated = false; - bool lastEventCurrentDay = false; - { - cEvent* NextEvent = Schedule->Events()->Next(Event); - if (!NextEvent) { - lastEventCurrentDay = true; - } - else { - string nday(NextEvent->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), NextEvent->StartTime()) : ""); - lastEventCurrentDay = (day != nday); - } - } + string title(Event->Title() ? Event->Title() : ""); + string short_description(Event->ShortText() ? Event->ShortText() : ""); + string description(Event->Description() ? Event->Description() : ""); + string start(Event->StartTime() ? FormatDateTime(tr("%I:%M %p"), Event->StartTime()) : ""); + string end(Event->EndTime() ? FormatDateTime(tr("%I:%M %p"), Event->EndTime()) : ""); + string day(Event->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), Event->StartTime()) : ""); + tEventID event = Event->EventID(); + ostringstream os; + os << Event->EventID(); + string strEventID = os.str(); + bool truncated = false; + bool lastEventCurrentDay = false; + { + cEvent* NextEvent = Schedule->Events()->Next(Event); + if (!NextEvent) { + lastEventCurrentDay = true; + } + else { + string nday(NextEvent->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), NextEvent->StartTime()) : ""); + lastEventCurrentDay = (day != nday); + } + } - if (current_day != day) { - if (current_day != "") { -}> - <tr class="spacer"> - <td colspan="5"/> - </tr> -<{ - } -}> - <tr class="head"> - <td colspan="5"><div class="boxheader"><div><div><$ day $></div></div></div></td> - </tr> -% current_day = day; -% } - <tr> - <td class="action leftcol <? lastEventCurrentDay ? "bottomrow" ?>"><& pageelems.event_timer channelid=(channel_id) eventid=(event) &></td> - <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() ) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> - <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td> - <td class="topaligned <? lastEventCurrentDay ? "bottomrow" ?>"><div class="withmargin"><$ start $> - <$ end $></div></td> - <td class="<? (Event == PresentEvent) ? "current" ?> topaligned rightcol <? lastEventCurrentDay ? "bottomrow" ?>"><div class="more withmargin" <& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + "<br />" + tr("Click to view details.")) &><& tooltip.display domId=(epgEvent->Id()) &>><span class="title"><$ title $></span><br /><span class="short"><%cpp>if (short_description.empty()) { </%cpp> <%cpp> } </%cpp><$ short_description $></span></div></td> - </tr> -% } + if (current_day != day) { + if (current_day != "") { +</%cpp> + <tr class="spacer"> + <td colspan="5"/> + </tr> +<%cpp> + } +</%cpp> + <tr class="head"> + <td colspan="5"><div class="boxheader"><div><div><$ day $></div></div></div></td> + </tr> +<%cpp> + current_day = day; + } +</%cpp> + <tr> + <td class="action leftcol <? lastEventCurrentDay ? "bottomrow" ?>"><& pageelems.event_timer channelid=(channel_id) eventid=(event) &></td> + <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() ) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> + <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td> + <td class="topaligned <? lastEventCurrentDay ? "bottomrow" ?>"><div class="withmargin"><$ start $> - <$ end $></div></td> + <td class="<? (Event == PresentEvent) ? "current" ?> topaligned rightcol <? lastEventCurrentDay ? "bottomrow" ?>"><div class="more withmargin" <& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + "<br />" + tr("Click to view details.")) &><& tooltip.display domId=(epgEvent->Id()) &>><span class="title"><$ title $></span><br /><span class="short"><%cpp>if (short_description.empty()) { </%cpp> <%cpp> } </%cpp><$ short_description $></span></div></td> + </tr> +<%cpp> + } +</%cpp> </table> </div> <div class="epg_data" style="display: none;"> -<{ - // create hidden div for the tooltip hints. - for (vector<EpgEventPtr>::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { - EpgEventPtr epg = *i; -}> +<%cpp> + // create hidden div for the tooltip hints. + for (vector<EpgEventPtr>::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { + EpgEventPtr epg = *i; +</%cpp> <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) time=(epg->StartTime(tr("%I:%M %p")) + string(" - ") + epg->EndTime(tr("%I:%M %p"))) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) elapsed=(epg->Elapsed()) &> -<{ +<%cpp> + } } -}> - </div> </body> +</%cpp> + </div> + </body> </html> <%include>page_exit.eh</%include> |