GNOME Bugzilla – Bug 135885
untranslated string/unescaped underscore in gnome-panel-screenshot
Last modified: 2004-12-22 21:47:04 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.
Created attachment 24995 [details] [review] fix all that
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?
Removed accessibility keyword.
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?
Mariano: yes, please contact them.
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)"
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); }
That works only if webdir is public_html, you see.
Indeed, but doesn't break the string freeze -- if GTP doesn't allow the change to go, I think this is good enough.
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.
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.
*** Bug 138376 has been marked as a duplicate of this bug. ***
Comment on attachment 24995 [details] [review] fix all that See Comment #7 and later.
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.
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.