Version 1.5.8

- Added missing install-i18n to the install target in the Makefile (reported
  by Joachim Wilke).
- Fixed a faulty comment in Make.config.template (reported by Marco Schlüßler).
- Improved i18n-to-gettext.pl (thanks to Matthias Schwarzott).
- Moved the "all" target in plugin Makefiles before the "Implicit rules",
  so that a plain "make" will compile everything (suggested by Matthias
  Schwarzott). The "newplugin" script has been changed accordingly.
  Plugin authors may want to change their Makefiles, too.
- 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).
- Checking the string for NULL in I18nTranslate().
- Updated the French OSD texts (thanks to Bruno Roussel).
- Some optimizations in cDvbDevice::SetChannelDevice() (thanks to Tobias Bratfisch).
- Optimized cMenuEditChrItem::Set() (thanks to Tobias Bratfisch).
- Optimized cNitFilter::Process() (thanks to Tobias Bratfisch).
- Reduced the number of time(NULL) calls in vdr.c's main loop to a single call
  (thanks to Tobias Bratfisch).
- Changed cBitmap::DrawText() to always draw the background unless ColorBg
  is clrTransparent (thanks to Christoph Haubrich).
- The "Setup/OSD/Language" menu now only shows those languages that actually
  have a locale (suggested by Anssi Hannula).
- Now using setenv() instead of setlocale() to set the language for gettext()
  (suggested by Anssi Hannula; thanks also to Ludwig Nussel for a hint on using
  _nl_msg_cat_cntr).
- When scanning the locale directory, VDR now explicitly looks for a file named
  vdr.mo. Text files for plugins are now named "vdr-name.mo", when "name" is the
  name of the plugin. The "newplugin" script has been changed accordingly, and
  plugin authors should change their Makefiles, too.
This commit is contained in:
Klaus Schmidinger
2007-08-19 18:00:00 +02:00
parent 4c65b525dc
commit e5a2aa41c9
60 changed files with 931 additions and 677 deletions

View File

@@ -51,3 +51,9 @@ VDR Plugin 'skincurses' Revision History
2007-07-20: Version 0.1.2
- Fixed clearing color buttons.
2007-08-15: Version 0.1.3
- Moved the "all" target in the Makefile before the "Implicit rules",
so that a plain "make" will compile everything.
- Added internationalization.

View File

@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.8 2007/06/10 16:19:08 kls Exp $
# $Id: Makefile 1.11 2007/08/19 14:19:07 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -47,6 +47,10 @@ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
OBJS = $(PLUGIN).o
### The main target:
all: libvdr-$(PLUGIN).so i18n
### Implicit rules:
%.o: %.c
@@ -61,9 +65,32 @@ $(DEPFILE): Makefile
-include $(DEPFILE)
### Targets:
### Internationalization (I18N):
all: libvdr-$(PLUGIN).so
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='<vdr-bugs@cadsoft.de>' -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/vdr-$(PLUGIN).mo;\
done
### Targets:
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -lncursesw -o $@
@@ -78,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* *~

View File

@@ -0,0 +1,32 @@
# VDR plugin language source file.
# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
# This file is distributed under the same license as the VDR package.
# Klaus Schmidinger <kls@cadsoft.de>, 2007
#
msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\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 <kls@cadsoft.de>\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"
#: skincurses.c:15
msgid "A text only skin"
msgstr "Eine reine Text-Oberfl<66>che"
#: skincurses.c:566
msgid "Key$Mute"
msgstr "Stumm"
#: skincurses.c:569
msgid "Volume "
msgstr "Lautst<73>rke"
#: skincurses.c:699
msgid "Text mode"
msgstr "Text-Modus"

View File

@@ -0,0 +1,32 @@
# VDR plugin language source file.
# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
# This file is distributed under the same license as the VDR package.
# Rolf Ahrenberg <rahrenbe@cc.hut.fi>, 2007
#
msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\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 <rahrenbe@cc.hut.fi>\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"
#: 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 "<22><>nenvoimakkuus "
#: skincurses.c:699
msgid "Text mode"
msgstr "Teksti"

View File

@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: skincurses.c 1.15 2007/07/20 14:45:07 kls Exp $
* $Id: skincurses.c 1.17 2007/08/15 14:01:54 kls Exp $
*/
#include <ncurses.h>
@@ -11,8 +11,8 @@
#include <vdr/plugin.h>
#include <vdr/skins.h>
static const char *VERSION = "0.1.2";
static const char *DESCRIPTION = "A text only skin";
static const char *VERSION = "0.1.3";
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);