From 4a3c752bcaf2d1cf3208e55138c1f8fde75a65c7 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 17 Aug 2003 22:04:55 +0000 Subject: [PATCH] initialize gettext stuff, plus a few string i18ns Original commit message from CVS: initialize gettext stuff, plus a few string i18ns --- common | 2 +- gst/gst.c | 29 ++++++++++++++++------------- gst/gst_private.h | 5 ++--- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/common b/common index 6757dae288..b4a839c99c 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 6757dae2885c2c09ad6db243c73946ef387bb044 +Subproject commit b4a839c99c0bf2d4903824426ef3cc0d4b0ad992 diff --git a/gst/gst.c b/gst/gst.c index 41c343bbb5..efa370d059 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -110,21 +110,21 @@ enum { */ static const struct poptOption gstreamer_options[] = { {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-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, "Make all warnings fatal", 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, N_("Make all warnings fatal"), NULL}, #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", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, "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-disable-debug", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_DISABLE, "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-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, 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, N_("disable color debugging output"), NULL}, + {"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, N_("print available debug categories and exit"), NULL}, #endif - {"gst-disable-cpu-opt",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DISABLE_CPU_OPT,"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-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-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-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, "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-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, N_("enable verbose plugin loading diagnostics"), NULL}, + {"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, 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, N_("scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"}, + {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("registry to use") , "REGISTRY"}, POPT_TABLEEND }; @@ -396,6 +396,9 @@ init_pre (void) /* we need threading to be enabled right here */ _gst_debug_init(); + bindtextdomain (GETTEXT_PACKAGE, GST_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + #ifndef GST_DISABLE_REGISTRY { const gchar *debug_list; diff --git a/gst/gst_private.h b/gst/gst_private.h index 400c6d5afe..1c20374ab6 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -29,10 +29,10 @@ #endif /***** until we have gettext set up properly, don't even try this*/ -#if 0 + # ifdef ENABLE_NLS # include -# define _(String) dgettext(PACKAGE,String) +# define _(String) dgettext(GETTEXT_PACKAGE,String) # ifdef gettext_noop # define N_(String) gettext_noop(String) # else /* gettext_noop */ @@ -47,7 +47,6 @@ # define dcgettext(Domain,String,Type) (String) # define bindtextdomain(Domain,Directory) (Domain) # endif /* ENABLE_NLS */ -#endif #include #include