1.1 --- a/HISTORY Sat Dec 29 11:20:07 2007 +0100
1.2 +++ b/HISTORY Sat Dec 29 11:20:25 2007 +0100
1.3 @@ -1,6 +1,9 @@
1.4 VDR Plugin 'premiereepg' Revision History
1.5 -----------------------------------------
1.6
1.7 +27.08.2007: Version 0.0.8
1.8 +- Added support for VDR 1.5.7+ gettext internationalization.
1.9 +
1.10 21.09.2006: Version 0.0.7
1.11 - Added fix for broken EPG data on certain Premiere channels. Must be enabled in
1.12 the plugin setup menu.
2.1 --- a/Makefile Sat Dec 29 11:20:07 2007 +0100
2.2 +++ b/Makefile Sat Dec 29 11:20:25 2007 +0100
2.3 @@ -1,7 +1,7 @@
2.4 #
2.5 # PremiereEpg plugin to VDR
2.6 #
2.7 -# (C) 2005-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
2.8 +# (C) 2005-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
2.9 #
2.10 # This code is free software; you can redistribute it and/or
2.11 # modify it under the terms of the GNU General Public License
2.12 @@ -70,10 +70,12 @@
2.13 CXXFLAGS += -g
2.14 endif
2.15
2.16 -### Implicit rules:
2.17 +### Internationalization (I18N):
2.18
2.19 -%.o: %.c
2.20 - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
2.21 +PODIR = po
2.22 +I18Npot = $(PODIR)/$(PLUGIN).pot
2.23 +I18Nmsgs = $(addprefix $(LOCALEDIR)/,$(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo,$(notdir $(foreach file, $(wildcard $(PODIR)/*.po), $(basename $(file))))))
2.24 +LOCALEDIR = $(VDRDIR)/locale
2.25
2.26 # Dependencies:
2.27
2.28 @@ -86,12 +88,37 @@
2.29
2.30 ### Targets:
2.31
2.32 -all: libvdr-$(PLUGIN).so
2.33 +TARGETS = libvdr-$(PLUGIN).so
2.34 +ifneq ($(shell grep -l 'Phrases' $(VDRDIR)/i18n.c),$(VDRDIR)/i18n.c)
2.35 +TARGETS += i18n
2.36 +endif
2.37 +
2.38 +all: $(TARGETS)
2.39 +.PHONY: i18n
2.40 +
2.41 +%.o: %.c
2.42 + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
2.43
2.44 libvdr-$(PLUGIN).so: $(OBJS)
2.45 $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
2.46 @cp $@ $(LIBDIR)/$@.$(APIVERSION)
2.47
2.48 +$(I18Npot): $(shell grep -rl '\(tr\|trNOOP\)(\".*\")' *.c $(SYSDIR))
2.49 + xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<s.huelswitt@gmx.de>' -o $@ $^
2.50 +
2.51 +%.po: $(I18Npot)
2.52 + msgmerge -U --no-wrap -F --backup=none -q $@ $<
2.53 + @touch $@
2.54 +
2.55 +%.mo: %.po
2.56 + msgfmt -c -o $@ $<
2.57 +
2.58 +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
2.59 + @mkdir -p $(dir $@)
2.60 + cp $< $@
2.61 +
2.62 +i18n: $(I18Nmsgs)
2.63 +
2.64 dist: clean
2.65 @-rm -rf $(TMPDIR)/$(ARCHIVE)
2.66 @mkdir $(TMPDIR)/$(ARCHIVE)
2.67 @@ -102,3 +129,4 @@
2.68
2.69 clean:
2.70 @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~
2.71 + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/po/de_DE.po Sat Dec 29 11:20:25 2007 +0100
3.3 @@ -0,0 +1,72 @@
3.4 +# VDR plugin language source file.
3.5 +# Copyright (C) 2007 Stefan Huelswitt <s.huelswitt@gmx.de>
3.6 +# This file is distributed under the same license as the VDR package.
3.7 +# Stefan Huelswitt <s.huelswitt@gmx.de>, 2006
3.8 +#
3.9 +msgid ""
3.10 +msgstr ""
3.11 +"Project-Id-Version: VDR 1.5.9\n"
3.12 +"Report-Msgid-Bugs-To: <s.huelswitt@gmx.de>\n"
3.13 +"POT-Creation-Date: 2007-08-27 17:31+0200\n"
3.14 +"PO-Revision-Date: 2007-08-27 16:22+0200\n"
3.15 +"Last-Translator: Stefan Huelswitt <s.huelswitt@gmx.de>\n"
3.16 +"Language-Team: <vdr@linuxtv.org>\n"
3.17 +"MIME-Version: 1.0\n"
3.18 +"Content-Type: text/plain; charset=ISO-8859-15\n"
3.19 +"Content-Transfer-Encoding: 8bit\n"
3.20 +
3.21 +#: premiereepg.c:61
3.22 +msgid "Parses extended Premiere EPG data"
3.23 +msgstr "Liest erweiterte Premiere EPG Daten ein"
3.24 +
3.25 +#: premiereepg.c:358
3.26 +msgid "PremiereEPG"
3.27 +msgstr "PremiereEPG"
3.28 +
3.29 +#: premiereepg.c:359
3.30 +msgid "off"
3.31 +msgstr "aus"
3.32 +
3.33 +#: premiereepg.c:364
3.34 +msgid "Tag option events"
3.35 +msgstr "Options Events markieren"
3.36 +
3.37 +#: premiereepg.c:365
3.38 +msgid "Show order information"
3.39 +msgstr "Bestellhinweise anzeigen"
3.40 +
3.41 +#: premiereepg.c:366
3.42 +msgid "Show rating information"
3.43 +msgstr "Altersfreigaben anzeigen"
3.44 +
3.45 +#: premiereepg.c:367
3.46 +msgid "Fix EPG data"
3.47 +msgstr "EPG Daten korrigieren"
3.48 +
3.49 +#: premiereepg.c:532
3.50 +msgid "Ordernumber"
3.51 +msgstr "Bestellnummer"
3.52 +
3.53 +#: premiereepg.c:533
3.54 +msgid "Price"
3.55 +msgstr "Preis"
3.56 +
3.57 +#: premiereepg.c:534
3.58 +msgid "Ordering"
3.59 +msgstr "Bestellen"
3.60 +
3.61 +#: premiereepg.c:535
3.62 +msgid "SMS"
3.63 +msgstr "SMS"
3.64 +
3.65 +#: premiereepg.c:536
3.66 +msgid "WWW"
3.67 +msgstr "WWW"
3.68 +
3.69 +#: premiereepg.c:554
3.70 +msgid "Rating"
3.71 +msgstr "Altersfreigabe"
3.72 +
3.73 +#: premiereepg.c:554
3.74 +msgid "years"
3.75 +msgstr "Jahre"
4.1 --- a/premiereepg.c Sat Dec 29 11:20:07 2007 +0100
4.2 +++ b/premiereepg.c Sat Dec 29 11:20:25 2007 +0100
4.3 @@ -1,7 +1,7 @@
4.4 /*
4.5 * PremiereEpg plugin to VDR (C++)
4.6 *
4.7 - * (C) 2005-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
4.8 + * (C) 2005-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
4.9 *
4.10 * This code is base on the commandline tool premiereepg2vdr
4.11 * (C) 2004-2005 by Axel Katzur software@katzur.de
4.12 @@ -33,6 +33,13 @@
4.13 #include <libsi/section.h>
4.14 #include <libsi/descriptor.h>
4.15
4.16 +#if APIVERSNUM < 10401
4.17 +#error You need at least VDR API version 1.4.1 for this plugin
4.18 +#endif
4.19 +#if APIVERSNUM < 10507
4.20 +#define trNOOP(s) (s)
4.21 +#endif
4.22 +
4.23 //#define DEBUG
4.24 //#define DEBUG2
4.25
4.26 @@ -50,12 +57,8 @@
4.27 #define PMT_SCAN_TIMEOUT 10 // seconds
4.28 #define PMT_SCAN_IDLE 300 // seconds
4.29
4.30 -static const char *VERSION = "0.0.7";
4.31 -static const char *DESCRIPTION = "Parses extended Premiere EPG data";
4.32 -
4.33 -#if APIVERSNUM < 10401
4.34 -#error You need at least VDR API version 1.4.1 for this plugin
4.35 -#endif
4.36 +static const char *VERSION = "0.0.8";
4.37 +static const char *DESCRIPTION = trNOOP("Parses extended Premiere EPG data");
4.38
4.39 // --- cSetupPremiereEpg -------------------------------------------------------
4.40
4.41 @@ -90,9 +93,8 @@
4.42
4.43 // --- i18n --------------------------------------------------------------------
4.44
4.45 +#if APIVERSNUM < 10507
4.46 const tI18nPhrase Phrases[] = {
4.47 -/*
4.48 -*/
4.49 { "PremiereEPG",
4.50 "PremiereEPG",
4.51 "", // TODO
4.52 @@ -127,6 +129,23 @@
4.53 "", // TODO
4.54 "", // TODO
4.55 },
4.56 + { "off",
4.57 + "aus",
4.58 + "", // TODO
4.59 + "", // TODO
4.60 + "", // TODO
4.61 + "", // TODO
4.62 + "", // TODO
4.63 + "", // TODO
4.64 + "", // TODO
4.65 + "", // TODO
4.66 + "", // TODO
4.67 + "", // TODO
4.68 + "", // TODO
4.69 + "", // TODO
4.70 + "", // TODO
4.71 + "", // TODO
4.72 + },
4.73 { "Tag option events",
4.74 "Options Events markieren",
4.75 "", // TODO
4.76 @@ -318,6 +337,7 @@
4.77
4.78 { NULL }
4.79 };
4.80 +#endif
4.81
4.82 // --- cMenuSetupPremiereEpg ------------------------------------------------------------
4.83
4.84 @@ -509,11 +529,11 @@
4.85 case 0xF0: // order information
4.86 if(SetupPE.OrderInfo) {
4.87 static const char *text[] = {
4.88 - "Ordernumber",
4.89 - "Price",
4.90 - "Ordering",
4.91 - "SMS",
4.92 - "WWW"
4.93 + trNOOP("Ordernumber"),
4.94 + trNOOP("Price"),
4.95 + trNOOP("Ordering"),
4.96 + trNOOP("SMS"),
4.97 + trNOOP("WWW")
4.98 };
4.99 char buff[512];
4.100 int p=0;
4.101 @@ -742,7 +762,9 @@
4.102
4.103 bool cPluginPremiereEpg::Start(void)
4.104 {
4.105 +#if APIVERSNUM < 10507
4.106 RegisterI18n(Phrases);
4.107 +#endif
4.108 for(int i=0; i<MAXDVBDEVICES; i++) {
4.109 cDevice *dev=cDevice::GetDevice(i);
4.110 if(dev) {