1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
--- text2skin-1.1-cvs_ext-0.10-20070620.3/font.c.orig 2007-08-13 08:54:41.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/font.c 2007-08-13 09:17:43.000000000 -0700
@@ -31,8 +31,13 @@
const cFont *res = NULL;
#ifdef HAVE_FREETYPE
char *cachename;
+#if VDRVERSNUM >= 10507
+ asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, I18nCurrentLanguage());
+ if (mFontCache.Load(Path + "/" + Filename, cachename, Size, I18nCurrentLanguage(), Width))
+#else
asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, Setup.OSDLanguage);
if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage, Width))
+#endif
res = mFontCache.GetFont(cachename);
else
esyslog("ERROR: Text2Skin: Couldn't load font %s:%d", Filename.c_str(), Size);
--- text2skin-1.1-cvs_ext-0.10-20070620.3/i18n.c.orig 2007-08-13 07:34:10.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/i18n.c 2007-08-13 08:53:31.000000000 -0700
@@ -491,7 +491,11 @@
cText2SkinI18n::~cText2SkinI18n() {
for (int i = 0; mPhrases[i][0]; ++i) {
+#if VDRVERSNUM >= 10507
+ for (int j = 0; j < I18nLanguages()->Size(); ++j)
+#else
for (int j = 0; j < I18nNumLanguages; ++j)
+#endif
free((void*)mPhrases[i][j]);
}
free(mPhrases);
@@ -507,7 +511,11 @@
memset(&p, 0, sizeof(tI18nPhrase));
Text += 17;
+#if VDRVERSNUM >= 10507
+ for (i = 0; i < I18nLanguages()->Size(); ++i) {
+#else
for (i = 0; i < I18nNumLanguages; ++i) {
+#endif
char *langs = strdup(I18nLanguageCode(i));
char *ptr = langs, *ep;
std::string text;
@@ -525,7 +533,11 @@
}
int idx = mNumPhrases++;
+#if VDRVERSNUM >= 10507
+ for (i = 0; i < I18nLanguages()->Size(); ++i)
+#else
for (i = 0; i < I18nNumLanguages; ++i)
+#endif
if (!p[i]) p[i] = "";
mPhrases = (tI18nPhrase*)realloc(mPhrases, (mNumPhrases + 1) * sizeof(tI18nPhrase));
memcpy(mPhrases[idx], p, sizeof(tI18nPhrase));
@@ -539,7 +551,9 @@
bool cText2SkinI18n::Load(const std::string &Filename) {
if (cText2SkinFile::Load(Filename)) {
+#if VDRVERSNUM <= 10506
I18nRegister(mPhrases, mIdentity.c_str());
+#endif
return true;
}
return false;
--- text2skin-1.1-cvs_ext-0.10-20070620.3/status.c.orig 2007-08-13 09:54:04.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/status.c 2007-08-13 09:57:10.000000000 -0700
@@ -130,8 +130,13 @@
void cText2SkinStatus::OsdClear(void)
{
+#if VDRVERSNUM >= 10507
+ if (I18nCurrentLanguage() != mLastLanguage) {
+ mLastLanguage = I18nCurrentLanguage();
+#else
if (Setup.OSDLanguage != mLastLanguage) {
mLastLanguage = Setup.OSDLanguage;
+#endif
cxString::Reparse();
}
--- text2skin-1.1-cvs_ext-0.10-20070620.3/text2skin.c.orig 2007-08-13 09:46:25.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/text2skin.c 2007-08-13 10:30:11.000000000 -0700
@@ -49,7 +49,11 @@
bool cText2SkinPlugin::Start(void) {
RegisterI18n(Phrases);
+#if VDRVERSNUM >= 10507
+ Text2SkinStatus.SetLanguage(I18nCurrentLanguage());
+#else
Text2SkinStatus.SetLanguage(Setup.OSDLanguage);
+#endif
cText2SkinLoader::Start();
return true;
}
|