Re: [vdr] [SOLVED] Re: How to set German OSD in VDR 1.5.8

2007-08-24 Thread Halim Sahin
On Fr, Aug 24, 2007 at 02:03:22 +0200, Matthias Fechner wrote:
> Hi Anssi,
> 
> Anssi Hannula wrote:
> > AFAICS that is only needed if the user locale settings are set to "C", 
> > "POSIX" or invalid values.
> > 
> > This behaviour was added to glibc in 2001, likely to fix something else.
> > http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/intl/dcigettext.c.diff?r1=1.22&r2=1.23&cvsroot=glibc&f=h
> > 
> > I've contacted the committer about our issue. If I get no reply, I'll 
> > raise it in libc-alpha ml.
> 
> ok that I think is the right way, thx a lot. The problem for me is fixed
> now but maybe we should add a small note in the INSTALL file that the
> environment variable LANG must be set before starting VDR to a valid value.
 
I think this is useful for all apps which should give you localized 
output.
So it's not a vdr problem.
Under Debian the lang variable is set through the locale setup.

If I write unset $LANG
all apps are producing  english output.

Best regards
Halim


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [SOLVED] Re: How to set German OSD in VDR 1.5.8

2007-08-24 Thread Matthias Fechner
Hi Anssi,

Anssi Hannula wrote:
> AFAICS that is only needed if the user locale settings are set to "C", 
> "POSIX" or invalid values.
> 
> This behaviour was added to glibc in 2001, likely to fix something else.
> http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/intl/dcigettext.c.diff?r1=1.22&r2=1.23&cvsroot=glibc&f=h
> 
> I've contacted the committer about our issue. If I get no reply, I'll 
> raise it in libc-alpha ml.

ok that I think is the right way, thx a lot. The problem for me is fixed
now but maybe we should add a small note in the INSTALL file that the
environment variable LANG must be set before starting VDR to a valid value.

Best regards,
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] translation context handling in vdr >= 1.5.7

2007-08-24 Thread Klaus Schmidinger
On 08/23/07 13:48, Christian Wieninger wrote:
> Hi,
> 
> I just noticed a small change in the context handling of translations 
> since vdr-1.5.7. Till now it was possible to have e.g.
> 
> const char AllowedChars[] = trNOOP("$ 
> abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&");
> 
> Note the 2 '$'. The first one only helps to have the second one in the 
> translation and not to be interpreted as context.
> 
> Previous implementations of I18nTranslate did only cut the context of 
> the english version. So the translation could look like this in i18n.c 
> or the po-files:
> 
>// The allowed characters in strings:
>{ "$ abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&",
>  " aäbcdefghijklmnoöpqrsßtuüvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&",
>  " abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&",
> ...
> 
> The current implementation cuts the translations too which results in
> 
> "[]|()*+?{}/:%@&"
> 
> Is this intended? If so, one could add the dummy '$' also at the 
> beginning of the translation, but has to handle this again for backwards 
> compatibility.
> 
> If it's not intended the following patch should give the previous behaviour:
> 
> --- vdr-1.5.8/i18n.c  2007-08-19 16:10:46.0 +0200
> +++ vdr-1.5.8-patched/i18n.c  2007-08-23 12:47:48.0 +0200
> @@ -208,10 +208,10 @@
>   t = dgettext(Plugin, s);
>if (t == s)
>   t = gettext(s);
> - s = t;
> + return t;
>}
> -  const char *p = strchr(s, '$');
> -  return p ? p + 1 : s;
> +  else
> +return SkipContext(s);
>   }
> 
>   const char *I18nLocale(int Language)

gettext() may or may not return the original string, so if no translation
is found, the context needs to be stripped.

Please try this:

--- i18n.c  2007/08/19 16:03:03 1.313
+++ i18n.c  2007/08/24 12:53:53
@@ -208,10 +208,10 @@
 t = dgettext(Plugin, s);
  if (t == s)
 t = gettext(s);
- s = t;
+ if (t != s)
+return t;
  }
-  const char *p = strchr(s, '$');
-  return p ? p + 1 : s;
+  return SkipContext(s);
 }

 const char *I18nLocale(int Language)



Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR-core's texts in plugin's .pot files

