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 135885 - untranslated string/unescaped underscore in gnome-panel-screenshot
untranslated string/unescaped underscore in gnome-panel-screenshot
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 138376 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-03-01 22:14 UTC by Mariano Suárez-Alvarez
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix all that (1.86 KB, patch)
2004-03-01 22:20 UTC, Mariano Suárez-Alvarez
needs-work Details | Review

Description Mariano Suárez-Alvarez 2004-03-01 22:14:55 UTC
The radio button for saving to the web dir is not translated (the glade
file has the string marked as translatable, but the code does not use that
string) and the web dir is added to that label without escaping the
underscores that it may contain (as the infamous public_html) so we are
getting extra underlined lettersin the label. Also, the code is not setting
the accessible name of the widget (the name is take right now from the
glade file=, so this name gets out of sync with the label very very soon.

Here goes a patch that fixes all that---the escaping function is stolen
from gnome-terminal.

This adds a string, sadly, so it's a candidate to provoke unease on
translators this late... 

Also, I have not found a way to mark a string as non translatable in glade,
but the label of the radio button should be so marked, so that translators
do not see it: it is never used in the UI anyways.
Comment 1 Mariano Suárez-Alvarez 2004-03-01 22:20:24 UTC
Created attachment 24995 [details] [review]
fix all that
Comment 2 Vincent Untz 2004-03-03 14:08:07 UTC
The label is shown only when the gconf key is set. So it doesn't
appear on a stock desktop.

Can you ask for permission to i18n people to add this string? It's
crazy: this string was already there before 2.4 and nobody noticed it.

As for the escape code: does this work when there are utf8 characters
in the path?
Comment 3 padraig.obriain 2004-03-04 14:38:19 UTC
Removed accessibility keyword.
Comment 4 Mariano Suárez-Alvarez 2004-03-04 16:17:02 UTC
Vincent: Actually, if the gconf key is not used, but the user has a
~/public_html dir, the untranslated label is being used currently.
It does work with arbitrary utf8.
You want me to contact i18n people?
Comment 5 Vincent Untz 2004-03-05 23:35:35 UTC
Mariano: yes, please contact them.
Comment 6 Danilo Segan 2004-03-06 01:18:07 UTC
The following string is already translated, I think it would be best
to use that now:

#: gnome-panel/gnome-panel-screenshot.glade.h:8
msgid "Save screenshot to _web page (save in ~/public__html)"
Comment 7 Danilo Segan 2004-03-06 01:20:22 UTC
Specifically, I'm suggesting this patch:
--- gnome-panel-screenshot.c.~1.68.~    Mon Feb 16 06:25:50 2004
+++ gnome-panel-screenshot.c    Sat Mar  6 02:19:31 2004
@@ -1269,8 +1269,7 @@
                cbutton = glade_xml_get_widget (xml, "web_rbutton");
                gtk_widget_show (cbutton);
 
-               str = g_strdup_printf ("Save screenshot to _web page
(save in %s)",
-                                      web_dir);
+                str = g_strdup_printf(_("Save screenshot to _web page
(save in ~/public__html)"));
                gtk_button_set_label (GTK_BUTTON (cbutton), str);
                g_free (str);
        }
Comment 8 Mariano Suárez-Alvarez 2004-03-06 02:13:53 UTC
That works only if webdir is public_html, you see.
Comment 9 Danilo Segan 2004-03-06 02:38:56 UTC
Indeed, but doesn't break the string freeze -- if GTP doesn't allow
the change to go, I think this is good enough.
Comment 10 Kjartan Maraas 2004-03-06 07:35:20 UTC
Please tell me where this string is visible in the UI? I can't see it
in my version at least (CVS from yesterday). I have:

Save screenshot to file ...
Save screenshot to desktop ...

There's no mention of web page anywhere that I can see.
Comment 11 Vincent Untz 2004-03-06 10:08:53 UTC
Kjartan: it's only visible if you have a ~/public_html/ directory or
if you set /apps/gnome_panel_screenshot/web_dir to an existing directory.
Comment 12 Vincent Untz 2004-03-31 08:24:29 UTC
*** Bug 138376 has been marked as a duplicate of this bug. ***
Comment 13 Nick Dimiduk 2004-04-30 14:36:54 UTC
Comment on attachment 24995 [details] [review]
fix all that

See Comment #7 and later.
Comment 14 Mariano Suárez-Alvarez 2004-04-30 20:45:26 UTC
Note the patch in comment #1 still applies cleanly, and could go on HEAD as is.

Danilo's patch in comment #7 might hit 2.6.1.

It looks like neither needs more work, though.
Comment 15 Mark McLoughlin 2004-05-13 10:02:44 UTC
2004-05-13  Mark McLoughlin  <mark@skynet.ie>
                                                                               
                                                               
        Based on a patch by Mariano Suárez-Alvarez <msuarezalvarez@arnet.com.ar>
        in bug #135885.
                                                                               
                                                               
        * gnome-panel-screenshot.c: (escape_underscores), (main):
        Translate the "Save screenshot in web page" string, being careful
        to escaped underscores in the path of the web dir.