Re: [REGRESSION] gvfs mount names not translated in UI



Il giorno gio, 24/01/2008 alle 12.16 +0100, Alexander Larsson ha
scritto: 
> On Wed, 2008-01-23 at 11:40 +0100, Luca Ferretti wrote:
> > Names/Labels for gvfs non local uris (trash:, computer:, burn:, smb:)
> > are not displayed using the translations available in gvfs package.
> > 
> > So, for example, for LANG=it the window title and the bottom left button
> > label for trash:// is "Trashcan", while it should be "Cestino" (the
> > Italian translation available in gvfs.po).
> > 
> > Maybe there are some missing _() somewhere...
> 
> Hmm, i think we might be missing a setlocale() in daemon-main.c...
> Can you try adding that in daemon_init and restart the trash daemon?

The attached patch make window titles translated. Commit?

As "bonus", icons under computer:// are translated too, but not device
icons on desktop (see attached shot: the 10 GB media is the same ). 

Still, gvfs mount entries in GtkFileSelector using gio backend are
untranslated.

> > PS it seems instead that desktop icon caption for trash is translated:
> > this is strage, 'cause captions for smb:// mounts aren't (while, as
> > above, available in Italian translation). It seems that nautilus is
> > still providing translations for it[1]. Shouldn't instead always use the
> > label from gvfs?
> 
> Well, thats kinda different, the trash desktop icon is sort of a links
> to the target rather than the target itself. Whereas the mounts are
> taken from gvfs. I don't think its a huge issue.
> 
OK for me, but if so, gvfs and nautilus should both the same label:
Trash or Trashcan

Similar for burn:// -> "CD Burner" in gvfs vs "CD/DVD Creator" in
nautilus(-cd-burner)

Index: daemon/gvfsdaemon.c
===================================================================
--- daemon/gvfsdaemon.c	(revisione 1175)
+++ daemon/gvfsdaemon.c	(copia locale)
@@ -148,6 +148,12 @@
   gint max_threads = 1; /* TODO: handle max threads */
   DBusError error;
   
+  setlocale (LC_ALL, "");
+
+  bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+
   daemon->lock = g_mutex_new ();
   daemon->session_bus = dbus_bus_get (DBUS_BUS_SESSION, NULL);
   daemon->thread_pool = g_thread_pool_new (job_handler_callback,
Index: daemon/Makefile.am
===================================================================
--- daemon/Makefile.am	(revisione 1175)
+++ daemon/Makefile.am	(copia locale)
@@ -11,6 +11,7 @@
 	-DDBUS_API_SUBJECT_TO_CHANGE		\
 	-DLIBEXEC_DIR=\"$(libexecdir)/\" 	\
 	-DMOUNTABLE_DIR=\"$(mountdir)/\" 	\
+	-DGVFS_LOCALEDIR=\""$(localedir)"\"     \
 	-DG_DISABLE_DEPRECATED
 
 noinst_LTLIBRARIES=libdaemon.la

Attachment: Schermata.jpg
Description: JPEG image



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]