2007-08-24 Thread Klaus Schmidinger
On 08/19/07 14:58, Matthias Becker wrote:
> Hi,
> 
> plugins can re-use VDR-core translations. With the old "i18n.c" method
> plugin authors just did not provide a plugin specific translation for
> these texts.
> With the new translation method identifying these text got harder for
> plugin translators. xgettext puts all texts into the .pot file - also
> the texts for which the VDR-core translation should be used. A
> translator now cannot see which texts he has to translate and which
> not.
> 
> Can this be improved?
> 
> One way of doing this would be to introduce a new macro similar to
> trNOOP( ). A plugin author would then tag the vdr-core texts with this
> new macro and xgettext would ignore these texts.
> 
> What do you think?

You're certainly right.

How about this:

--- i18n.h  2007/08/19 14:07:17 1.23
+++ i18n.h  2007/08/24 13:33:50
@@ -80,6 +80,7 @@

 #ifdef PLUGIN_NAME_I18N
 #define tr(s)  I18nTranslate(s, "vdr-" PLUGIN_NAME_I18N)
+#define trVDR(s) I18nTranslate(s)  // to use a text that's in the VDR core's 
translation file
 #else
 #define tr(s)  I18nTranslate(s)
 #endif

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] translation context handling in vdr >= 1.5.7

2007-08-24 Thread Anssi Hannula
Klaus Schmidinger wrote:
> On 08/23/07 13:48, Christian Wieninger wrote:
>> Hi,
>>
>> I just noticed a small change in the context handling of translations 
>> since vdr-1.5.7. Till now it was possible to have e.g.
>>
>> const char AllowedChars[] = trNOOP("$ 
>> abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&");
>>
>> Note the 2 '$'. The first one only helps to have the second one in the 
>> translation and not to be interpreted as context.
>>
>> Previous implementations of I18nTranslate did only cut the context of 
>> the english version. So the translation could look like this in i18n.c 
>> or the po-files:
>>
>>// The allowed characters in strings:
>>{ "$ abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&",
>>  " aäbcdefghijklmnoöpqrsßtuüvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&",
>>  " abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&",
>> ...
>>
>> The current implementation cuts the translations too which results in
>>
>> "[]|()*+?{}/:%@&"
>>
>> Is this intended? If so, one could add the dummy '$' also at the 
>> beginning of the translation, but has to handle this again for backwards 
>> compatibility.
>>
>> If it's not intended the following patch should give the previous behaviour:
[...]
> 
> gettext() may or may not return the original string, so if no translation
> is found, the context needs to be stripped.
[...]

For the record, gettext also has context support:
http://www.gnu.org/software/gettext/manual/gettext.html#Contexts

But if it needs too many changes, maybe it is not worth it.

-- 
Anssi Hannula

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] translation context handling in vdr >= 1.5.7

2007-08-24 Thread Klaus Schmidinger
On 08/24/07 15:37, Anssi Hannula wrote:
> ...
> For the record, gettext also has context support:
> http://www.gnu.org/software/gettext/manual/gettext.html#Contexts
> 
> But if it needs too many changes, maybe it is not worth it.

I thought about that shortly, but decided not to use it.
There's not really too much to gain, and it would mean
we'd have to touch quite a few places.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR-core's texts in plugin's .pot files

2007-08-24 Thread Klaus Schmidinger
On 08/24/07 16:00, Klaus Schmidinger wrote:
> ...
> One more thing: this also reduces I18nTranslate() to
> 
> 
> const char *I18nTranslate(const char *s, const char *Plugin)
> {
>   if (s && CurrentLanguage) {
>  const char *t = Plugin ? dgettext(Plugin, s) : gettext(s);
>  if (t != s)
> return t;
>  }
>   return SkipContext(s);
> }

Well, actually


const char *I18nTranslate(const char *s, const char *Plugin)
{
  if (!s)
 return s;
  if (CurrentLanguage) {
 const char *t = Plugin ? dgettext(Plugin, s) : gettext(s);
 if (t != s)
return t;
 }
  return SkipContext(s);
}


Guess I was a little too enthusiastic when minimizing this code ,-)

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] R: [PATCH]: VDR & Multiple frontends (finished)

