? libgstsunaudio_la-gstsunaudio.loT
Index: gstsunaudio.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/sys/sunaudio/gstsunaudio.c,v
retrieving revision 1.2
diff -u -p -r1.2 gstsunaudio.c
--- gstsunaudio.c	20 Jun 2006 10:35:48 -0000	1.2
+++ gstsunaudio.c	4 Mar 2007 19:00:23 -0000
@@ -49,6 +49,7 @@ plugin_init (GstPlugin * plugin)
 #ifdef ENABLE_NLS
   setlocale (LC_ALL, "");
   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 #endif /* ENABLE_NLS */
 
   return TRUE;
Index: gstsunaudiomixertrack.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/sys/sunaudio/gstsunaudiomixertrack.c,v
retrieving revision 1.3
diff -u -p -r1.3 gstsunaudiomixertrack.c
--- gstsunaudiomixertrack.c	20 Jun 2006 10:35:48 -0000	1.3
+++ gstsunaudiomixertrack.c	4 Mar 2007 19:00:23 -0000
@@ -57,48 +57,35 @@ gst_sunaudiomixer_track_init (GstSunAudi
   track->track_num = 0;
 }
 
-static const gchar **labels = NULL;
-
-static void
-fill_labels (void)
-{
-  int i;
-  struct
-  {
-    gchar *given, *wanted;
-  }
-  cases[] = {
-    {
-    "Vol  ", N_("Volume")}
-    , {
-    "Gain ", N_("Gain")}
-    , {
-    "Mon  ", N_("Monitor")}
-    , {
-    NULL, NULL}
-  };
-
-  labels = g_malloc (sizeof (gchar *) * MIXER_DEVICES);
-
-  for (i = 0; i < MIXER_DEVICES; i++) {
-    labels[i] = g_strdup (cases[i].wanted);
-  }
-}
-
 GstMixerTrack *
 gst_sunaudiomixer_track_new (GstSunAudioTrackType track_num,
     gint max_chans, gint flags)
 {
+  const gchar *labels[] = { N_("Volume"), N_("Gain"), N_("Monitor") };
+
   GstSunAudioMixerTrack *sunaudiotrack;
   GstMixerTrack *track;
+  GObjectClass *klass;
+  const gchar *untranslated_label;
   gint volume;
 
-  if (!labels)
-    fill_labels ();
+  if ((guint) track_num < G_N_ELEMENTS (labels))
+    untranslated_label = labels[track_num];
+  else
+    untranslated_label = NULL;
+
+  /* FIXME: remove this check once we depend on -base >= 0.10.12.1 */
+  klass = G_OBJECT_CLASS (g_type_class_ref (GST_TYPE_SUNAUDIO_MIXER_TRACK));
+  if (g_object_class_find_property (klass, "untranslated-label")) {
+    sunaudiotrack = g_object_new (GST_TYPE_SUNAUDIO_MIXER_TRACK,
+        "untranslated-label", untranslated_label, NULL);
+  } else {
+    sunaudiotrack = g_object_new (GST_TYPE_SUNAUDIO_MIXER_TRACK, NULL);
+  }
+  g_type_class_unref (klass);
 
-  sunaudiotrack = g_object_new (GST_TYPE_SUNAUDIO_MIXER_TRACK, NULL);
   track = GST_MIXER_TRACK (sunaudiotrack);
-  track->label = g_strdup (labels[track_num]);
+  track->label = g_strdup (_(untranslated_label));
   track->num_channels = max_chans;
   track->flags = flags;
   track->min_volume = 0;
