[gstreamer-bugs] [Bug 377306] gnome-volume-control does not localize the label.

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Dec 20 02:04:22 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=377306

  GStreamer | gst-plugins-base | Ver: HEAD CVS





------- Comment #10 from Takao Fujiwara  2006-12-20 10:02 UTC -------
Thanks for the suggestion.
I created the patch for one of your suggestion.

When we continue to use track->label as the translated label,
gome-volume-control removes the tags internally:

gnome-media/gst-mixer/src/preferences.c
gchar *
get_gconf_key (GstMixer *mixer, GstMixerTrack *track)
{
...
  for (i = 0; dev[i] != '\0'; i++) {
    if (g_ascii_isalnum (dev[i]))
      res[pos++] = dev[i];
  }
...
  for (i = 0; label[i] != '\0'; i++) {
    if (g_ascii_isalnum (label[i]))
      res[pos++] = label[i];
  }
..
}

The g_ascii_isalnum removes multibyte labels so this patch(id=78671) is
slightly different from the previous one.

Could you review this patch?

> otherwise we could always add a gst_mixer_track_get_untranslated_device() or _get_icon_hint() or whatever function).

Yes, it also can be implemented.
I think the gst_mixer_track_get_untranslated_device would be:

char *
gst_mixer_track_get_untranslated_device (char *locale_label)
{
  char *retval = locale_label;

  if (!locale_label)
    return NULL;

  if (!labels)
    fill_labels ();

  for (i = 0; i < MIXER_DEVICES; i++) {
    if (!strcmp (_(case[i].wanted), locale_label)) {
      retval = case[i].wanted;
      break;
    }
  }

  return retval;
}

What do you think? Personaly I'm fun to add the untranslated_label.

> On a side note, I don't entirely understand the point of the fill_labels()
function in gstsunaudiomixertrack.c

You're right. Probably it can be removed. However since I don't provide the
original source file, I'm not sure what is intended in this part.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email




More information about the Gstreamer-bugs mailing list