Add translatable error message for when we cannot connect to the sound server, as...
authorTim-Philipp Müller <tim@centricular.net>
Tue, 18 Apr 2006 14:15:33 +0000 (14:15 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 18 Apr 2006 14:15:33 +0000 (14:15 +0000)
Original commit message from CVS:
* ext/esd/esdsink.c: (gst_esdsink_open), (gst_esdsink_prepare):
* ext/esd/gstesd.c: (plugin_init):
* po/POTFILES.in:
Add translatable error message for when we cannot
connect to the sound server, as "Cannot open resource
for writing" isn't really an acceptable message to show
to the user in this case.

ChangeLog
ext/esd/esdsink.c
ext/esd/gstesd.c
po/POTFILES.in

index cafac91..35be7c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2006-04-18  Tim-Philipp Müller  <tim at centricular dot net>
 
+       * ext/esd/esdsink.c: (gst_esdsink_open), (gst_esdsink_prepare):
+       * ext/esd/gstesd.c: (plugin_init):
+       * po/POTFILES.in:
+         Add translatable error message for when we cannot
+         connect to the sound server, as "Cannot open resource
+         for writing" isn't really an acceptable message to show
+         to the user in this case.
+
+2006-04-18  Tim-Philipp Müller  <tim at centricular dot net>
+
        * sys/oss/gst-i18n-plugin.h:
          Remove bogus file that doesn't belong here.
 
index f19b1cf..dca30d5 100644 (file)
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
 #include "esdsink.h"
 #include <esd.h>
 #include <unistd.h>
 #include <errno.h>
 
+#include <gst/gst-i18n-plugin.h>
+
 GST_DEBUG_CATEGORY_EXTERN (esd_debug);
 #define GST_CAT_DEFAULT esd_debug
 
@@ -239,7 +242,8 @@ gst_esdsink_open (GstAudioSink * asink)
   /* ERRORS */
 couldnt_connect:
   {
-    GST_ELEMENT_ERROR (esdsink, RESOURCE, OPEN_WRITE, (NULL),
+    GST_ELEMENT_ERROR (esdsink, RESOURCE, OPEN_WRITE,
+        (_("Could not establish connection to sound server")),
         ("can't open connection to esound server"));
     return FALSE;
   }
@@ -336,7 +340,8 @@ unsupported_channels:
   }
 cannot_open:
   {
-    GST_ELEMENT_ERROR (esdsink, RESOURCE, OPEN_WRITE, (NULL),
+    GST_ELEMENT_ERROR (esdsink, RESOURCE, OPEN_WRITE,
+        (_("Could not establish connection to sound server")),
         ("can't open connection to esound server"));
     return FALSE;
   }
index c40b4cf..62554d0 100644 (file)
 #include "esdmon.h"
 #endif
 
+#include "gst/gst-i18n-plugin.h"
+
 GST_DEBUG_CATEGORY (esd_debug);
 
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  gboolean ret;
-
-#if 0
-  if (!gst_library_load ("gstaudio"))
-    return FALSE;
-#endif
-
-  ret = gst_esdsink_factory_init (plugin);
-  if (ret == FALSE)
+  if (!gst_esdsink_factory_init (plugin))
     return FALSE;
 
 #if 0
@@ -49,6 +43,12 @@ plugin_init (GstPlugin * plugin)
 #endif
 
   GST_DEBUG_CATEGORY_INIT (esd_debug, "esd", 0, "ESounD elements");
+
+#ifdef ENABLE_NLS
+  setlocale (LC_ALL, "");
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif /* ENABLE_NLS */
+
   return TRUE;
 }
 
index a35c6c6..01434cf 100644 (file)
@@ -1,4 +1,5 @@
 ext/libpng/gstpngdec.c
+ext/esd/esdsink.c
 gst/avi/gstavimux.c
 gst/wavparse/gstwavparse.c
 sys/oss/gstossmixer.c