After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 154054 - elementfactory: add support for translated names
elementfactory: add support for translated names
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 626526 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-29 13:39 UTC by Takao Fujiwara
Modified: 2018-11-03 12:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for mixer.c (2.16 KB, patch)
2004-09-29 13:41 UTC, Takao Fujiwara
none Details | Review
patch for POTFILES.in (980 bytes, patch)
2004-09-29 13:42 UTC, Takao Fujiwara
none Details | Review
patch for gstalsamixer.c, gstalsamixertrack.c and gstosselement.c (3.12 KB, patch)
2004-10-02 11:56 UTC, Takao Fujiwara
committed Details | Review
patch for POTFILES.in (1.06 KB, patch)
2004-10-02 11:57 UTC, Takao Fujiwara
committed Details | Review
snapshot of the patched result. (19.17 KB, image/png)
2005-02-04 01:55 UTC, Takao Fujiwara
  Details
Patch for gst/gstelementfactory.[c|h], gst/gstplugin.[c|h] (5.83 KB, patch)
2009-03-31 08:35 UTC, Takao Fujiwara
needs-work Details | Review
Patch for gst-plugins-good/sys/oss/gstossaudio.c, gst-plugins-good/sys/oss/gstossmixerelement.c (1.75 KB, patch)
2009-03-31 08:37 UTC, Takao Fujiwara
needs-work Details | Review

Description Takao Fujiwara 2004-09-29 13:39:45 UTC
gnome-volume-control has unlocalized labels with ALSA drivers.

To reproduce:
1. Enable alsa driver for the sound.
2. Invoke gnome-volume-control

Then several labels are not localized.
I could find the labels in alsa module but it is not internationalized.
So I hacked the strings and attach the patch.
Comment 1 Takao Fujiwara 2004-09-29 13:41:31 UTC
Created attachment 32068 [details] [review]
patch for mixer.c

Added the patch for gnome-volume-control.
Comment 2 Takao Fujiwara 2004-09-29 13:42:08 UTC
Created attachment 32069 [details] [review]
patch for POTFILES.in

Added the patch for potfiles.
Comment 3 Ronald Bultje 2004-09-30 11:57:48 UTC
No, the patch should be to the gstalsamixer code, not to gnome-volume-control.
Comment 4 Takao Fujiwara 2004-10-01 13:41:46 UTC
I couldn't find the module.

# rpm -qa | grep alsa
alsa-1.0.3-41.3
Comment 5 Ronald Bultje 2004-10-01 14:00:54 UTC
gst-plugins/ext/alsa/gstalsamixer.c

Have a look at how the ossmixer (gst-plugins/sys/oss/gstossmixer.c) or the sun
audio mixer (gst-plugins/sys/sunaudio/gstsunaudiomixer.c) do it, they are
i18n'ed just fine.
Comment 6 Takao Fujiwara 2004-10-01 14:15:28 UTC
I understood you mean the similar patch should be applied to gst-plugin not to 
gnome-volume-control. I'll create the patch again.

Comment 7 Ronald Bultje 2004-10-01 14:43:45 UTC
That's what I mean. ;). Gnome-volume-control should not be patched. Instead, the
alsamixer plugin in gst-plugins should be internationalized. Otherwise, we would
end up adding the same code to each app using the GStreamer mixer interface.
Comment 8 Takao Fujiwara 2004-10-02 11:56:40 UTC
Created attachment 32160 [details] [review]
patch for gstalsamixer.c, gstalsamixertrack.c and gstosselement.c

I created the patches for gst-plugin.
Comment 9 Takao Fujiwara 2004-10-02 11:57:49 UTC
Created attachment 32161 [details] [review]
patch for POTFILES.in

Attached the patch for POTFILES.in
Comment 10 Takao Fujiwara 2004-10-02 12:02:58 UTC
My second patch is created for gst-plugin not gnome-volume-control.
So I transfer the category to gst-plugin.
Comment 11 Ronald Bultje 2004-10-02 13:55:33 UTC
This looks good, we should probably apply this. The i18n patches for the title
field in the element definition are probably a good idea. Thomas, should we do
that for all elements?
Comment 12 Ronald Bultje 2004-10-25 15:58:07 UTC
I applied the track label internationalization patch. I didn't touch the
elementfactory information yet. It's not that I don't like it, but I'd like to
do it for all elements at once. I'll keep that pending for a while longer.
Comment 13 Christian Fredrik Kalager Schaller 2005-01-27 10:21:50 UTC
Should the elementfactory information be internationalized? I mean its not 'user
information' in my view. Its meant for developers and it is being used
programatically by people to choose which plugins to display/show where etc.
Comment 14 Ronald Bultje 2005-02-03 22:57:22 UTC
Hi, I'm changing the topic. The patch for elementfactories will not be committed
in its current form, since it makes the global registry i18n'ed in one language,
which may not be correct. We don't know how to solve it correctly right now, but
we are interested in solving it correctly. It *is* end user data, so it should
be i18n'ed.

