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 690682 - Untranslatable strings in about window
Untranslatable strings in about window
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-12-23 21:03 UTC by Piotr Drąg
Modified: 2012-12-26 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the issue (18.73 KB, image/png)
2012-12-23 21:03 UTC, Piotr Drąg
Details

Description Piotr Drąg 2012-12-23 21:03:58 UTC
Created attachment 232158 [details]
Screenshot of the issue

In totem's about window there are two untranslatable "Videos" strings, as shown on the screenshot.
Comment 1 Philip Withnall 2012-12-25 12:03:10 UTC
commit 99966f034601f1b652fec0e7292f5e8940168152
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Tue Dec 25 12:01:39 2012 +0000

    main: Call gtk_init() on startup to ensure locale and gettext are initialise
    
    The translated application name passed to g_set_application_name() wasn’t
    actually being translated because setlocale() hadn’t been called and Totem
    was still in the C locale.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=690682

 src/totem.c | 1 +
 1 file changed, 1 insertion(+)
Comment 2 Bastien Nocera 2012-12-25 12:54:09 UTC
This is likely wrong and breaking startup notification. Could it be that this isn't translated because it's the application name?
Comment 3 Philip Withnall 2012-12-25 14:07:07 UTC
The about dialogue uses g_get_application_name() to fill in those strings, which should’ve been set to _("Videos"). However, when g_set_application_name() is called, gettext isn’t using the correct domain because setlocale() hasn’t been called. setlocale() is called by gtk_init() (or gtk_get_option_group() IIRC).

We could replace this gtk_init() call with setlocale(). I didn’t do that in the first place because GTK+’s implementation of it (in setlocale_initialization()) has a load of associated code I didn’t want to copy. However, that code is (IIRC) for Windows, so I don’t know how much we care.

I filed bug #690705 about improving GtkApplication to do this for us.
Comment 4 Philip Withnall 2012-12-26 12:06:48 UTC
(In reply to comment #2)
> This is likely wrong and breaking startup notification. Could it be that this
> isn't translated because it's the application name?

Changed gtk_init() to setlocale(). Mass rejoicing.

commit 85451a6f4bfec3226a5bbaf7738b5e3deb7fe42e
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Wed Dec 26 12:04:34 2012 +0000

    main: Call setlocale() on startup to ensure locale & gettext are initialised
    
    This reverts commit 99966f034601f1b652fec0e7292f5e8940168152 and implements
    a better fix which doesn’t have the potential to break startup notification.
    
    See the discussion in https://bugzilla.gnome.org/show_bug.cgi?id=690705 for
    details.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=690682

 src/totem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)