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.000000000 +0200
+++ vdr-1.5.8-patched/i18n.c 2007-08-23 12:47:48.000000000 +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)
BR,
Christian