(Sorry for the patch spam, it's to make the bugzilla patch tracker happy.)
Comment 15 Takao Fujiwara 2005-02-04 01:54:08 UTC
I attached a snapshot as the expected result. The element name is shown as the
tab name of gnome-volume-control. The visibility is high so I hope it will be
also fixed in GNOME community. I have integrated my patch into our build since
four months and it has been tested by each locale.
Comment 16 Takao Fujiwara 2005-02-04 01:55:44 UTC
Created attachment 36958 [details]
snapshot of the patched result.

snapshot for gnome-volume-control
Comment 17 Ronald Bultje 2005-02-04 08:28:02 UTC
Right, the visibility in 2.10 will be less because I've moved soundcard
selection from the main window to the menu (where you select the soundcard to be
displayed).

The problem with an i18n'ed registry, according to some of our core people, is
that you get i18n'ed data in a system XML file. This is not wanted for several
reasons:
* since it's system data, it should be in system (C) locale.
* since several users use the same registry and not each user uses the same
locale (e.g. one uses C, the other uses nl), you'll get problems on multi-user
systems.

The correct solution, proposed by some (but very work-intensive), is to i18n the
data only when requested by the application. This way, gst-register and kids
wouldn't use it, but applications reading the registry or displaying the element
directly would.
Comment 18 Takao Fujiwara 2005-02-05 04:44:15 UTC
OK, I see the great evaluation. Please close this. I'll check the elements in 2.10.

Could you clarify your last comment.
Which gnome-volume-control or gst-register should implement the correct solution?
Comment 19 Ronald Bultje 2005-02-05 10:52:44 UTC
No need to close this, the bug is still valid. ;).

I'm not sure yet how the details will work, we'll figure that out once we do
this. I'd suggest to continue shipping your current patch as part of the
JDS-shipped GStreamer, until we've got our working solution out there...
Comment 20 Andy Wingo 2006-01-11 16:15:56 UTC
Since the registry is now per-user only, I would think putting the i18n'd data into the registry would be fine now. Unless it's being used for some other purpose like identification (which it shouldn't).
Comment 21 David Schleef 2007-05-13 22:03:47 UTC
Perhaps we should only include information in the registry that applications use to select elements.  If an application like gst-editor wants to display a bunch of user-interesting information, it can load the plugin to get that information.  It sucks that you'd have to load every plugin to get a giant table of element information, but we'll deal with that issue when it actually comes up.

Note, I'm not sure this is feasable with the current ABI.  We may guarantee certain element information without the plugin being loaded.
Comment 22 David Schleef 2008-08-19 01:48:58 UTC
Marking as 0.11.

At that point, let's remove all information intended for an end user from the registry, and make it all translated.
Comment 23 Edward Hervey 2009-03-11 08:03:45 UTC
elementfactories are in core.
Comment 24 Takao Fujiwara 2009-03-31 08:35:16 UTC
Created attachment 131754 [details] [review]
Patch for gst/gstelementfactory.[c|h], gst/gstplugin.[c|h]

Reviced the patch to follow the latest.
Comment 25 Takao Fujiwara 2009-03-31 08:37:57 UTC
Created attachment 131755 [details] [review]
Patch for gst-plugins-good/sys/oss/gstossaudio.c, gst-plugins-good/sys/oss/gstossmixerelement.c

Attached patch for gst-plugins-good to follow the latest.

This is an example fix.
What do you think?
Comment 26 Stefan Sauer (gstreamer, gtkdoc dev) 2009-04-20 21:00:30 UTC
One comment on the patch. I would sugest to use the qdata api of gobject:
once do this:
priv_gst_translation_domain = g_quark_from_static_string ("gst::domain");

and then use the quark
g_object_get_data ((GObject*)factory, priv_gst_translation_domain);

Comment 27 Sebastian Dröge (slomo) 2010-08-10 17:21:52 UTC
*** Bug 626526 has been marked as a duplicate of this bug. ***
Comment 28 Tim-Philipp Müller 2013-03-16 15:13:28 UTC
Don't see why this can't be fixed by just adding API, so removing 0.11 target milestone.
Comment 29 Sebastian Dröge (slomo) 2013-07-24 07:54:11 UTC
Is anybody going to work on this? Maybe as a first step by making the patch apply against git master again? Stefan?
Comment 30 Tim-Philipp Müller 2013-07-24 10:36:15 UTC
I might look at this next cycle once my other mystical registry stuff has landed, so let's keep it open for now. I think it's a useful feature, since these names might be exposed in UIs.
Comment 31 GStreamer system administrator 2018-11-03 12:12:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/2.