1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../vdr-text2skin/locale.patch
5 # Copyright (C) 2008 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 http://toms-cafe.de/vdr/download/text2skin-1.1-cvs-locale.diff
19 --- text2skin-1.0+cvs20080122.2311/Makefile
20 +++ text2skin-1.0+cvs20080122.2311/Makefile
22 # The official name of this plugin.
23 # This name will be used in the '-P...' option of VDR to load the plugin.
24 # By default the main source file also carries this name.
25 +# IMPORTANT: the presence of this macro is important for the Make.config
26 +# file. So it must be defined, even if it is not used here!
31 ### The C++ compiler and options:
34 -CXXFLAGS ?= -Wall -Woverloaded-virtual
35 +CXXFLAGS ?= -fPIC -Wall -Woverloaded-virtual
37 ### The directory environment:
39 -DVBDIR = ../../../../DVB
44 -### The version number of VDR (taken from VDR's "config.h"):
45 +### Allow user defined options to overwrite defaults:
47 +-include $(VDRDIR)/Make.config
49 +### The version number of VDR's plugin API (taken from VDR's "config.h"):
51 -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
52 +APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' \
55 ### The name of the distribution archive:
57 ARCHIVE = $(PLUGIN)-$(VERSION)
58 PACKAGE = vdr-$(ARCHIVE)
60 -### Allow user defined options to overwrite defaults:
62 --include $(VDRDIR)/Make.config
64 ### The object files (add further files here):
66 OBJS = $(PLUGIN).o loader.o display.o render.o common.o bitmap.o \
71 -INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/linux/include -I$(DVBDIR)/include -I.
72 +INCLUDES += -I$(VDRDIR)/include -I.
74 DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
78 +all: libvdr-$(PLUGIN).so i18n
83 $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
88 -MAKEDEP = g++ -MM -MG
89 +MAKEDEP = $(CXX) -MM -MG
90 DEPFILE = .dependencies
92 @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
97 +### Internationalization (I18N):
100 +LOCALEDIR = $(VDRDIR)/locale
101 +I18Npo = $(notdir $(wildcard $(PODIR)/*.po))
102 +I18Npot = $(PODIR)/$(PLUGIN).pot
104 +$(I18Npot): $(wildcard *.c)
105 + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \
106 + --msgid-bugs-address='<sascha@akv-soft.de>' -o $@ $^
109 + msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
112 +$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.po
113 + @mkdir -p $(dir $@)
116 -all: libvdr-$(PLUGIN).so
118 +i18n: $(I18Npo:%.po=$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo)
122 libvdr-$(PLUGIN).so: $(OBJS)
123 $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@
124 - @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
125 + @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
127 - strip $(LIBDIR)/$@.$(VDRVERSION)
128 + strip $(LIBDIR)/$@.$(APIVERSION)
132 @-rm -rf $(TMPDIR)/$(ARCHIVE)
133 @mkdir $(TMPDIR)/$(ARCHIVE)
134 @cp -a * $(TMPDIR)/$(ARCHIVE)
135 - @ln -s $(ARCHIVE) $(TMPDIR)/$(PLUGIN)
136 - @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE) $(PLUGIN)
137 - @-rm -rf $(TMPDIR)/$(ARCHIVE) $(TMPDIR)/$(PLUGIN)
138 + @tar czf $(PACKAGE).tgz -C $(TMPDIR) \
139 + --exclude debian --exclude CVS --exclude .svn $(ARCHIVE)
140 + @-rm -rf $(TMPDIR)/$(ARCHIVE)
141 @echo Distribution package created as $(PACKAGE).tgz
144 - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ SKINS SKINS.de
145 + @-rm -f $(OBJS) $(DEPFILE) *.so $(I18Npot) *.tgz core* *~ SKINS SKINS.de
146 --- text2skin-1.0+cvs20080122.2311/font.c
147 +++ text2skin-1.0+cvs20080122.2311/font.c
149 const cFont *res = NULL;
152 +#if VDRVERSNUM >= 10507
153 + asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, I18nCurrentLanguage());
154 + if (mFontCache.Load(Path + "/" + Filename, cachename, Size, I18nCurrentLanguage(), Width))
156 asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, Setup.OSDLanguage);
157 if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage, Width))
159 res = mFontCache.GetFont(cachename);
161 esyslog("ERROR: Text2Skin: Couldn't load font %s:%d", Filename.c_str(), Size);
162 --- text2skin-1.0+cvs20080122.2311/i18n.c
163 +++ text2skin-1.0+cvs20080122.2311/i18n.c
166 #include <vdr/config.h>
168 +#if VDRVERSNUM < 10507
169 const tI18nPhrase Phrases[] = {
172 @@ -156,14 +157,22 @@
178 +#if VDRVERSNUM >= 10507
179 +cText2SkinI18n::cText2SkinI18n(const char *Skin) {
180 + mIdentity = std::string("vdr-"PLUGIN_NAME_I18N"-") + Skin;
181 + I18nRegister(mIdentity.substr(mIdentity.find('-') + 1).c_str());
183 cText2SkinI18n::cText2SkinI18n(const char *Skin): cText2SkinFile(Skin) {
184 mIdentity = (std::string)"text2skin_" + Skin;
186 mPhrases = (tI18nPhrase*)malloc(sizeof(tI18nPhrase));
187 memset(mPhrases[mNumPhrases], 0, sizeof(tI18nPhrase));
191 +#if VDRVERSNUM < 10507
192 cText2SkinI18n::~cText2SkinI18n() {
193 for (int i = 0; mPhrases[i][0]; ++i) {
194 for (int j = 0; j < I18nNumLanguages; ++j)
200 --- text2skin-1.0+cvs20080122.2311/i18n.h
201 +++ text2skin-1.0+cvs20080122.2311/i18n.h
204 #include <vdr/i18n.h>
206 +#if VDRVERSNUM < 10507
207 +#define trNOOP(s) (s)
209 extern const tI18nPhrase Phrases[];
211 class cText2SkinI18n: public cText2SkinFile {
213 +class cText2SkinI18n {
216 std::string mIdentity;
217 +#if VDRVERSNUM < 10507
218 tI18nPhrase *mPhrases;
222 virtual bool Parse(const char *Text);
226 cText2SkinI18n(const char *Skin);
227 +#if VDRVERSNUM < 10507
228 virtual ~cText2SkinI18n();
230 virtual bool Load(const std::string &Filename);
232 std::string Translate(const std::string &Text) { return I18nTranslate(Text.c_str(), mIdentity.c_str()); }
235 --- text2skin-1.0+cvs20080122.2311/loader.c
236 +++ text2skin-1.0+cvs20080122.2311/loader.c
240 void cText2SkinLoader::Load(const char *Skin) {
241 +#if VDRVERSNUM >= 10507
242 + cText2SkinI18n *translations = new cText2SkinI18n(Skin);
244 cText2SkinI18n *translations = NULL;
245 std::string transfile = SkinPath() + "/" + Skin + "/" + Skin + ".trans";
246 if (access(transfile.c_str(), F_OK) == 0) {
248 if (!translations->Load(transfile))
249 DELETENULL(translations);
253 cText2SkinTheme *theme = new cText2SkinTheme(Skin);
254 std::string themefile = SkinPath() + "/" + Skin + "/" + Skin + ".colors";
255 --- text2skin-1.0+cvs20080122.2311/status.c
256 +++ text2skin-1.0+cvs20080122.2311/status.c
259 void cText2SkinStatus::OsdClear(void)
261 +#if VDRVERSNUM >= 10507
262 + if (I18nCurrentLanguage() != mLastLanguage) {
263 + mLastLanguage = I18nCurrentLanguage();
265 if (Setup.OSDLanguage != mLastLanguage) {
266 mLastLanguage = Setup.OSDLanguage;
271 --- text2skin-1.0+cvs20080122.2311/text2skin.c
272 +++ text2skin-1.0+cvs20080122.2311/text2skin.c
275 const char *cText2SkinPlugin::VERSION = "1.1-cvs";
276 const char *cText2SkinPlugin::SKINVERSION = "1.0";
277 -const char *cText2SkinPlugin::DESCRIPTION = "Loader for text-based skins";
278 +const char *cText2SkinPlugin::DESCRIPTION = trNOOP("Loader for text-based skins");
280 cText2SkinPlugin::cText2SkinPlugin(void) {
285 bool cText2SkinPlugin::Start(void) {
286 +#if VDRVERSNUM < 10507
287 RegisterI18n(Phrases);
288 Text2SkinStatus.SetLanguage(Setup.OSDLanguage);
290 + Text2SkinStatus.SetLanguage(I18nCurrentLanguage());
292 cText2SkinLoader::Start();
295 --- text2skin-1.0+cvs20080122.2311/po/de_DE.po 1970-01-01 00:00:00.000000000 +0000
296 +++ text2skin-1.0+cvs20080122.2311/po/de_DE.po
298 +# German translations for vdr-text2skin package.
299 +# Copyright (C) Sascha Volkenandt <sascha@akv-soft.de>
300 +# This file is distributed under the same license as the vdr-text2skin package.
301 +# Sascha Volkenandt <sascha@akv-soft.de>, 2004, 2005.
307 +"Project-Id-Version: vdr-text2skin 1.0\n"
308 +"Report-Msgid-Bugs-To: <sascha@akv-soft.de>\n"
309 +"POT-Creation-Date: 2008-01-26 14:59+0100\n"
310 +"PO-Revision-Date: 2008-01-26 12:38+0100\n"
311 +"Last-Translator: Sascha Volkenandt <sascha@akv-soft.de>\n"
312 +"Language-Team: <vdr@linuxtv.org>\n"
313 +"MIME-Version: 1.0\n"
314 +"Content-Type: text/plain; charset=iso-8859-15\n"
315 +"Content-Transfer-Encoding: 8bit\n"
317 +msgid "*** Invalid Channel ***"
320 +msgid "Skin too large or incorrectly aligned"
321 +msgstr "Skin zu groß oder nicht korrekt ausgerichtet"
323 +msgid "Flush image cache"
324 +msgstr "Bildspeicher leeren"
326 +msgid "Max. image cache size"
327 +msgstr "Max. Größe des Bildspeichers"
329 +msgid "Flushing image cache..."
330 +msgstr "Bildspeicher wird geleert..."
332 +msgid "Loader for text-based skins"
333 +msgstr "Lader für textbasierte Skins"
334 --- text2skin-1.0+cvs20080122.2311/po/fi_FI.po 1970-01-01 00:00:00.000000000 +0000
335 +++ text2skin-1.0+cvs20080122.2311/po/fi_FI.po
337 +# Finnish translations for vdr-text2skin package.
338 +# Copyright (C) Sascha Volkenandt <sascha@akv-soft.de>
339 +# This file is distributed under the same license as the vdr-text2skin package.
340 +# Rolf Ahrenberg <rahrenbe@cc.hut.fi>, 2004, 2005.
346 +"Project-Id-Version: vdr-text2skin 1.0\n"
347 +"Report-Msgid-Bugs-To: <sascha@akv-soft.de>\n"
348 +"POT-Creation-Date: 2008-01-26 14:59+0100\n"
349 +"PO-Revision-Date: 2008-01-26 12:38+0100\n"
350 +"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
351 +"Language-Team: <vdr@linuxtv.org>\n"
352 +"MIME-Version: 1.0\n"
353 +"Content-Type: text/plain; charset=iso-8859-15\n"
354 +"Content-Transfer-Encoding: 8bit\n"
356 +msgid "*** Invalid Channel ***"
359 +msgid "Skin too large or incorrectly aligned"
360 +msgstr "Ulkoasu on liian suuri tai väärin asemoitu"
362 +msgid "Flush image cache"
363 +msgstr "Tyhjennä kuvat välimuistista"
365 +msgid "Max. image cache size"
366 +msgstr "Välimuistin maksimikoko"
368 +msgid "Flushing image cache..."
369 +msgstr "Tyhjennetään välimuistia..."
371 +msgid "Loader for text-based skins"
372 +msgstr "Helposti muokattavat ulkoasut"