This is a semi-automatically created i18n adaptation patch and may contain errors (such as missing translations). This should only be used as a temporary measure until the upstream plugin maintainer fixes the plugin properly according to the instructions in i18n-to-gettext.pl. Created for Mandriva Linux packaging by Anssi Hannula <anssi@mandriva.org>. Index: externalplayer-0.1.0/Makefile =================================================================== --- externalplayer-0.1.0/Makefile +++ externalplayer-0.1.0/Makefile 2008-04-23 22:32:50.000000000 +0300 @@ -46,7 +46,7 @@ ### The object files (add further files here): -OBJS = externalplayer.o externalplayer-config.o externalplayer-control.o externalplayer-i18n.o externalplayer-player.o externalplayer-remotes.o +OBJS = externalplayer.o externalplayer-config.o externalplayer-control.o externalplayer-player.o externalplayer-remotes.o ### Implicit rules: @@ -62,9 +62,34 @@ -include $(DEPFILE) +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(wildcard $(PODIR)/*.po) +I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) +I18Npot = $(PODIR)/$(PLUGIN).pot + +%.mo: %.po + msgfmt -c -o $@ $< + +$(I18Npot): $(wildcard *.[ch] *.[ch]xx *.cc *.[ch]pp *.hh) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<http://qa.mandriva.com/>' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ + +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) + ### Targets: -all: libvdr-$(PLUGIN).so +all: libvdr-$(PLUGIN).so i18n libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ @@ -79,4 +104,5 @@ @echo Distribution package created as $(PACKAGE).tar.gz clean: + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ Index: externalplayer-0.1.0/externalplayer-i18n.c =================================================================== --- externalplayer-0.1.0/externalplayer-i18n.c +++ externalplayer-0.1.0/externalplayer-i18n.c 2008-04-23 22:32:50.000000000 +0300 @@ -1,31 +0,0 @@ -/* - * externalplayer-i18n.c: A plugin for the Video Disk Recorder - * - * See the README file for copyright information and how to reach the author. - * - * $Id$ - */ - -#include "externalplayer-i18n.h" - -const tI18nPhrase ExternalplayerPhrases[] = { - { "External Players", - "Externe Abspielprogramme", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { NULL } - }; Index: externalplayer-0.1.0/externalplayer-i18n.h =================================================================== --- externalplayer-0.1.0/externalplayer-i18n.h +++ externalplayer-0.1.0/externalplayer-i18n.h 2008-04-23 22:32:50.000000000 +0300 @@ -1,16 +0,0 @@ -/* - * externalplayer-i18n.h: A plugin for the Video Disk Recorder - * - * See the README file for copyright information and how to reach the author. - * - * $Id$ - */ - -#ifndef _EXTERNALPLAYER_I18N__H -#define _EXTERNALPLAYER_I18N__H - -#include <vdr/i18n.h> - -extern const tI18nPhrase ExternalplayerPhrases[]; - -#endif //_EXTERNALPLAYER_I18N__H Index: externalplayer-0.1.0/externalplayer.c =================================================================== --- externalplayer-0.1.0/externalplayer.c +++ externalplayer-0.1.0/externalplayer.c 2008-04-23 22:32:50.000000000 +0300 @@ -12,7 +12,7 @@ #include <getopt.h> #include "externalplayer.h" -#include "externalplayer-i18n.h" + #include "externalplayer-player.h" #include "externalplayer-control.h" #include "externalplayer-remotes.h" @@ -63,7 +63,7 @@ } bool cPluginExternalplayer::Start() { - RegisterI18n(ExternalplayerPhrases); + if (configFilename == "") { configFilename += ConfigDirectory(); Index: externalplayer-0.1.0/po/de_DE.po =================================================================== --- externalplayer-0.1.0/po/de_DE.po +++ externalplayer-0.1.0/po/de_DE.po 2008-04-23 22:32:50.000000000 +0300 @@ -0,0 +1,20 @@ +# VDR externalplayer plugin language source file. +# Copyright (C) YEAR THE VDR-externalplayer'S COPYRIGHT HOLDER +# This file is distributed under the same license as the VDR-externalplayer package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: VDR-externalplayer\n" +"Report-Msgid-Bugs-To: http://qa.mandriva.com/\n" +"POT-Creation-Date: 2008-04-23 22:32+0300\n" +"PO-Revision-Date: 2008-04-23 22:32+0300\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: <vdr@linuxtv.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#: externalplayer.c:93 externalplayer.c:125 +msgid "External Players" +msgstr "Externe Abspielprogramme" Index: externalplayer-0.1.0/po/externalplayer.pot =================================================================== --- externalplayer-0.1.0/po/externalplayer.pot +++ externalplayer-0.1.0/po/externalplayer.pot 2008-04-23 22:32:50.000000000 +0300 @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://qa.mandriva.com/\n" +"POT-Creation-Date: 2008-04-23 22:32+0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: externalplayer.c:93 externalplayer.c:125 +msgid "External Players" +msgstr ""