summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-10-14 09:29:59 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-10-14 09:29:59 +0200
commit714e61b090f1a466978a84bde52210483c99f142 (patch)
treec9749c4f659b065c991d40460804d98e481a226f
parentde45da896a4cd46aa3ffbf07642b8f3bc448c216 (diff)
downloadvdr-714e61b090f1a466978a84bde52210483c99f142.tar.gz
vdr-714e61b090f1a466978a84bde52210483c99f142.tar.bz2
Added a note about how to initiate internationalization support to the README.i18n file; the Makefile generated by the 'newplugin' script now has the 'i18n' target automatically create an initial 'po/pluginname.pot' file
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY9
-rw-r--r--PLUGINS/src/hello/Makefile4
-rw-r--r--PLUGINS/src/skincurses/Makefile4
-rw-r--r--README.i18n18
-rwxr-xr-xi18n-to-gettext.pl4
-rwxr-xr-xnewplugin4
7 files changed, 36 insertions, 11 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 750ded64..6c4bc6bd 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2199,3 +2199,7 @@ Timo Eskola <timo@tolleri.net>
Elias Luttinen <el@iki.fi>
for improving the description of where logging goes in the INSTALL file
+
+Torsten Kunkel <vdrml@tkunkel.de>
+ for pointing out that it was not obvious how to initiate internationalization
+ support for a plugin
diff --git a/HISTORY b/HISTORY
index 85d63be5..88e24650 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5417,7 +5417,7 @@ Video Disk Recorder Revision History
- Fixed checking for ttDolbyLast in cDevice::SetCurrentAudioTrack() (thanks
to Marco Schlüßler).
-2007-10-13: Version 1.5.10
+2007-10-14: Version 1.5.10
- Implemented handling DVB subtitles (thanks to Marco Schlüßler, and also to
Pekka Virtanen for writing the subtitle plugin, which helped in implementing
@@ -5471,3 +5471,10 @@ Video Disk Recorder Revision History
example ~cMyReceiver() in PLUGINS.html (thanks to Marco Schlüßler).
- Improved the description of where logging goes in the INSTALL file (thanks to
Elias Luttinen).
+- Added a note about how to initiate internationalization support to the
+ README.i18n file. The Makefile generated by the 'newplugin' script now has the
+ 'i18n' target automatically create an initial 'po/pluginname.pot' file.
+ Plugin authors may want to add the '$(I18Npot)' dependency to the 'i18n'
+ target in their Makefiles, as in
+ i18n: $(I18Npot) $(I18Nmo)
+ (based on a suggestion by Torsten Kunkel).
diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile
index eac0f83b..92e8af4a 100644
--- a/PLUGINS/src/hello/Makefile
+++ b/PLUGINS/src/hello/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.19 2007/10/13 09:28:10 kls Exp $
+# $Id: Makefile 1.20 2007/10/14 09:23:04 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -85,7 +85,7 @@ $(I18Npot): $(wildcard *.c)
$(I18Npo): $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
-i18n: $(I18Nmo)
+i18n: $(I18Npot) $(I18Nmo)
@mkdir -p $(LOCALEDIR)
for i in $(I18Ndirs); do\
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile
index 84933bff..3eea4ddf 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.12 2007/10/13 09:28:28 kls Exp $
+# $Id: Makefile 1.13 2007/10/14 09:23:25 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -83,7 +83,7 @@ $(I18Npot): $(wildcard *.c)
$(I18Npo): $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
-i18n: $(I18Nmo)
+i18n: $(I18Npot) $(I18Nmo)
@mkdir -p $(LOCALEDIR)
for i in $(I18Ndirs); do\
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
diff --git a/README.i18n b/README.i18n
index 2df58489..0c505b6f 100644
--- a/README.i18n
+++ b/README.i18n
@@ -7,6 +7,19 @@ these texts. The instructions apply equally to VDR itself or any
plugin.
+How to initiate internationalization support
+--------------------------------------------
+
+Not every plugin necessarily has texts that are visible to the
+user, therefore there is by default no 'po' directory.
+If your plugin source contains texts marked for translation
+with tr(), you need to
+
+- Change into the source directory.
+- Enter the command 'mkdir po'.
+
+After that, continue with "How to translate to a new language".
+
How to translate to a new language
----------------------------------
@@ -18,15 +31,16 @@ How to translate to a new language
will create a new *.po file for your language.
- Edit the new *.po file and translate the texts.
You can do this either with your favorite text editor, or
- with a specialited tool like POEdit, GTranslator, KBabel
+ with a specialized tool like POEdit, GTranslator, KBabel
or whatever you have.
How to maintain an existing language file
-----------------------------------------
+- Change into the source directory.
- Do a 'make i18n' to have the *.po files brought up-to-date
with the texts in the source code.
-- Edit the new *.po file and translate the texts.
+- Edit the modified *.po file(s) and translate the texts.
If you are using a plain text editor, you should search for
empty strings ("") to find new, untranslated texts. Also,
look for the "fuzzy" keyword to find translations that have
diff --git a/i18n-to-gettext.pl b/i18n-to-gettext.pl
index e46c6440..b17f7d63 100755
--- a/i18n-to-gettext.pl
+++ b/i18n-to-gettext.pl
@@ -10,7 +10,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: i18n-to-gettext.pl 1.4 2007/08/24 13:19:34 kls Exp $
+# $Id: i18n-to-gettext.pl 1.5 2007/10/14 09:29:59 kls Exp $
# How to convert an actual plugin:
#
@@ -319,7 +319,7 @@ $(I18Npot): $(wildcard *.c)
$(I18Npo): $(I18Npot)
msgmerge -U --no-wrap -F --backup=none -q $@ $<
-i18n: $(I18Nmo)
+i18n: $(I18Npot) $(I18Nmo)
@mkdir -p $(LOCALEDIR)
for i in $(I18Ndirs); do\
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
diff --git a/newplugin b/newplugin
index 587ccb4c..57d814e8 100755
--- a/newplugin
+++ b/newplugin
@@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: newplugin 1.37 2007/10/13 09:28:55 kls Exp $
+# $Id: newplugin 1.38 2007/10/14 09:13:17 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@@ -144,7 +144,7 @@ I18Npot = \$(PODIR)/\$(PLUGIN).pot
\$(I18Npo): \$(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q \$\@ \$<
-i18n: \$(I18Nmo)
+i18n: \$(I18Npot) \$(I18Nmo)
\@mkdir -p \$(LOCALEDIR)
for i in \$(I18Ndirs); do\\
mkdir -p \$(LOCALEDIR)/\$\$i/LC_MESSAGES;\\