From 6ce984c59e2eea82c2790bc98ff2339350d3325c Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 3 Jan 2006 23:53:42 +0000 Subject: [PATCH] Finnish and French added, Timers screen code --- language-data.h | 1232 +++++++++++++++++++++++++-------------------- rectimer.cc | 37 +- rectimer.h | 20 +- vdr.cc | 12 +- vdr.h | 9 + vrecordinglist.cc | 2 +- vtimerlist.cc | 47 +- vtimerlist.h | 7 +- vwelcome.cc | 21 +- vwelcome.h | 1 + 10 files changed, 810 insertions(+), 578 deletions(-) diff --git a/language-data.h b/language-data.h index 23182e7..437b9f8 100644 --- a/language-data.h +++ b/language-data.h @@ -1,549 +1,683 @@ -/* - * language_data.h: Internationalization - * - * This code is taken from the VDR project and modified for VOMP. - * See the main source file 'vdr.c' for original copyright information. - * Modifications (C) 2005 D Pickles. - - This file is part of VOMP. - - VOMP is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - VOMP is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with VOMP; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* - * How to add a new language: - * - * 1. Announce your translation action on the VOMP forum - * to avoid duplicate work. - * 2. Increase the value of 'NUM_LANGUAGES' below. - * 3. Insert a new line in the 'Languages' array containing the name of your - * language IN YOUR LANGUAGE, so 'Italiano' not 'Italian' for example. - * Append your language after the last existing language - * but before the 'test' language - * 4. Insert a new line in the charSets array containing the name of the character - * set needed for your language. Note that at present only ISO8859-1 is - * supported - * 5. Insert a new line in the languageCodes array containing the 3-letter - * abbreviation(s) for your language as used in the channels.conf. - * 6. Insert a line in every member of the 'Phrases[]' array, - * containing the translated text for your language. You can use the 'test' - * language to see where the phrases appear on the screen. - * 7. If your language requires a character set other than the default iso8859-1 - * then work will be needed elsewhere in vomp to manage multiple font files. - * 8. Compile VOMP and test the new language by switching to it - * in the "Options" menu. - * 9. Send the modified files to Chris to have it included in the next version. - * - * In case an English phrase is used in more than one context (and might need - * different translations in other languages) it can be preceeded with an - * arbitrary string to describe its context, separated from the actual phrase - * by a '$' character (see for instance "Button$Stop" vs. "Stop"). - * Of course this means that no English phrase may contain the '$' character! - * If this should ever become necessary, the existing '$' would have to be - * replaced with something different... - */ - -#ifdef I18N_HEADER - -#define NUM_LANGUAGES 5 -#define DEFAULT_LANGUAGE_INDEX 0 - -#else - -// The names of the languages (English MUST be first!): -const char* const I18n::Languages[] = -{ - "English", - "Deutsch", // German by André Jagusch - "Svenska", // Swedish by Lars Fredriksson - "Magyar", // Hungarian by Pák Gergely - "Test" -}; - -// The character set needed for each language: -const char* const I18n::charSets[] = -{ - "iso8859-1", - "iso8859-1", - "iso8859-1", - "iso8859-1", - "iso8859-1" -}; - -// The 3-letter names of the language (this MUST be the third phrase!): -const char* const I18n::languageCodes[] = -{ - "eng,dos", - "deu,ger", - "sve,swe", - "hun", - "tst,xxx" -}; - -// The phrases to be translated: -const I18n::tI18nPhrase I18n::Phrases[] = -{ - // Menu titles: - { "VDR", - "VDR", - "VDR", - "VDR", - "VDR", - }, - { "Schedule", - "Programm", - "Program", - "Müsor", - "0", - }, - // Welcome screen - { "Welcome", - "Willkommen", - "Välkommen", - "Üdvözöljük", - "1", - }, - { "1. Live TV", - "1. Fernsehen", - "1. TV", - "1. TV", - "2", - }, - { "2. Radio", - "2. Radio", - "2. Radio", - "2. Rádió", - "3", - }, - { "3. Recordings", - "3. Aufnahmen", - "3. Inspelningar", - "3. Felvételek", - "4", - }, - { "4. Options", - "4. Einstellungen", - "4. Inställningar", - "4. Beállítások", - "5", - }, - { "5. Stand by", - "5. Stand-by", - "5. Stäng av", - "5. Készenlét", - "6", - }, - { "6. Reboot", - "6. Neustart", - "6. Starta om", - "6. Újraindítás", - "7", - }, - { "Downloading recordings list", - "Lade die Aufnahmen-Liste", - "Laddar lista över inspelningar", - "Felvétellista letöltése", - "8", - }, - // Recordings list - { "Recordings - %s", - "Aufnahmen - %s", - "Inspelningar - %s", - "Felvételek - %s", - "9 - %s", - }, - { "Recordings", - "Aufnahmen", - "Inspelningar", - "Felvételek", - "10", - }, - { " %lu\t%s", - " %lu\t%s", - " %lu\t%s", - " %lu\t%s", - "11 %lu\t%s", - }, - { "[ok] = menu", - "[ok] = Menü", - "[ok] = meny", - "[ok] = menü", - "12", - }, - { "%lu%% used, %iGB free", - "%lu%% belegt, %iGB frei", - "%lu% använt, %iGB ledigt", - "%lu% felhasznált, %iGB szabad", - "13 %lu%% %i", - }, - { "%i to %i of %i", // Also used in channels list - "%i bis %i (von %i)", - "%i av %i till %i", - "%i - %i (összesen %i)", - "14 %i %i %i", - }, - // Question - { "Yes", - "Ja", - "Ja", - "Igen", - "15", - }, - { "No", - "Nein", - "Nej", - "Nem", - "16", - }, - // Recording Menu - { "Programme menu", - "Programm-Menü", - "Programmeny", - "Müsor menü", - "17", - }, - { "Play", - "Wiedergeben", - "Spela upp", - "Lejátszás", - "18", - }, - { "Resume", - "Fortsetzen", - "Återuppta", - "Folytatás", - "19", - }, - { "Summary", - "Inhalt", - "Sammanfattning", - "Tartalom", - "20", - }, - { "Delete", - "Löschen", - "Ta bort", - "Törlés", - "21", - }, - { "Programme summary", - "Programminhalt", - "Programsammanfattning", - "Müsor tartalom", - "22", - }, - { "Summary unavailable", - "Inhalt nicht verfügbar", - "Ingen sammanfattning tillgänglig", - "Tartalom nem elérhetö", - "23", - }, - { "Delete recording", - "Aufnahme löschen", - "Ta bort inspelning", - "Felvétel törlése", - "24", - }, - { "Are you sure you want to delete this recording?", - "Sind Sie sich sicher, dass Sie diese Aufnahme löschen möchten?", - "Är du säker att du vill ta bort den här inspelningen", - "Biztosan törölni szeretné ezt a felvételt?", - "25", - }, - // Server select - { "Choose a VDR server", - "Wählen Sie einen VDR-Server", - "Välj VDR server", - "Válasszon egy VDR szervert", - "26", - }, - - // Option menus - { "Options", - "Einstellungen", - "Inställningar", - "Beállitások", - "27", - }, - { "TV connection type", - "TV-Anschlußart", - "Typ av TV-anslutning", - "TV csatlakozás tipusa", - "28", - }, - { "Remote control type", - "Fernbedienungstyp", - "Fjärrkontroll", - "Távirányitó tipusa", - "29", - }, - { "TV aspect ratio", - "Seitenverhältnis", - "TV-format", - "TV képformátum", - "30", - }, - { "16:9 on 4:3 display mode", - "16:9 auf 4:3-Modus", - "16:9 på 4:3-skärm", - "16:9 a 4:3-as képernyön", - "30a", - }, - { "Power state after bootup", - "Einschalten nach Neustart", - "Läge efter strömborfall", - "Bekapcsolás utáni állapot", - "31", - }, - { "Display channels", - "Kanäle anzeigen", - "Visa kanaler", - "Csatornák megjelenítése", - "32", - }, - { "Language", - "Sprache", - "Språk", - "Nyelv", - "33", - }, - { "Press back to exit, <, > or [ok] to change", - "Zum Verlassen back drücken, <, > oder [ok] zum Wechseln", - "Tryck [back] för att avsluta, eller [ok] för att ändra", - "[back] gombbal kilép, [<], [>] vagy [ok] gombbal választ", - "34", - }, - { "VDR-Pri 0=OK !See forums!", - "VDR-Pri 0=OK !Siehe Forum!", - "VDR-Prio 0=OK !Se forum!", - "VDR-Pri 0=OK !lásd. fórum!", - "34a", - }, - // Option choices - { "Old", - "Alt", - "Gammal modell", - "Régi", - "35", - }, - { "New", - "Neu", - "Ny modell", - "Új", - "36", - }, - { "RGB+composite", - "RGB+composite", - "RGB+komposit", - "RGB+composite", - "37", - }, - { "S-Video", - "S-Video", - "S-Video", - "S-Video", - "38", - }, - { "Chop sides", - "Seiten abschneiden", - "Ta bort på sidorna", - "Szélek levágva", - "39", - }, - { "Letterbox", - "Letterbox", - "Letterbox", - "Letterbox", - "40", - }, - { "Last state", - "Letzter Zustand", - "Återgå til senaste läge", - "Utolsó állapot", - "41", - }, - { "All", - "Alle", - "Alla", - "Összes", - "42", - }, - { "FTA only", - "nur FTA", - "Endast FTA", - "Csak FTA", - "43", - }, - { "On", - "An", - "På", - "Be", - "44", - }, - { "Off", - "Aus", - "Av", - "Ki", - "45", - }, - - // Channel Lists - { "Channels", - "Fernsehkanäle", - "Kanaler", - "Csatornák", - "46", - }, - { "Radio Stations", - "Radiokanäle", - "Radiostationer", - "Rádiócsatornák", - "47", - }, - // Banners - { "No channel data available", - "Keine Daten für diesen Kanal verfügbar", - "Ingen programinformation tillgänglig", - "Csatorna-adatok nem állnak rendelkezésre", - "48", - }, - { "info", - "Info", - "Info", - "Infó", - "49", - }, - { "info", - "Info", - "Info", - "Infó", - "50", - }, - { "Channel unavailable", - "Kanal nicht verfügbar", - "Kanalen är inte tillgänglig", - "A csatorna nem elérhetö", - "51", - }, - // Connect screen - { "Locating server", - "Lokalisiere Server", - "Letar efter server", - "Szerver keresése", - "52", - }, - { "Connecting to VDR", - "Verbinde zum VDR", - "Ansluter till VDR", - "Csatlakozás a VDR-hez", - "53", - }, - { "Login failed", - "Login fehlgeschlagen", - "Inloggning misslycklades", - "Bejelentkezés sikertelen", - "54", - }, - { "Connection failed", - "Verbindung fehlgeschlagen", - "Anslutning misslyckades", - "Kapcsolódás sikertelen", - "55", - }, - // Command - { "Connected, loading config", - "Verbunden, lade Einstellungen", - "Ansluten, laddar konfigurering", - "Kapcsolódva, beállitások betöltése", - "56", - }, - // EPG - { "EPG", - "EPG", - "EPG", - "EPG", - "57", - }, - { "OK", - "OK", - "OK", - "OK", - "57.5", - }, - { "Page up", - "Seite hoch", - "", - "Visszalapozás", - "58", - }, - { "Page down", - "Seite runter", - "", - "Elörelapozás", - "59", - }, - { "-24 hours", - "-24 Std.", - "", - "-24 óra", - "60", - }, - { "+24 hours", - "+24 Std.", - "", - "+24 óra", - "61", - }, - { "Go: Preview", - "Go: Vorschau", - "", - "", - "61.5", - }, - { "Guide / Back: Close", - "Back: EPG schließen", - "", - "Guide / Back: Bezárás", - "62", - }, - { "Rec: Set timer", - "Rec: Aufnahme programmieren", - "", - "Rec: Felvétel beállítása", - "63", - }, - { "Sel channel", - "Umschalten", - "", - "Csatornaválasztás", - "64", - }, - { "There are no programme details available for this period", - "Es sind keine Programminformationen für diesen Zeitraum verfügbar", - "", - "Nincs programinformáció ehhez az idöszakhoz", - "65", - }, - { "No programme details", - "Keine Programminformation", - "", - "Nincs programinformáció", - "66", - }, - // End marker. - { NULL } -}; - -#endif +/* + * language_data.h: Internationalization + * + * This code is taken from the VDR project and modified for VOMP. + * See the main source file 'vdr.c' for original copyright information. + * Modifications (C) 2005 D Pickles. + + This file is part of VOMP. + + VOMP is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* + * How to add a new language: + * + * 1. Announce your translation action on the VOMP forum + * to avoid duplicate work. + * 2. Increase the value of 'NUM_LANGUAGES' below. + * 3. Insert a new line in the 'Languages' array containing the name of your + * language IN YOUR LANGUAGE, so 'Italiano' not 'Italian' for example. + * Append your language after the last existing language + * but before the 'test' language + * 4. Insert a new line in the charSets array containing the name of the character + * set needed for your language. Note that at present only ISO8859-1 is + * supported + * 5. Insert a new line in the languageCodes array containing the 3-letter + * abbreviation(s) for your language as used in the channels.conf. + * 6. Insert a line in every member of the 'Phrases[]' array, + * containing the translated text for your language. You can use the 'test' + * language to see where the phrases appear on the screen. + * 7. If your language requires a character set other than the default iso8859-1 + * then work will be needed elsewhere in vomp to manage multiple font files. + * 8. Compile VOMP and test the new language by switching to it + * in the "Options" menu. + * 9. Send the modified files to Chris to have it included in the next version. + * + * In case an English phrase is used in more than one context (and might need + * different translations in other languages) it can be preceeded with an + * arbitrary string to describe its context, separated from the actual phrase + * by a '$' character (see for instance "Button$Stop" vs. "Stop"). + * Of course this means that no English phrase may contain the '$' character! + * If this should ever become necessary, the existing '$' would have to be + * replaced with something different... + */ + +#ifdef I18N_HEADER + +#define NUM_LANGUAGES 7 +#define DEFAULT_LANGUAGE_INDEX 0 + +#else + +// The names of the languages (English MUST be first!): +const char* const I18n::Languages[] = +{ + "English", + "Deutsch", // German by André Jagusch + "Svenska", // Swedish by Lars Fredriksson + "Magyar", // Hungarian by Pák Gergely + "Suomi", // Finnish by Kimmo Lahdensivu + "Francais", // French by jtk + "Test" +}; + +// The character set needed for each language: +const char* const I18n::charSets[] = +{ + "iso8859-1", + "iso8859-1", + "iso8859-1", + "iso8859-1", + "iso8859-1", + "iso8859-1", + "iso8859-1" +}; + +// The 3-letter names of the language (this MUST be the third phrase!): +const char* const I18n::languageCodes[] = +{ + "eng,dos", + "deu,ger", + "sve,swe", + "hun", + "fin", + "fre", + "tst,xxx" +}; + +// The phrases to be translated: +const I18n::tI18nPhrase I18n::Phrases[] = +{ + // Menu titles: + { "VDR", + "VDR", + "VDR", + "VDR", + "VDR", + "VDR", + "VDR", + }, + // Welcome screen + { "Welcome", + "Willkommen", + "Välkommen", + "Tervetuloa", + "Üdvözöljük", + "Bonjour", + "1", + }, + { "1. Live TV", + "1. Fernsehen", + "1. TV", + "1. TV", + "1. TV", + "1. TV en direct", + "2", + }, + { "2. Radio", + "2. Radio", + "2. Radio", + "2. Rádió", + "2. Radio", + "2. Radio", + "3", + }, + { "3. Recordings", + "3. Aufnahmen", + "3. Inspelningar", + "3. Felvételek", + "3. Tallenteet", + "3. Enregistrements", + "4", + }, + { "4. Timers", + "", + "", + "", + "", + "", + "5", + }, + { "5. Options", + "5. Einstellungen", + "5. Inställningar", + "5. Beállítások", + "5. Asetukset", + "5. Options", + "6", + }, + { "6. Reboot", + "6. Neustart", + "6. Starta om", + "6. Újraindítás", + "6. Uudelleenkäynnistys", + "6. Redemarrer", + "7", + }, + { "Downloading recordings list", + "Lade die Aufnahmen-Liste", + "Laddar lista över inspelningar", + "Felvétellista letöltése", + "Ladataan tallennelistaa", + "Recuperer liste enregistrements", + "8", + }, + // Recordings list + { "Recordings - %s", + "Aufnahmen - %s", + "Inspelningar - %s", + "Felvételek - %s", + "Tallenteet - %s", + "Enregistrements - %s", + "9 - %s", + }, + { "Recordings", + "Aufnahmen", + "Inspelningar", + "Felvételek", + "Tallenteet", + "Enregistrements", + "10", + }, + { " %lu\t%s", + " %lu\t%s", + " %lu\t%s", + " %lu\t%s", + " %lu\t%s", + " %lu\t%s", + "11 %lu\t%s", + }, + { "[ok] = menu", + "[ok] = Menü", + "[ok] = meny", + "[ok] = menü", + "[ok] = menu", + "[ok] = valikko", + "12", + }, + { "%lu%% used, %iGB free", + "%lu%% belegt, %iGB frei", + "%lu%% använt, %iGB ledigt", + "%lu%% felhasznált, %iGB szabad", + "%lu%% käytetty, %iGt vapaana", + "%lu%% utilise, %iGB libre", + "13 %lu%% %i", + }, + { "%i to %i of %i", // Also used in channels list + "%i bis %i (von %i)", + "%i av %i till %i", + "%i - %i (összesen %i)", + "%i - %i (yhteensä %i)", + "%i de %i a %i", + "14 %i %i %i", + }, + // Question + { "Yes", + "Ja", + "Ja", + "Igen", + "Kyllä", + "Oui", + "15", + }, + { "No", + "Nein", + "Nej", + "Nem", + "Ei", + "Non", + "16", + }, + // Recording Menu + { "Programme menu", + "Programm-Menü", + "Programmeny", + "Müsor menü", + "Ohjelmavalikko", + "Menu Programation", + "17", + }, + { "Play", + "Wiedergeben", + "Spela upp", + "Lejátszás", + "Näytä", + "Jouer", + "18", + }, + { "Resume", + "Fortsetzen", + "Återuppta", + "Folytatás", + "Jatka", + "Reprendre", + "19", + }, + { "Summary", + "Inhalt", + "Sammanfattning", + "Tartalom", + "Yhteenveto", + "Resume", + "20", + }, + { "Delete", + "Löschen", + "Ta bort", + "Törlés", + "Poista", + "Supprimer", + "21", + }, + { "Programme summary", + "Programminhalt", + "Programsammanfattning", + "Müsor tartalom", + "Ohjelmayhteenveto", + "Sommaire programmes", + "22", + }, + { "Summary unavailable", + "Inhalt nicht verfügbar", + "Ingen sammanfattning tillgänglig", + "Tartalom nem elérhetö", + "Yhteenvetoa ei saatavissa", + "Sommaire indisponible", + "23", + }, + { "Delete recording", + "Aufnahme löschen", + "Ta bort inspelning", + "Felvétel törlése", + "Poista tallenne", + "Effacer enregistrement", + "24", + }, + { "Are you sure you want to delete this recording?", + "Sind Sie sich sicher, dass Sie diese Aufnahme löschen möchten?", + "Är du säker att du vill ta bort den här inspelningen", + "Biztosan törölni szeretné ezt a felvételt?", + "Oletko varma, että haluat poistaa tämän tallenteen?", + "Etes-vous sur de vouloir supprimer cet enregistrement?", + "25", + }, + // Server select + { "Choose a VDR server", + "Wählen Sie einen VDR-Server", + "Välj VDR server", + "Válasszon egy VDR szervert", + "Valitse VDR-palvelin", + "Choisir une serveur VDR", + "26", + }, + + // Option menus + { "Options", + "Einstellungen", + "Inställningar", + "Beállitások", + "Asetukset", + "Options", + "27", + }, + { "TV connection type", + "TV-Anschlußart", + "Typ av TV-anslutning", + "TV csatlakozás tipusa", + "TV-liityntä", + "Type de connection TV", + "28", + }, + { "Remote control type", + "Fernbedienungstyp", + "Fjärrkontroll", + "Távirányitó tipusa", + "Kauko-ohjaimen tyyppi", + "Type telecommande", + "29", + }, + { "TV aspect ratio", + "Seitenverhältnis", + "TV-format", + "TV képformátum", + "Kuvasuhde", + "Rapport TV", + "30", + }, + { "16:9 on 4:3 display mode", + "16:9 auf 4:3-Modus", + "16:9 på 4:3-skärm", + "16:9 a 4:3-as képernyön", + "16:9 kuvasuhde 4:3 TV:ssä", + "16:9 sur affichage 4:3", + "30a", + }, + { "Power state after bootup", + "Einschalten nach Neustart", + "Läge efter strömborfall", + "Bekapcsolás utáni állapot", + "Tila käynnistyksen jälkeen", + "Marche apres demarrage", + "31", + }, + { "Display channels", + "Kanäle anzeigen", + "Visa kanaler", + "Csatornák megjelenítése", + "Näytä kanavat", + "Afficher chaines", + "32", + }, + { "Language", + "Sprache", + "Språk", + "Nyelv", + "Kieli", + "Langue", + "33", + }, + { "Press back to exit, <, > or [ok] to change", + "Zum Verlassen back drücken, <, > oder [ok] zum Wechseln", + "Tryck [back] för att avsluta, eller [ok] för att ändra", + "[back] gombbal kilép, [<], [>] vagy [ok] gombbal választ", + "Paina [back] poistuaksesi, <, > tao [ok] muuttaaksesi", + "Appuyer retour pour sortir <, > ou [ok] pour valider", + "34", + }, + { "VDR-Pri 0=OK !See forums!", + "VDR-Pri 0=OK !Siehe Forum!", + "VDR-Prio 0=OK !Se forum!", + "VDR-Pri 0=OK !lásd. fórum!", + "VDR-Pri 0=OK !Lue forumit!", + "VDR-Pri 0=OK !Voir forums!", + "34a", + }, + // Option choices + { "Old", + "Alt", + "Gammal modell", + "Régi", + "Vanha", + "Vieux", + "35", + }, + { "New", + "Neu", + "Ny modell", + "Új", + "Uusi", + "Nouveau", + "36", + }, + { "RGB+composite", + "RGB+composite", + "RGB+komposit", + "RGB+composite", + "RGB+komposiitti", + "RGB+composite", + "37", + }, + { "S-Video", + "S-Video", + "S-Video", + "S-Video", + "S-Video", + "S-Video", + "38", + }, + { "Chop sides", + "Seiten abschneiden", + "Ta bort på sidorna", + "Szélek levágva", + "Leikkaa sivut", + "Couper bords", + "39", + }, + { "Letterbox", + "Letterbox", + "Letterbox", + "Letterbox", + "Letterbox", + "Letterbox", + "40", + }, + { "Last state", + "Letzter Zustand", + "Återgå til senaste läge", + "Utolsó állapot", + "Edellinen tila", + "Etat precedent", + "41", + }, + { "All", + "Alle", + "Alla", + "Összes", + "Kaikki", + "Tout", + "42", + }, + { "FTA only", + "nur FTA", + "Endast FTA", + "Csak FTA", + "Vain FTA", + "FTA seulement", + "43", + }, + { "On", + "An", + "På", + "Be", + "Päällä", + "On", + "44", + }, + { "Off", + "Aus", + "Av", + "Ki", + "Poissa", + "Off", + "45", + }, + + // Channel Lists + { "Channels", + "Fernsehkanäle", + "Kanaler", + "Csatornák", + "Kanavat", + "Chaines", + "46", + }, + { "Radio Stations", + "Radiokanäle", + "Radiostationer", + "Rádiócsatornák", + "Radiokanavat", + "Stations Radio", + "47", + }, + // Banners + { "No channel data available", + "Keine Daten für diesen Kanal verfügbar", + "Ingen programinformation tillgänglig", + "Csatorna-adatok nem állnak rendelkezésre", + "Kanavatietoa ei saatavilla", + "Pas de chaines disponibles", + "48", + }, + { "info", + "Info", + "Info", + "Infó", + "Info", + "Info", + "49", + }, + { "Channel unavailable", + "Kanal nicht verfügbar", + "Kanalen är inte tillgänglig", + "A csatorna nem elérhetö", + "Kanava ei saatavilla", + "Chaine indisponible", + "51", + }, + // Connect screen + { "Locating server", + "Lokalisiere Server", + "Letar efter server", + "Szerver keresése", + "Etsitään palvelinta", + "Recherche serveur", + "52", + }, + { "Connecting to VDR", + "Verbinde zum VDR", + "Ansluter till VDR", + "Csatlakozás a VDR-hez", + "Yhdistetään VDR:ään", + "Connection au VDR", + "53", + }, + { "Login failed", + "Login fehlgeschlagen", + "Inloggning misslycklades", + "Bejelentkezés sikertelen", + "Sisäänkirjautuminen epäonnistui", + "Echec de login", + "54", + }, + { "Connection failed", + "Verbindung fehlgeschlagen", + "Anslutning misslyckades", + "Kapcsolódás sikertelen", + "Yhteys epäonnistui", + "Echec de connection", + "55", + }, + // Command + { "Connected, loading config", + "Verbunden, lade Einstellungen", + "Ansluten, laddar konfigurering", + "Kapcsolódva, beállitások betöltése", + "Yhdistetty, ladataan konfiguraatiota", + "Connecte, chargement configuration", + "56", + }, + // EPG + { "EPG", + "EPG", + "EPG", + "EPG", + "EPG", + "EPG", + "57", + }, + { "OK", + "OK", + "OK", + "OK", + "OK", + "OK", + "57.5", + }, + { "Page up", + "Seite hoch", + "Föregående sida", + "Visszalapozás", + "Seuraava sivu", + "Haut de page", + "58", + }, + { "Page down", + "Seite runter", + "Nästa sida", + "Elörelapozás", + "Edellinen sivu", + "Bas de page", + "59", + }, + { "-24 hours", + "-24 Std.", + "-24 timmar", + "-24 óra", + "-24 tuntia", + "-24 heures", + "60", + }, + { "+24 hours", + "+24 Std.", + "+24 timmar", + "+24 óra", + "+24 tuntia", + "+24 heures", + "61", + }, + { "Go: Preview", + "Go: Vorschau", + "Go: Visa", + "", + "Go: Esikatselu", + "Go: apercu", + "61.5", + }, + { "Guide / Back: Close", + "Back: EPG schließen", + "Guide / Back: Stäng", + "Guide / Back: Bezárás", + "Guide / Back: Sulje", + "Guide / Back: Fermer", + "62", + }, + { "Rec: Set timer", + "Rec: Aufnahme programmieren", + "Rec: Programmera timer", + "Rec: Felvétel beállítása", + "Rec: Aseta ajastus", + "Rec: Definir heure", + "63", + }, + { "Sel channel", + "Umschalten", + "Välj kanal", + "Csatornaválasztás", + "Valitse kanava", + "Selection chaine", + "64", + }, + { "There are no programme details available for this period", + "Es sind keine Programminformationen für diesen Zeitraum verfügbar", + "Det finns ingen programinforamtion för denna period", + "Nincs programinformáció ehhez az idöszakhoz", + "Tälle ajanjaksolle ei saatavilla ohjelmatietoja", + "Aucune information sur le programme pour cette periode", + "65", + }, + { "No programme details", + "Keine Programminformation", + "Ingen programinformation tillgänglig", + "Nincs programinformáció", + "Ei ohjelmatietoja", + "Pas de detail du programme", + "66", + }, + // End marker. + { NULL } +}; + +#endif diff --git a/rectimer.cc b/rectimer.cc index 9211fd7..d6742c0 100644 --- a/rectimer.cc +++ b/rectimer.cc @@ -35,10 +35,45 @@ RecTimer::RecTimer() summary = NULL; index = -1; + directory = NULL; + name = NULL; } RecTimer::~RecTimer() { - if (file) delete[] file; if (summary) delete[] summary; + if (file) delete[] file; + if (directory) delete[] directory; + if (name) delete[] name; +} + +bool RecTimer::operator< (const RecTimer& op2) +{ + return startTime < op2.startTime; +} + +void RecTimer::setFile(const char* tFile) +{ + file = new char[strlen(tFile)+1]; + strcpy(file, tFile); + + + char* sub = strstr(file, "~"); + + if (sub) // Its in a dir + { + directory = new char[sub - file + 1]; + memcpy(directory, file, sub - file); + directory[sub - file] = '\0'; + + sub++; + int sublen = strlen(sub); + name = new char[sublen + 1]; + strcpy(name, sub); + } + else + { + name = new char[strlen(file)+1]; + strcpy(name, file); + } } diff --git a/rectimer.h b/rectimer.h index 55a8944..42ba46f 100644 --- a/rectimer.h +++ b/rectimer.h @@ -22,6 +22,7 @@ #define RECTIMER_H #include +#include #include "defines.h" @@ -30,6 +31,11 @@ class RecTimer public: RecTimer(); ~RecTimer(); + void setFile(const char* tFile); + + const char* getFile() { return file; } + const char* getDirectory() { return directory; } + const char* getName() { return name; } ULONG active; ULONG recording; @@ -40,11 +46,21 @@ class RecTimer ULONG startTime; ULONG stopTime; - char* file; char* summary; - int index; + + bool operator< (const RecTimer& op2); + + private: + char* file; + char* directory; + char* name; }; #endif + + +// File = orig VDR info = filename +// Directory = Base Dir +// Name = Prog name \ No newline at end of file diff --git a/vdr.cc b/vdr.cc index 9eb4106..4f27a46 100644 --- a/vdr.cc +++ b/vdr.cc @@ -828,6 +828,7 @@ RecTimerList* VDR::getRecTimersList() RecTimerList* recTimerList = new RecTimerList(); RecTimer* newRecTimer; + char* tempString; while (packetPos < packetLength) { @@ -841,17 +842,24 @@ RecTimerList* VDR::getRecTimersList() newRecTimer->startTime = extractULONG(); newRecTimer->stopTime = extractULONG(); - newRecTimer->file = extractString(); + tempString = extractString(); + newRecTimer->setFile(tempString); + delete[] tempString; + newRecTimer->summary = extractString(); recTimerList->push_back(newRecTimer); Log::getInstance()->log("VDR", Log::DEBUG, "TL: %lu %lu %lu %lu %lu %lu %lu %lu %s", newRecTimer->active, newRecTimer->recording, newRecTimer->pending, newRecTimer->priority, newRecTimer->lifeTime, - newRecTimer->channelNumber, newRecTimer->startTime, newRecTimer->stopTime, newRecTimer->file); + newRecTimer->channelNumber, newRecTimer->startTime, newRecTimer->stopTime, newRecTimer->getFile()); } freePacket(); pthread_mutex_unlock(&mutex); + // Sort the list + + sort(recTimerList->begin(), recTimerList->end(), RecTimerSorter()); + return recTimerList; } diff --git a/vdr.h b/vdr.h index 21c4b8e..bf3fec5 100644 --- a/vdr.h +++ b/vdr.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "defines.h" #include "log.h" @@ -44,6 +45,14 @@ typedef vector EventList; typedef vector ChannelList; typedef vector RecTimerList; +struct RecTimerSorter // : public binary_function +{ + bool operator() (const RecTimer* a, const RecTimer* b) + { + return a->startTime < b->startTime; + } +}; + class VDR { diff --git a/vrecordinglist.cc b/vrecordinglist.cc index 452876a..bd1575e 100644 --- a/vrecordinglist.cc +++ b/vrecordinglist.cc @@ -168,7 +168,7 @@ void VRecordingList::draw() w.setSurfaceOffset(150, 385); w.draw(); - drawTextRJ("[ok] = menu", 560, 385, Colour::LIGHTTEXT); + drawTextRJ(tr("[ok] = menu"), 560, 385, Colour::LIGHTTEXT); // All static stuff done diff --git a/vtimerlist.cc b/vtimerlist.cc index 2798bd7..ad4b2f3 100644 --- a/vtimerlist.cc +++ b/vtimerlist.cc @@ -24,6 +24,11 @@ VTimerList::VTimerList(RecTimerList* trtl) { recTimerList = trtl; + clockRegion.x = 420; + clockRegion.y = 0; + clockRegion.w = 150; + clockRegion.h = 30; + create(570, 420); if (Video::getInstance()->getFormat() == Video::PAL) { @@ -63,10 +68,13 @@ VTimerList::~VTimerList() void VTimerList::drawData() { - char str[500]; + char strA[300]; + char strB[300]; + + struct tm* btime; sl.addColumn(0); - sl.addColumn(60); + sl.addColumn(110); RecTimer* recTimer; int first = 1; @@ -74,12 +82,29 @@ void VTimerList::drawData() for (UINT i = 0; i < recTimerList->size(); i++) { recTimer = (*recTimerList)[i]; - sprintf(str, "%u\t%s", i, recTimer->file); - recTimer->index = sl.addOption(str, first); + btime = localtime((time_t*)&recTimer->startTime); + strftime(strA, 299, "%d/%m %H:%M ", btime); + snprintf(strB, 299, "%s\t%s", strA, recTimer->getName()); + recTimer->index = sl.addOption(strB, first); first = 0; } } +void VTimerList::drawClock() +{ + // Blank the area first + rectangle(area.w - 150, 0, 150, 30, titleBarColour); + + char timeString[20]; + time_t t; + time(&t); + struct tm* tms = localtime(&t); + strftime(timeString, 19, "%d/%m %H:%M:%S", tms); + drawTextRJ(timeString, 560, 5, Colour::LIGHTTEXT); + + Timers::getInstance()->setTimer(this, 1, t + 1); +} + void VTimerList::draw() { View::draw(); @@ -106,11 +131,10 @@ void VTimerList::draw() w.setSurfaceOffset(115, 385); w.draw(); -// w.nextSymbol = WSymbol::PLAY; -// w.setSurfaceOffset(150, 385); -// w.draw(); + drawTextRJ("[ok] = edit", 560, 385, Colour::LIGHTTEXT); doShowingBar(); + drawClock(); } void VTimerList::doShowingBar() @@ -118,13 +142,18 @@ void VTimerList::doShowingBar() int topOption = sl.getTopOption() + 1; if (sl.getNumOptions() == 0) topOption = 0; + rectangle(220, 385, 180, 25, Colour::VIEWBACKGROUND); char showing[200]; sprintf(showing, tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions()); - - rectangle(220, 385, 220+160, 385+25, Colour::VIEWBACKGROUND); drawText(showing, 220, 385, Colour::LIGHTTEXT); } +void VTimerList::timercall(int clientReference) +{ + drawClock(); + ViewMan::getInstance()->updateView(this, &clockRegion); +} + int VTimerList::handleCommand(int command) { switch(command) diff --git a/vtimerlist.h b/vtimerlist.h index 57dae9d..9aff6c3 100644 --- a/vtimerlist.h +++ b/vtimerlist.h @@ -34,8 +34,9 @@ #include "colour.h" #include "video.h" #include "i18n.h" +#include "timers.h" -class VTimerList : public View +class VTimerList : public View, public TimerReceiver { public: VTimerList(RecTimerList* rtl); @@ -43,6 +44,8 @@ class VTimerList : public View int handleCommand(int command); void draw(); + void timercall(int clientReference); + void drawClock(); private: RecTimerList* recTimerList; @@ -51,6 +54,8 @@ class VTimerList : public View void doShowingBar(); void drawData(); + + Region clockRegion; }; #endif diff --git a/vwelcome.cc b/vwelcome.cc index 65b4a17..5fa09a9 100644 --- a/vwelcome.cc +++ b/vwelcome.cc @@ -65,8 +65,8 @@ void VWelcome::setup() sl.addOption(tr("1. Live TV"), 1); sl.addOption(tr("2. Radio"), 0); sl.addOption(tr("3. Recordings"), 0); - sl.addOption(tr("4. Options"), 0); - sl.addOption(tr("5. Stand by"), 0); + sl.addOption(tr("4. Timers"), 0); + sl.addOption(tr("5. Options"), 0); sl.addOption(tr("6. Reboot"), 0); } @@ -142,15 +142,13 @@ int VWelcome::handleCommand(int command) } case Remote::FOUR: { - doOptions(); + doTimersList(); return 2; } case Remote::FIVE: { - Message* m = new Message(); // Must be done after this view deleted - m->message = Message::STANDBY; - Command::getInstance()->postMessageNoLock(m); - return 4; + doOptions(); + return 2; } case Remote::SIX: { @@ -176,15 +174,13 @@ int VWelcome::handleCommand(int command) } else if (option == 3) { - doOptions(); + doTimersList(); return 2; } else if (option == 4) { - Message* m = new Message(); // Must be done after this view deleted - m->message = Message::STANDBY; - Command::getInstance()->postMessageNoLock(m); - return 4; + doOptions(); + return 2; } else if (option == 5) { @@ -196,7 +192,6 @@ int VWelcome::handleCommand(int command) #ifdef DEV case Remote::NINE: { - doTimersList(); return 2; } #endif diff --git a/vwelcome.h b/vwelcome.h index 8192dc3..4993ba5 100644 --- a/vwelcome.h +++ b/vwelcome.h @@ -40,6 +40,7 @@ #include "video.h" #include "voptions.h" #include "i18n.h" +#include "timers.h" class VWelcome : public View, public TimerReceiver { -- 2.39.2