summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-01-25 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-01-25 18:00:00 +0100
commit7c5ef5dbbada89f55aa15a7c5ac653f4390ce9b4 (patch)
tree0dfd35efdd6ed9302198936c7d0a265b47585b39 /i18n.c
parentb8e837dbbbaa8a91c4dc257fde5c0131bedeb23e (diff)
downloadvdr-patch-lnbsharing-7c5ef5dbbada89f55aa15a7c5ac653f4390ce9b4.tar.gz
vdr-patch-lnbsharing-7c5ef5dbbada89f55aa15a7c5ac653f4390ce9b4.tar.bz2
Version 1.3.3vdr-1.3.3
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg). - Added ISO639LanguageDescriptor to 'libsi'. - Changed the 'languageCode' members in the descriptor classes of 'libsi' to 'char[4]' and setting the 4th byte to 0 for easier handling. - Fixed frequency handling when setting the CA descriptors in cDvbTuner::Action() (thanks to Jan Ekholm for reporting and helping to debug this one). - Now setting CA descriptors even if "Setup/DVB/Update channels" is less than 2. - There can now be up to 32 audio and Dolby PIDs (however, currently still only the first two are used throughout the rest of the program). - The audio and Dolby PIDs in 'channels.conf' now can have an optional language code (see man vdr(5)). Currently this is only stored and not yet used otherwise. - Added a call to cStatus::MsgOsdCurrentItem() to cMenuEditItem::SetValue() (thanks to Martin Hammerschmid).
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/i18n.c b/i18n.c
index a92630e..f87827b 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.143 2004/01/17 14:39:38 kls Exp $
+ * $Id: i18n.c 1.146 2004/01/25 14:41:02 kls Exp $
*
* Translations provided by:
*
@@ -827,7 +827,7 @@ const tI18nPhrase Phrases[] = {
"",//TODO
"",//TODO
"",//TODO
- "",//TODO
+ "Päivitä",
"",//TODO
"",//TODO
"",//TODO
@@ -4233,24 +4233,27 @@ const char * const * I18nCharSets(void)
return &Phrases[1][0];
}
-const char * I18nLanguageAbbreviation(int Index)
+const char * I18nLanguageCode(int Index)
{
- return Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
+ return 0 <= Index && Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
}
-int I18nLanguageIndex(const char Code[3])
+int I18nLanguageIndex(const char *Code)
{
- char s[4];
- memcpy(s, Code, 3);
- s[3] = 0;
for (int i = 0; i < I18nNumLanguages; i++) {
- if (strcasestr(Phrases[2][i], s))
+ if (strcasestr(Phrases[2][i], Code))
return i;
}
- //dsyslog("unknown language code: '%s'", s);
+ //dsyslog("unknown language code: '%s'", Code);
return -1;
}
+const char *I18nNormalizeLanguageCode(const char *Code)
+{
+ int n = I18nLanguageIndex(Code);
+ return n >= 0 ? I18nLanguageCode(n) : Code;
+}
+
bool I18nIsPreferredLanguage(int *PreferredLanguages, int LanguageIndex, int &OldPreference)
{
for (int i = 0; i < I18nNumLanguages; i++) {