putting i18n in place for plugins

Original commit message from CVS:
putting i18n in place for plugins
parent 39916f3f
2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org>
* autogen.sh:
adding autopoint invocation
* Makefile.am:
* configure.ac:
* gst-libs/gst/gettext.h:
adding gettext bits
* ext/audiofile/gstafsink.c: (gst_afsink_plugin_init):
* ext/audiofile/gstafsrc.c: (gst_afsrc_plugin_init):
* ext/gnomevfs/gstgnomevfs.c: (plugin_init):
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_open_file),
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_open_file):
* ext/sndfile/gstsf.c: (gst_sf_loop), (plugin_init):
* gst-libs/gst/gst-i18n-plugin.h:
* gst/avi/gstavi.c: (plugin_init):
* sys/dxr3/dxr3init.c: (plugin_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_write_data):
* sys/oss/gstossaudio.c: (plugin_init):
* sys/oss/gstosselement.c: (gst_osselement_open_audio):
* sys/v4l/gstv4l.c: (plugin_init):
* sys/v4l/v4l_calls.c: (gst_v4l_open):
* sys/v4l2/gstv4l2.c: (plugin_init):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_get_norm), (gst_v4l2_set_norm),
(gst_v4l2_get_input), (gst_v4l2_set_input), (gst_v4l2_get_output),
(gst_v4l2_set_output), (gst_v4l2_get_frequency),
(gst_v4l2_set_frequency), (gst_v4l2_signal_strength),
(gst_v4l2_get_attribute), (gst_v4l2_set_attribute):
make sure locale and translation domain are set
fix translated strings
* po/.cvsignore:
* po/Makevars:
* po/POTFILES.in:
* po/nl.po:
put translation files into place
* sys/xvideo/imagetest.c: (main):
* ext/dv/demo-play.c: (main):
fix unnecessary translations
2004-01-19 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* ext/sndfile/gstsf.c:
......@@ -22,6 +22,7 @@ SUBDIRS=gst-libs \
tools \
testsuite \
po \
DIST_SUBDIRS=gst-libs \
......@@ -30,6 +31,7 @@ DIST_SUBDIRS=gst-libs \
tools \
gconf \
testsuite \
po \
EXTRA_DIST=gst-plugins.spec depcomp \
......@@ -35,6 +35,8 @@ version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autocon
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
version_check "automake" "$AUTOMAKE automake automake-1.7 automake-1.6 automake-1.5" \
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
version_check "autopoint" "autopoint" \
"ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 4 || DIE=1
version_check "libtoolize" "$LIBTOOLIZE libtoolize libtoolize14" \
"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
version_check "pkg-config" "" \
......@@ -59,6 +61,28 @@ fi
toplevel_check $srcfile
# autopoint
# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
if test -e mkinstalldirs; then rm mkinstalldirs; fi
# first remove patch if necessary, then run autopoint, then reapply
if test -f po/Makefile.in.in;
patch -p0 -R < common/gettext.patch
tool_run "$autopoint"
patch -p0 < common/gettext.patch
# autopoint
# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
if test -e mkinstalldirs; then rm mkinstalldirs; fi
# first remove patch if necessary, then run autopoint, then reapply
if test -f po/Makefile.in.in;
patch -p0 -R < common/gettext.patch
tool_run "$autopoint"
patch -p0 < common/gettext.patch
tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
tool_run "$libtoolize" "--copy --force"
tool_run "$autoheader"
......@@ -46,6 +46,20 @@ AM_PROG_CC_STDC
dnl the gettext stuff needed
[gettext package name])
dnl define LOCALEDIR in config.h
AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
[gettext locale dir])
dnl decide on error flags
......@@ -1695,6 +1709,7 @@ tools/Makefile
......@@ -23,6 +23,8 @@
# include "config.h"
#include "gst/gst-i18n-plugin.h"
#include "gstgnomevfs.h"
#include <gst/gst.h>
......@@ -36,6 +38,12 @@ plugin_init(GstPlugin *plugin)
return FALSE;
setlocale (LC_ALL, "");
textdomain (GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
return TRUE;
......@@ -283,7 +283,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
gst_element_error (sink, RESOURCE, OPEN_WRITE,
(_("Error opening vfs file \"%s\""), sink->filename),
(_("Could not open vfs file \"%s\" for writing"), sink->filename),
return FALSE;
......@@ -308,7 +308,7 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink *sink)
if (result != GNOME_VFS_OK)
gst_element_error (sink, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), sink->filename),
(_("Could not close vfs file \"%s\""), sink->filename),
......@@ -30,7 +30,7 @@
#include "config.h"
#include "gst/gst-i18n-plugin.h"
#include "gst-libs/gst/gst-i18n-plugin.h"
#include "gstgnomevfs.h"
......@@ -1052,7 +1052,7 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
src->uri = gnome_vfs_uri_new(src->filename);
if (!src->uri) {
gst_element_error (src, RESOURCE, OPEN_READ,
(_("Error opening URI \"%s\" for reading"), src->filename), GST_ERROR_SYSTEM);
(_("Could not open vfs file \"%s\" for reading"), src->filename), GST_ERROR_SYSTEM);
return FALSE;
......@@ -1075,7 +1075,7 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
escaped = gnome_vfs_unescape_string_for_display (src->filename);
gst_element_error (src, RESOURCE, OPEN_READ,
(_("Error opening vfs file \"%s\""), escaped),
(_("Could not open vfs file \"%s\" for reading"), escaped),
(gnome_vfs_result_to_string (result)));
g_free (escaped);
return FALSE;
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
chokes if dcgettext is defined as a macro. So include it now, to make
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
as well because people using "gettext.h" will not include <libintl.h>,
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
is OK. */
#if defined(__sun)
# include <locale.h>
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# define gettext(Msgid) ((const char *) (Msgid))
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define textdomain(Domainname) ((const char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
The argument, String, should be a literal string. Concatenated strings
and other string expressions won't work.
The macro's expansion is not parenthesized, so that it is suitable as
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
#endif /* _LIBGETTEXT_H */
......@@ -23,15 +23,12 @@
#ifndef __GST_I18N_PLUGIN_H__
#define __GST_I18N_PLUGIN_H__
#if 0
#include "gettext.h" /* included with gettext distribution and copied */
# include "config.h"
#if 0
#error You must define GETTEXT_PACKAGE before including this header.
......@@ -40,10 +37,5 @@
#define _(String) dgettext (GETTEXT_PACKAGE, String)
#define N_(String) gettext_noop (String)
/* FIXME: if we need it, we can add Q_ as well, like in glib */
/* FIXME: we define them as passthrough first */
#define _(String) String
#define N_(String) String
#endif /* __GST_I18N_PLUGIN_H__ */
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = http://bugzilla.gnome.org/
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
# GStreamer plugins translated strings
# Copyright (C) 2003,2004 GStreamer core team
# This file is distributed under the same license as the GStreamer package.
# Thomas Vander Stichele <thomas@apestaart.org>, 2004.
msgid ""
msgstr ""
"Project-Id-Version: gst-plugins\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-01-19 16:09+0100\n"
"PO-Revision-Date: 2004-01-13 12:03+0100\n"
"Last-Translator: Thomas Vander Stichele <thomas@apestaart.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ext/audiofile/gstafsink.c:345 ext/sndfile/gstsf.c:601
#, c-format
msgid "Could not open file \"%s\" for writing"
msgstr "Kon bestand \"%s\" niet openen voor schrijven"
#: ext/audiofile/gstafsink.c:368 ext/audiofile/gstafsrc.c:372
#, c-format
msgid "Error closing file \"%s\""
msgstr "Kon bestand \"%s\" niet sluiten"
#: ext/audiofile/gstafsrc.c:314
#, c-format
msgid "Could not open file \"%s\" for reading"
msgstr "Kon bestand \"%s\" niet openen voor lezen"
#: ext/gnomevfs/gstgnomevfssrc.c:1055 ext/gnomevfs/gstgnomevfssrc.c:1078
#, c-format
msgid "Could not open vfs file \"%s\" for reading"
msgstr "Kon vfs-bestand \"%s\" niet openen voor lezen"
#: ext/gnomevfs/gstgnomevfssink.c:286
#, c-format
msgid "Could not open vfs file \"%s\" for writing"
msgstr "Kon vfs-bestand \"%s\" niet openen voor schrijven"
#: ext/gnomevfs/gstgnomevfssink.c:311
#, c-format
msgid "Could not close vfs file \"%s\""
msgstr "Kon vfs-bestand \"%s\" niet sluiten"
#: ext/sndfile/gstsf.c:563
msgid "No filename specified"
msgstr "Geen bestandsnaam gegeven"
#: ext/sndfile/gstsf.c:793
#, c-format
msgid "Could not write to file \"%s\""
msgstr "Kon niet schrijven naar bestand \"%s\""
#: gst/avi/gstavimux.c:989
msgid "No or invalid input audio, AVI stream will be corrupt"
msgstr "Geen of foutief invoergeluid, AVI zal corrupt zijn"
#: sys/dxr3/dxr3audiosink.c:313
#, c-format
msgid "Could not open audio device \"%s\" for writing"
msgstr "Kon audio-apparaat \"%s\" niet openen voor schrijven"
#: sys/dxr3/dxr3audiosink.c:325 sys/dxr3/dxr3videosink.c:292
#, c-format
msgid "Could not open control device \"%s\" for writing"
msgstr "Kon controle-apparaat \"%s\" niet openen voor schrijven"
#: sys/dxr3/dxr3audiosink.c:359
#, c-format
msgid "Could not configure audio device \"%s\""
msgstr "Kon audio-apparaat \"%s\" niet configureren"
#: sys/dxr3/dxr3audiosink.c:373 sys/dxr3/dxr3audiosink.c:410
#, c-format
msgid "Could not set audio device \"%s\" to %d Hz"
msgstr "Kon audio-apparaat \"%s\" niet instellen op %d Hz"
#: sys/dxr3/dxr3audiosink.c:438
#, c-format
msgid "Could not close audio device \"%s\""
msgstr "Kon audio-apparaat \"%s\" niet sluiten"
#: sys/dxr3/dxr3audiosink.c:445 sys/dxr3/dxr3videosink.c:319
#, c-format
msgid "Could not close control device \"%s\""
msgstr "Kon controle-apparaat \"%s\" niet sluiten"
#: sys/dxr3/dxr3videosink.c:280
#, c-format
msgid "Could not open video device \"%s\" for writing"
msgstr "Kon video-apparaat \"%s\" niet openen voor schrijven"
#: sys/dxr3/dxr3videosink.c:311
#, c-format
msgid "Could not close video device \"%s\""
msgstr "Kon video-apparaat \"%s\" niet sluiten"
#: sys/dxr3/dxr3videosink.c:467 sys/v4l2/v4l2src_calls.c:121
#, c-format
msgid "Could not write to device \"%s\""
msgstr "Kon niet schrijven naar apparaat \"%s\""
#: sys/oss/gstosselement.c:684
#, c-format
msgid "OSS device \"%s\" is already in use by another program"
msgstr "OSS-apparaat \"%s\" is al in gebruik door een ander programma"
#: sys/oss/gstosselement.c:690 sys/oss/gstosselement.c:693
#, c-format
msgid "Could not access device \"%s\", check its permissions"
msgstr "Kon geen toegang krijgen tot apparaat \"%s\", controleer de permissies"
#: sys/oss/gstosselement.c:699
#, c-format
msgid "Device \"%s\" does not exist"
msgstr "Apparaat \"%s\" bestaat niet"
#: sys/oss/gstosselement.c:705
#, c-format
msgid "Could not open device \"%s\" for writing"
msgstr "Kon apparaat \"%s\" niet openen voor schrijven"
#: sys/oss/gstosselement.c:708
#, c-format
msgid "Could not open device \"%s\" for reading"
msgstr "Kon apparaat \"%s\" niet openen voor lezen"
#: sys/oss/gstossmixer.c:86
msgid "Volume"
msgstr "Volume"
#: sys/oss/gstossmixer.c:87
msgid "Bass"
msgstr "Lage Tonen"
#: sys/oss/gstossmixer.c:88
msgid "Treble"
msgstr "Hoge Tonen"
#: sys/oss/gstossmixer.c:89
msgid "Synth"
msgstr "Synthesizer"
#: sys/oss/gstossmixer.c:90
msgid "PCM"
msgstr "PCM"
#: sys/oss/gstossmixer.c:91
msgid "Speaker"
msgstr "Luidspreker"
#: sys/oss/gstossmixer.c:92
msgid "Line-in"
msgstr "Lijningang"
#: sys/oss/gstossmixer.c:93
msgid "Microphone"
msgstr "Microfoon"
#: sys/oss/gstossmixer.c:94
msgid "CD"
msgstr "CD"
#: sys/oss/gstossmixer.c:95
msgid "Mixer"
msgstr "Mixer"
#: sys/oss/gstossmixer.c:96
msgid "PCM-2"
msgstr "PCM-2"
#: sys/oss/gstossmixer.c:97
msgid "Record"
msgstr "Opname"
#: sys/oss/gstossmixer.c:98
msgid "In-gain"
msgstr "Invoer-volume"
#: sys/oss/gstossmixer.c:99
msgid "Out-gain"
msgstr "Uitvoer-volume"
#: sys/oss/gstossmixer.c:100
msgid "Line-1"
msgstr "Lijningang 1"
#: sys/oss/gstossmixer.c:101
msgid "Line-2"
msgstr "Lijningang 2"
#: sys/oss/gstossmixer.c:102
msgid "Line-3"
msgstr "Lijningang 3"
#: sys/oss/gstossmixer.c:103
msgid "Digital-1"
msgstr "Digitaal 1"
#: sys/oss/gstossmixer.c:104
msgid "Digital-2"
msgstr "Digitaal 2"
#: sys/oss/gstossmixer.c:105
msgid "Digital-3"
msgstr "Digitaal 3"
#: sys/oss/gstossmixer.c:106
msgid "Phone-in"
msgstr "Telefoon-ingang"
#: sys/oss/gstossmixer.c:107
msgid "Phone-out"
msgstr "Koptelefoon-uitgang"
#: sys/oss/gstossmixer.c:108
msgid "Video"
msgstr "Video"
#: sys/oss/gstossmixer.c:109
msgid "Radio"
msgstr "Radio"
#: sys/oss/gstossmixer.c:110
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:115
msgid "No device specified"
msgstr "Geen apparaat gegeven"
#: sys/v4l/v4l_calls.c:124 sys/v4l2/v4l2_calls.c:413
#, c-format
msgid "Could not open device \"%s\" for reading and writing"
msgstr "Kon apparaat \"%s\" niet openen voor lezen en schrijven"
#: sys/v4l/v4l_calls.h:47
msgid "Device is not open"
msgstr "Apparaat is niet open"
#: sys/v4l/v4l_calls.h:56
msgid "Device is open"
msgstr "Apparaat is open"
#: sys/v4l2/v4l2_calls.c:427
#, c-format
msgid "Device \"%s\" is not a capture device"
msgstr "Apparaat \"%s\" is geen opname-apparaat"
#: sys/v4l2/v4l2src_calls.c:249
#, c-format
msgid "Could not get buffers from device \"%s\""
msgstr "Kon geen buffers lezen van apparaat \"%s\""
#: sys/v4l2/v4l2src_calls.c:256
#, c-format
msgid "Could not get enough buffers from device \"%s\""
msgstr "Kon niet genoeg buffers lezen van apparaat \"%s\""
......@@ -21,6 +21,8 @@
#include "config.h"
#include "gst/gst-i18n-plugin.h"
#include <gst/gst.h>
#include "gstv4lelement.h"
......@@ -46,6 +48,12 @@ plugin_init (GstPlugin *plugin)
return FALSE;
setlocale (LC_ALL, "");
textdomain (GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
return TRUE;
......@@ -121,7 +121,7 @@ gst_v4l_open (GstV4lElement *v4lelement)
if (!GST_V4L_IS_OPEN(v4lelement))
gst_element_error (v4lelement, RESOURCE, OPEN_READ_WRITE,
(_("Could not open device \"%s\" for reading"), v4lelement->videodev),
(_("Could not open device \"%s\" for reading and writing"), v4lelement->videodev),
return FALSE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment