From 3883fb8e16514df9b099b88ede426350165b3dbb Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 15 Aug 2007 14:11:11 +0200 Subject: [PATCH] Added i18n to the 'skincurses' plugin --- CONTRIBUTORS | 1 + HISTORY | 2 ++ PLUGINS/src/skincurses/HISTORY | 1 + PLUGINS/src/skincurses/Makefile | 30 +++++++++++++++++++++++++-- PLUGINS/src/skincurses/po/de_DE.po | 32 +++++++++++++++++++++++++++++ PLUGINS/src/skincurses/po/fi_FI.po | 32 +++++++++++++++++++++++++++++ PLUGINS/src/skincurses/skincurses.c | 8 ++++---- 7 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 PLUGINS/src/skincurses/po/de_DE.po create mode 100644 PLUGINS/src/skincurses/po/fi_FI.po diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8de5bf60..e1888299 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1017,6 +1017,7 @@ Rolf Ahrenberg for suggesting to change the parameter "OSD font" to "Default font" in "Setup/OSD" for improving cControl::Launch() to keep 'control' from pointing to uninitialized memory + for adding internationalization to the "skincurses" plugin Ralf Klueber for reporting a bug in cutting a recording if there is only a single editing mark diff --git a/HISTORY b/HISTORY index 062ef568..4ce1ac7b 100644 --- a/HISTORY +++ b/HISTORY @@ -5359,3 +5359,5 @@ Video Disk Recorder Revision History - Added DESTDIR and PREFIX handling to the Makefile (thanks to Matthias Schwarzott). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). +- Added internationalization to the "skincurses" plugin (thanks to Rolf + Ahrenberg). diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY index 3d7eed42..02065a4d 100644 --- a/PLUGINS/src/skincurses/HISTORY +++ b/PLUGINS/src/skincurses/HISTORY @@ -56,3 +56,4 @@ VDR Plugin 'skincurses' Revision History - Moved the "all" target in the Makefile before the "Implicit rules", so that a plain "make" will compile everything. +- Added internationalization. diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile index 0534eb57..5f4a0e92 100644 --- a/PLUGINS/src/skincurses/Makefile +++ b/PLUGINS/src/skincurses/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.9 2007/08/15 13:05:54 kls Exp $ +# $Id: Makefile 1.10 2007/08/15 14:00:27 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -49,7 +49,7 @@ OBJS = $(PLUGIN).o ### The main target: -all: libvdr-$(PLUGIN).so +all: libvdr-$(PLUGIN).so i18n ### Implicit rules: @@ -65,6 +65,31 @@ $(DEPFILE): Makefile -include $(DEPFILE) +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(wildcard $(PODIR)/*.po) +I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) +I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file)))) +I18Npot = $(PODIR)/$(PLUGIN).pot + +%.mo: %.po + msgfmt -c -o $@ $< + +$(I18Npot): $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='' -o $@ $(wildcard *.c) + +$(I18Npo): $(I18Npot) + msgmerge -U --no-wrap -F --backup=none -q $@ $< + +i18n: $(I18Nmo) + @mkdir -p $(LOCALEDIR) + for i in $(I18Ndirs); do\ + mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\ + cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(PLUGIN).mo;\ + done + ### Targets: libvdr-$(PLUGIN).so: $(OBJS) @@ -80,4 +105,5 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ diff --git a/PLUGINS/src/skincurses/po/de_DE.po b/PLUGINS/src/skincurses/po/de_DE.po new file mode 100644 index 00000000..e80cdc63 --- /dev/null +++ b/PLUGINS/src/skincurses/po/de_DE.po @@ -0,0 +1,32 @@ +# VDR plugin language source file. +# Copyright (C) 2007 Klaus Schmidinger +# This file is distributed under the same license as the VDR package. +# Klaus Schmidinger , 2007 +# +msgid "" +msgstr "" +"Project-Id-Version: VDR 1.5.7\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-08-15 16:04+0200\n" +"PO-Revision-Date: 2007-08-15 16:07+0200\n" +"Last-Translator: Klaus Schmidinger \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#: skincurses.c:15 +msgid "A text only skin" +msgstr "Eine reine Text-Oberfläche" + +#: skincurses.c:566 +msgid "Key$Mute" +msgstr "Stumm" + +#: skincurses.c:569 +msgid "Volume " +msgstr "Lautstärke" + +#: skincurses.c:699 +msgid "Text mode" +msgstr "Text-Modus" diff --git a/PLUGINS/src/skincurses/po/fi_FI.po b/PLUGINS/src/skincurses/po/fi_FI.po new file mode 100644 index 00000000..d4a47429 --- /dev/null +++ b/PLUGINS/src/skincurses/po/fi_FI.po @@ -0,0 +1,32 @@ +# VDR plugin language source file. +# Copyright (C) 2007 Klaus Schmidinger +# This file is distributed under the same license as the VDR package. +# Rolf Ahrenberg , 2007 +# +msgid "" +msgstr "" +"Project-Id-Version: VDR 1.5.7\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-08-14 20:54+0300\n" +"PO-Revision-Date: 2007-08-14 20:48+0300\n" +"Last-Translator: Rolf Ahrenberg \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#: skincurses.c:15 +msgid "A text only skin" +msgstr "Tekstipohjainen ulkoasu" + +#: skincurses.c:566 +msgid "Key$Mute" +msgstr "Mykistys" + +#: skincurses.c:569 +msgid "Volume " +msgstr "Äänenvoimakkuus " + +#: skincurses.c:699 +msgid "Text mode" +msgstr "Teksti" diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index 148d12ca..0553de9c 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 1.16 2007/08/15 13:19:05 kls Exp $ + * $Id: skincurses.c 1.17 2007/08/15 14:01:54 kls Exp $ */ #include @@ -12,7 +12,7 @@ #include static const char *VERSION = "0.1.3"; -static const char *DESCRIPTION = "A text only skin"; +static const char *DESCRIPTION = trNOOP("A text only skin"); static const char *MAINMENUENTRY = NULL; // --- cCursesFont ----------------------------------------------------------- @@ -738,13 +738,13 @@ public: cPluginSkinCurses(void); virtual ~cPluginSkinCurses(); virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } + virtual const char *Description(void) { return tr(DESCRIPTION); } virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); virtual bool Initialize(void); virtual bool Start(void); virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } + virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } virtual cOsdObject *MainMenuAction(void); virtual cMenuSetupPage *SetupMenu(void); virtual bool SetupParse(const char *Name, const char *Value);