initialize gettext stuff, plus a few string i18ns

Original commit message from CVS:
initialize gettext stuff, plus a few string i18ns
This commit is contained in:
David Schleef 2003-08-17 22:04:55 +00:00
parent 20569e76f8
commit 4a3c752bca
3 changed files with 19 additions and 17 deletions

2
common

@ -1 +1 @@
Subproject commit 6757dae2885c2c09ad6db243c73946ef387bb044 Subproject commit b4a839c99c0bf2d4903824426ef3cc0d4b0ad992

View file

@ -110,21 +110,21 @@ enum {
*/ */
static const struct poptOption gstreamer_options[] = { static const struct poptOption gstreamer_options[] = {
{NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *) &init_popt_callback, 0, NULL, NULL}, {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *) &init_popt_callback, 0, NULL, NULL},
{"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, "Print the GStreamer version", NULL}, {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, N_("Print the GStreamer version"), NULL},
{"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, "Make all warnings fatal", NULL}, {"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, N_("Make all warnings fatal"), NULL},
#ifndef GST_DISABLE_GST_DEBUG #ifndef GST_DISABLE_GST_DEBUG
{"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, "default debug level from 1 (only error) to 5 (anything) or 0 for no output", "LEVEL"}, {"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, N_("default debug level from 1 (only error) to 5 (anything) or 0 for no output"), "LEVEL"},
{"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, "colon-seperated list of category=name pairs to use specific levels", "CATEGORIES"}, {"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, N_("colon-seperated list of category=name pairs to use specific levels"), "CATEGORIES"},
{"gst-debug-no-color", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_NO_COLOR, "disable color debugging output", NULL}, {"gst-debug-no-color", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_NO_COLOR, N_("disable color debugging output"), NULL},
{"gst-disable-debug", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_DISABLE, "disable debugging"}, {"gst-disable-debug", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_DISABLE, N_("disable debugging")},
{"gst-debug-help", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_HELP, "print available debug categories and exit", NULL}, {"gst-debug-help", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_HELP, N_("print available debug categories and exit"), NULL},
#endif #endif
{"gst-disable-cpu-opt",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DISABLE_CPU_OPT,"Disable accelerated CPU instructions", NULL}, {"gst-disable-cpu-opt",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DISABLE_CPU_OPT,N_("Disable accelerated CPU instructions"), NULL},
{"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, "enable verbose plugin loading diagnostics", NULL}, {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, N_("enable verbose plugin loading diagnostics"), NULL},
{"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, "'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins", "PATHS"}, {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, N_("'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins"), "PATHS"},
{"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, "comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH", "PLUGINS"}, {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), "PLUGINS"},
{"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, "scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)", "SCHEDULER"}, {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"},
{"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, "registry to use" , "REGISTRY"}, {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("registry to use") , "REGISTRY"},
POPT_TABLEEND POPT_TABLEEND
}; };
@ -396,6 +396,9 @@ init_pre (void)
/* we need threading to be enabled right here */ /* we need threading to be enabled right here */
_gst_debug_init(); _gst_debug_init();
bindtextdomain (GETTEXT_PACKAGE, GST_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#ifndef GST_DISABLE_REGISTRY #ifndef GST_DISABLE_REGISTRY
{ {
const gchar *debug_list; const gchar *debug_list;

View file

@ -29,10 +29,10 @@
#endif #endif
/***** until we have gettext set up properly, don't even try this*/ /***** until we have gettext set up properly, don't even try this*/
#if 0
# ifdef ENABLE_NLS # ifdef ENABLE_NLS
# include <libintl.h> # include <libintl.h>
# define _(String) dgettext(PACKAGE,String) # define _(String) dgettext(GETTEXT_PACKAGE,String)
# ifdef gettext_noop # ifdef gettext_noop
# define N_(String) gettext_noop(String) # define N_(String) gettext_noop(String)
# else /* gettext_noop */ # else /* gettext_noop */
@ -47,7 +47,6 @@
# define dcgettext(Domain,String,Type) (String) # define dcgettext(Domain,String,Type) (String)
# define bindtextdomain(Domain,Directory) (Domain) # define bindtextdomain(Domain,Directory) (Domain)
# endif /* ENABLE_NLS */ # endif /* ENABLE_NLS */
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>