From 371d910a0f31585797c1c7521a50f1945fe1d8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Sat, 16 May 2009 11:52:15 +0200 Subject: Locales for text2skin plug-in (VDR >= 1.5.7, skins + locale patch). Patch from http://toms-cafe.de/vdr/download/text2skin-1.1-cvs-locale.diff The skins have to be patched, too. The patches for DeepBlue, Enigma and enElchi are ready for download from http://toms-cafe.de/vdr/download/. To patch other skins the Makefile from these patches could be used without any changes, missing translation entries should be added to the *.skin file (e.g. as comments ) --- i18n.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'i18n.c') diff --git a/i18n.c b/i18n.c index c8a0fdc..a190a49 100644 --- a/i18n.c +++ b/i18n.c @@ -5,6 +5,7 @@ #include "i18n.h" #include +#if VDRVERSNUM < 10507 const tI18nPhrase Phrases[] = { /* { "English", @@ -156,14 +157,22 @@ const tI18nPhrase Phrases[] = { }, { NULL } }; +#endif +#if VDRVERSNUM >= 10507 +cText2SkinI18n::cText2SkinI18n(const char *Skin) { + mIdentity = std::string("vdr-"PLUGIN_NAME_I18N"-") + Skin; + I18nRegister(mIdentity.substr(mIdentity.find('-') + 1).c_str()); +#else cText2SkinI18n::cText2SkinI18n(const char *Skin): cText2SkinFile(Skin) { mIdentity = (std::string)"text2skin_" + Skin; mNumPhrases = 0; mPhrases = (tI18nPhrase*)malloc(sizeof(tI18nPhrase)); memset(mPhrases[mNumPhrases], 0, sizeof(tI18nPhrase)); +#endif } +#if VDRVERSNUM < 10507 cText2SkinI18n::~cText2SkinI18n() { for (int i = 0; mPhrases[i][0]; ++i) { for (int j = 0; j < I18nNumLanguages; ++j) @@ -219,3 +228,4 @@ bool cText2SkinI18n::Load(const std::string &Filename) { } return false; } +#endif -- cgit v1.2.3