2007-08-24 Thread Klaus Schmidinger
On 08/19/07 22:02, Eddi wrote:
> Hi,
> 
> Klaus, any news about support for multiple frontends?
> 
> What about integrating my patch in 1.5.x?

Well, to be absolutely honest, this is still dangling in my
inbox and I have so many other things to do that I just
can't seem to find the time right now.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR-core's texts in plugin's .pot files

2007-08-24 Thread Klaus Schmidinger
On 08/24/07 15:35, Klaus Schmidinger wrote:
> On 08/19/07 14:58, Matthias Becker wrote:
>> ...
>> One way of doing this would be to introduce a new macro similar to
>> trNOOP( ). A plugin author would then tag the vdr-core texts with this
>> new macro and xgettext would ignore these texts.
>>
>> What do you think?
> 
> You're certainly right.
> 
> How about this:
> 
> --- i18n.h  2007/08/19 14:07:17 1.23
> +++ i18n.h  2007/08/24 13:33:50
> @@ -80,6 +80,7 @@
> 
>  #ifdef PLUGIN_NAME_I18N
>  #define tr(s)  I18nTranslate(s, "vdr-" PLUGIN_NAME_I18N)
> +#define trVDR(s) I18nTranslate(s)  // to use a text that's in the VDR core's 
> translation file
>  #else
>  #define tr(s)  I18nTranslate(s)
>  #endif

One more thing: this also reduces I18nTranslate() to


const char *I18nTranslate(const char *s, const char *Plugin)
{
  if (s && CurrentLanguage) {
 const char *t = Plugin ? dgettext(Plugin, s) : gettext(s);
 if (t != s)
return t;
 }
  return SkipContext(s);
}



Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [SOLVED] Re: How to set German OSD in VDR 1.5.8

2007-08-24 Thread Matthias Fechner
Hi Halim,

Halim Sahin wrote:
> If I write unset $LANG
> all apps are producing  english output.

yes that is excatly what VDR also does but if I have not defined LANG
then I'm not able to select another language in the OSD of VDR and that
is the issue I tried to address.
Everything else is fine.

Best regards,
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] WSS signaling with DXR3 cards

2007-08-24 Thread Kartsa
Kartsa kirjoitti:
> Jukka Tastula kirjoitti:
>   
>> On Friday 10 August 2007 10:14:32 Ville Skyttä wrote:
>>
>>   
>> 
>>> Hm, so you have an ADV7175 based one currently?  Sorry, I don't think that
>>> helps - again, as far as I know, the WSS stuff only works with ADV7170
>>> based cards.  The patched adv717x driver never even tries to set the WSS
>>> mode for any other DXR3/H+'s.  I don't have any others than a couple of
>>> ADV7170 based cards so I can't test with anything else.  It could be useful
>>> to ask on dxr3-devel or dxr3-plugin lists if someone can help out more.
>>> 
>>>   
>> I have both and I can confirm that the ADV7175 does not support WSS. 
>> If you're really bored feel free to compare the datasheets
>> http://pdf1.alldatasheet.com/datasheet-pdf/view/48906/AD/ADV7175.html
>> http://www.ortodoxism.ro/datasheets/analogdevices/168564552ADV7170_1_a.pdf
>>
>> ADV7170 has WSS support "clearly" stated where as ADV7175 makes no mention 
>> of 
>> it at all.
>>
>>   
>> 
I managed to find a ADV7170 card and now WSS works.

Thanks to who partissipated.

\\Kartsa

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] dvb driver failure detection?

2007-08-24 Thread Ali H.M. Hoseini
Hi all,
I'm using a VDR system with 4 skystar2 cards.
I'm disabled vdr watchdog and code line who jumps out vdr when the signal is
noisy, because when this enabled, and I have noise in one frequency, vdr
jumps out and ruins all other input recordings.
But there are some times that all recordings fail. I suspect to DVB driver,
because VDR records, but file size of recordings are 0, and when I restart
system, every things go well again.
The question is, how I can detect dvb driver failure, rather than signal
failure, to restart system just in driver failure times?

Thanks.
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr