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 485922 - Errors from VFS backend are not translated
Errors from VFS backend are not translated
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: file-chooser
2.20.x
Other All
: Normal major
: future
Assigned To: Federico Mena Quintero
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2007-10-12 04:03 UTC by Federico Mena Quintero
Modified: 2007-10-17 22:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
libgnomeui-bgo-485922-translate-vfs-errors.diff (3.87 KB, patch)
2007-10-12 06:48 UTC, Federico Mena Quintero
committed Details | Review

Description Federico Mena Quintero 2007-10-12 04:03:11 UTC
set_vfs_error() in gtkfilesystemgnomevfs.c is used to translate a GnomeVFS error code into a GtkFileSystemError value.  However, the function creates error strings that are not translated.  So, for example, in a Spanish locale I get

  error accessing 'file:///foo/bar': Acceso denegado

That is, there is a generic and untranslated "error accessing" in there.  The file system backend does not try to provide more specific error messages, like "Could not create folder".

In contrast, gtkfilesystemunix.c uses specific error messages, which is much nicer.
Comment 1 Federico Mena Quintero 2007-10-12 06:48:50 UTC
Created attachment 97104 [details] [review]
libgnomeui-bgo-485922-translate-vfs-errors.diff
Comment 2 Federico Mena Quintero 2007-10-12 06:51:00 UTC
Committed to gnome-2-20 and trunk:

2007-10-12  Federico Mena Quintero  <federico@novell.com>

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=485922 - Errors from
	GtkFileSystemGnomeVFS are not translated, and are too general.

	* file-chooser/gtkfilesystemgnomevfs.c (set_vfs_error): Take in a
	'format' argument instead of using hardcoded, untranslated
	strings.
	(get_folder_complete_operation): Use a specific error message for
	set_vfs_error().
	(get_folder_file_info_callback): Likewise.
	(get_file_info_callback): Likewise.
	(create_folder_progress_cb): Likewise.
	(gtk_file_system_gnome_vfs_get_parent): Likewise.
Comment 3 Vincent Untz 2007-10-17 21:40:23 UTC
This broke string freeze, so I reverted the patch for 2.20.1.

Permission should be asked on gnome-i18n if you want this in the gnome-2-20 branch. (trunk has the new strings)
Comment 4 Vincent Untz 2007-10-17 22:06:04 UTC
(It was useless to reopen the bug since it's fixed in trunk)