summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-01-11 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-01-11 18:00:00 +0100
commita76a03c0d815680e3e8fc52f24f60a30177d3021 (patch)
tree50c39ea8e54d1d4242f10ab636e8500505201e5b /i18n.c
parent93a94b18b540fbcb9bcdaaea9abd26cdf23d6ee6 (diff)
downloadvdr-patch-lnbsharing-a76a03c0d815680e3e8fc52f24f60a30177d3021.tar.gz
vdr-patch-lnbsharing-a76a03c0d815680e3e8fc52f24f60a30177d3021.tar.bz2
Version 1.3.1vdr-1.3.1
- Fixed a lockup in the EPG scanner when no non-primary device was available (thanks to Martin Holst for reporting this one). - Fixed a compiler warning about virtual cConfig::Load() functions (thanks to Lauri Tischler for reporting this one). - Fixed a warning about character comparison in libsi/si.c (thanks to Lauri Tischler for reporting this one). - The new parameter "Update channels" in the "Setup/DVB" menu can be used to control if and how channels will be automatically updated (see MANUAL). This has already been part of the 'autopid' patch by Andreas Schultz and has now been adopted. - Fixed a crash in case there is no DVB hardware present (thanks to Sascha Volkenandt for reporting this one). - Changed calculation of channel ids to make it work for tv stations that use the undefined NID value 0 (thanks to Teemu Rantanen for reporting this one). - Enhanced the SDT filter to handle multi part sections. - Added support for selecting preferred EPG languages (based upon a patch by Teemu Rantanen). - Fixed a 'const' in libsi/si.h (thanks to Marcel Wiesweg). - Fixed the 'su' call in 'runvdr' to make it work on systems that require the user name to appear before the command option (thanks to Robert Huitl). - Fixed testing for matching section filters in case they are turned off (thanks to Marcel Wiesweg). - In case of incomplete sections an error message is now logged only every 10 seconds. - Fixed a possible NULL pointer access in cEITScanner::Process() (thanks to Andreas Kool). - The actual transponder data is now taken from the NIT and existing channels are adjusted if necessary. If the NIT contains new transponders, they are scanned for channels during the next EPG scan. Note that only the satellite branches are tested, cable and terrestrial need to be tested by somebody who actually has such equipment.
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c177
1 files changed, 176 insertions, 1 deletions
diff --git a/i18n.c b/i18n.c
index 6a35e5a..c72ccd8 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.137 2003/12/19 13:32:10 kls Exp $
+ * $Id: i18n.c 1.140 2004/01/11 15:38:45 kls Exp $
*
* Translations provided by:
*
@@ -111,6 +111,24 @@ const tI18nPhrase Phrases[] = {
"iso8859-1",
"iso8859-1",
},
+ // The 3-letter names of the language (this MUST be the third phrase!):
+ { "eng",
+ "deu,ger",
+ "slv",
+ "ita",
+ "dut,nla",
+ "por",
+ "fra,fre",
+ "nor",
+ "fin",
+ "pol",
+ "esl,spa",
+ "ell,gre",
+ "sve,swe",
+ "ron,rum",
+ "hun",
+ "cat,cln",
+ },
// Menu titles:
{ "VDR",
"VDR",
@@ -2227,6 +2245,40 @@ const tI18nPhrase Phrases[] = {
"Idöhöz tartozó Transponder",
"Usar el temps del múltiplex",
},
+ { "Setup.EPG$Preferred languages",
+ "Bevorzugte Sprachen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "Suosikkikielet",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "Setup.EPG$Preferred language",
+ "Bevorzugte Sprache",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "Suosikkikieli",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.DVB$Primary DVB interface",
"Primäres DVB Interface",
"Primarna naprava",
@@ -2261,6 +2313,91 @@ const tI18nPhrase Phrases[] = {
"Video formátum",
"Format del vídeo",
},
+ { "Setup.DVB$Update channels",
+ "Kanäle aktualisieren",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "names only",
+ "nur Namen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "names and PIDs",
+ "Namen und PIDs",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "add new channels",
+ "neue Kanäle hinzufügen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "add new transponders",
+ "neue Transponder hinzufügen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.LNB$SLOF (MHz)",
"SLOF (MHz)",
"Frekvenca preklopa (MHz)",
@@ -3852,3 +3989,41 @@ const char * const * I18nCharSets(void)
{
return &Phrases[1][0];
}
+
+const char * I18nLanguageAbbreviation(int Index)
+{
+ return Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
+}
+
+int I18nLanguageIndex(const char Code[3])
+{
+ char s[4];
+ memcpy(s, Code, 3);
+ s[3] = 0;
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (strcasestr(Phrases[2][i], s))
+ return i;
+ }
+ //dsyslog("unknown language code: '%s'", s);
+ return -1;
+}
+
+bool I18nIsPreferredLanguage(int *PreferredLanguages, int LanguageIndex, int &OldPreference)
+{
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (PreferredLanguages[i] < 0)
+ break; // the language is not a preferred one
+ if (PreferredLanguages[i] == LanguageIndex) {
+ if (OldPreference < 0 || i < OldPreference) {
+ OldPreference = i;
+ return true;
+ }
+ break;
+ }
+ }
+ if (OldPreference < 0) {
+ OldPreference = I18nNumLanguages; // higher than the maximum possible value
+ return true; // if we don't find a preferred one, we take the first one
+ }
+ return false;
+}