[Pkg-privacy-commits] [nautilus-wipe] 87/224: Clean and enable I18N

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 19:45:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository nautilus-wipe.

commit efd863b88514664011d0d09ffce353f23ed0b924
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Wed Mar 31 02:25:13 2010 +0200

    Clean and enable I18N
    
    We have now a truly translatable UI.
---
 nautilus-srm/delete-operation.c  | 3 ++-
 nautilus-srm/fill-operation.c    | 5 +++--
 nautilus-srm/nautilus-srm.c      | 6 ++++++
 nautilus-srm/nautilus-srm.h      | 2 --
 nautilus-srm/operation-manager.c | 5 +++++
 5 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/nautilus-srm/delete-operation.c b/nautilus-srm/delete-operation.c
index d4bf3c0..57dca83 100644
--- a/nautilus-srm/delete-operation.c
+++ b/nautilus-srm/delete-operation.c
@@ -26,6 +26,7 @@
 #include "delete-operation.h"
 
 #include <glib.h>
+#include <glib/gi18n-lib.h>
 #include <glib-object.h>
 #include <gio/gio.h>
 #include <gsecuredelete/gsecuredelete.h>
@@ -70,7 +71,7 @@ nautilus_srm_delete_operation (GList                       *files,
   }
   if (n_files < 1) {
     /* FIXME: use correct error quark and code */
-    g_set_error (error, 0, 0, "Nothing to do!");
+    g_set_error (error, 0, 0, _("Nothing to do!"));
     success = FALSE;
   } else {
     /* if file addition succeeded, try to launch operation */
diff --git a/nautilus-srm/fill-operation.c b/nautilus-srm/fill-operation.c
index 9baacd2..6e358c9 100644
--- a/nautilus-srm/fill-operation.c
+++ b/nautilus-srm/fill-operation.c
@@ -26,6 +26,7 @@
 #include "fill-operation.h"
 
 #include <glib.h>
+#include <glib/gi18n-lib.h>
 #include <glib-object.h>
 #include <gio/gio.h>
 #if HAVE_GIO_UNIX
@@ -100,7 +101,7 @@ find_mountpoint (const gchar *path,
     if (! mountpoint_path) {
       gchar *uri = g_file_get_uri (mountpoint_file);
       
-      g_set_error (&err, 0, 0, "Mount \"%s\" is not local", uri);
+      g_set_error (&err, 0, 0, _("Mount \"%s\" is not local"), uri);
       g_free (uri);
     }
     g_object_unref (mountpoint_file);
@@ -113,7 +114,7 @@ find_mountpoint (const gchar *path,
     g_clear_error (&err);
     mountpoint_path = find_mountpoint_unix (path);
     if (! mountpoint_path) {
-      g_set_error (&err, 0, 0, "No mount point found for path \"%s\"", path);
+      g_set_error (&err, 0, 0, _("No mount point found for path \"%s\""), path);
     }
   }
   #endif
diff --git a/nautilus-srm/nautilus-srm.c b/nautilus-srm/nautilus-srm.c
index b538336..f1480e1 100644
--- a/nautilus-srm/nautilus-srm.c
+++ b/nautilus-srm/nautilus-srm.c
@@ -19,12 +19,17 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "nautilus-srm.h"
 
 #include <libnautilus-extension/nautilus-menu-provider.h>
 #include <libnautilus-extension/nautilus-file-info.h>
 
 #include <glib.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 #include <gio/gio.h>
 #include <gconf/gconf-client.h>
@@ -56,6 +61,7 @@ void
 nautilus_module_initialize (GTypeModule *module)
 {
   g_message (_("Initializing"));
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   nautilus_srm_register_type (module);
   provider_types[0] = nautilus_srm_get_type ();
 }
diff --git a/nautilus-srm/nautilus-srm.h b/nautilus-srm/nautilus-srm.h
index e2c0cbf..5be60dc 100644
--- a/nautilus-srm/nautilus-srm.h
+++ b/nautilus-srm/nautilus-srm.h
@@ -24,8 +24,6 @@
 
 #include <glib.h>
 #include <glib-object.h>
-#define GETTEXT_PACKAGE "nautilus-srm"
-#include <glib/gi18n-lib.h>
 
 /* if GLib doesn't provide g_dngettext(), wrap it from dngettext() */
 #if (! GLIB_CHECK_VERSION (2, 18, 0) && ! defined (g_dngettext))
diff --git a/nautilus-srm/operation-manager.c b/nautilus-srm/operation-manager.c
index 76342e3..9cda1d9 100644
--- a/nautilus-srm/operation-manager.c
+++ b/nautilus-srm/operation-manager.c
@@ -19,10 +19,15 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "operation-manager.h"
 
 #include <stdarg.h>
 #include <glib.h>
+#include <glib/gi18n-lib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include <gsecuredelete/gsecuredelete.h>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/nautilus-wipe.git



More information about the Pkg-privacy-commits mailing list