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: avolctl-0.3b/Makefile =================================================================== --- avolctl-0.3b/Makefile +++ avolctl-0.3b/Makefile 2008-04-17 20:11:10.000000000 +0300 @@ -46,7 +46,7 @@ ### The object files (add further files here): -OBJS = $(PLUGIN).o alsa.o edit.o i18n.o +OBJS = $(PLUGIN).o alsa.o edit.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) -lasound -o $@ @@ -79,4 +104,5 @@ @echo Distribution package created as $(PACKAGE).tgz clean: + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ Index: avolctl-0.3b/avolctl.c =================================================================== --- avolctl-0.3b/avolctl.c +++ avolctl-0.3b/avolctl.c 2008-04-17 20:11:10.000000000 +0300 @@ -237,7 +237,7 @@ bool cPluginAvolctl::Initialize(void) { - RegisterI18n(Phrases); + return true; } Index: avolctl-0.3b/avolctl.h =================================================================== --- avolctl-0.3b/avolctl.h +++ avolctl-0.3b/avolctl.h 2008-04-17 20:11:10.000000000 +0300 @@ -2,7 +2,7 @@ #include <vdr/status.h> #include <vdr/interface.h> #include <alsa/asoundlib.h> -#include "i18n.h" + // --- linked list for setup values --- class setupvalues Index: avolctl-0.3b/i18n.c =================================================================== --- avolctl-0.3b/i18n.c +++ avolctl-0.3b/i18n.c 2008-04-17 20:11:10.000000000 +0300 @@ -1,103 +0,0 @@ -/* - * i18n.c: Internationalization - * - * See the README file for copyright information and how to reach the author. - * - * $Id: i18n.c 1.4 2004/01/16 13:28:23 kls Exp $ - */ - -#include "i18n.h" - -const tI18nPhrase Phrases[] = { - { "Hide main menu entry?", - "Eintrag im Hauptmenü verstecken?", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { "Select mixer items:", - "Regler auswählen:", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { "Controlable items:", - "Einstellbare Regler:", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { "controlable", - "einstellbar", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { "on", - "an", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { NULL } - }; Index: avolctl-0.3b/i18n.h =================================================================== --- avolctl-0.3b/i18n.h +++ avolctl-0.3b/i18n.h 2008-04-17 20:11:10.000000000 +0300 @@ -1,16 +0,0 @@ -/* - * i18n.h: Internationalization - * - * See the README file for copyright information and how to reach the author. - * - * $Id: i18n.h 1.2 2002/05/11 14:48:16 kls Exp $ - */ - -#ifndef _I18N__H -#define _I18N__H - -#include <vdr/i18n.h> - -extern const tI18nPhrase Phrases[]; - -#endif //_I18N__H Index: avolctl-0.3b/po/avolctl.pot =================================================================== --- avolctl-0.3b/po/avolctl.pot +++ avolctl-0.3b/po/avolctl.pot 2008-04-17 20:11:09.000000000 +0300 @@ -0,0 +1,45 @@ +# 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-17 20:11+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" + +#: avolctl.c:67 +msgid "Hide main menu entry?" +msgstr "" + +#: avolctl.c:69 +msgid "Select mixer items:" +msgstr "" + +#: avolctl.c:134 +msgid "Controlable items:" +msgstr "" + +#: edit.c:75 +msgid "no" +msgstr "" + +#: edit.c:83 +msgid "controlable" +msgstr "" + +#: edit.c:133 +msgid "off" +msgstr "" + +#: edit.c:133 +msgid "on" +msgstr "" Index: avolctl-0.3b/po/de_DE.po =================================================================== --- avolctl-0.3b/po/de_DE.po +++ avolctl-0.3b/po/de_DE.po 2008-04-17 20:11:09.000000000 +0300 @@ -0,0 +1,44 @@ +# VDR avolctl plugin language source file. +# Copyright (C) YEAR THE VDR-avolctl'S COPYRIGHT HOLDER +# This file is distributed under the same license as the VDR-avolctl package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: VDR-avolctl\n" +"Report-Msgid-Bugs-To: http://qa.mandriva.com/\n" +"POT-Creation-Date: 2008-04-17 20:11+0300\n" +"PO-Revision-Date: 2008-04-17 20:11+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" + +#: avolctl.c:67 +msgid "Hide main menu entry?" +msgstr "Eintrag im Hauptmenü verstecken?" + +#: avolctl.c:69 +msgid "Select mixer items:" +msgstr "Regler auswählen:" + +#: avolctl.c:134 +msgid "Controlable items:" +msgstr "Einstellbare Regler:" + +#: edit.c:75 +msgid "no" +msgstr "" + +#: edit.c:83 +msgid "controlable" +msgstr "einstellbar" + +#: edit.c:133 +msgid "off" +msgstr "" + +#: edit.c:133 +msgid "on" +msgstr "an"