Re: vdr-1.5.3 - issue with translations out of plugins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/13/07 12:50, Matthias Becker wrote:
> Hi everbody,
> 
> I also tried both patches together and this did also not fix the
> problem with the
> translation of "Volume " out of lcdproc-Plugin.

Please try the attached patch (against plain VDR 1.5.3).
There was still a problem in cCharSetConv::Convert() in case
an empty string was given.

Klaus
--- tools.c	2007/06/15 12:20:40	1.124
+++ tools.c	2007/06/15 12:46:38
@@ -753,7 +753,7 @@
 
 const char *cCharSetConv::Convert(const char *From, char *To, size_t ToLength)
 {
-  if (cd != (iconv_t)-1) {
+  if (cd != (iconv_t)-1 && From && *From) {
      char *FromPtr = (char *)From;
      size_t FromLength = strlen(From);
      char *ToPtr = To;
--- i18n.c	2007/06/09 08:44:54	1.294
+++ i18n.c	2007/06/15 12:52:51
@@ -6820,7 +6820,7 @@
      *Converted = new tI18nPhrase[NumPhrases + 1];
      memset(*Converted, 0, sizeof(tI18nPhrase) * (NumPhrases + 1));
      }
-  if (!(*Converted)[NrPhrase][NrLanguage]) {
+  if (!(*Converted)[NrPhrase][NrLanguage] && Original[NrPhrase][NrLanguage]) {
      cCharSetConv csc(Phrases[1][NrLanguage], cCharSetConv::SystemCharacterTable());
      (*Converted)[NrPhrase][NrLanguage] = strdup(csc.Convert(Original[NrPhrase][NrLanguage]));
      }
@@ -6851,7 +6851,8 @@
                    return t;
                 }
              }
-         p = Phrases;
+         p = OriginalPhrases = Phrases;
+         ConvertedPhrases = &Converted;
          }
      esyslog("%s%sno translation found for '%s' in language %d (%s)", Plugin ? Plugin : "", Plugin ? ": " : "", s, Setup.OSDLanguage, Phrases[0][Setup.OSDLanguage]);
      }
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux