summaryrefslogtreecommitdiff
path: root/daemon/main.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-01-28 10:54:14 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-01-28 10:54:14 +0000
commitc61dc33f75801ae23b33f9c3bf6e057853f7e5f1 (patch)
tree780a3b9261782b91ef81e07807aaf949d40f8d4a /daemon/main.c
parentfd50d05d3ee6d72750a886349cb8a51adf68ee7d (diff)
downloadgvfs-c61dc33f75801ae23b33f9c3bf6e057853f7e5f1.tar.gz
Enable translations for daemons and some l10n fixes. Patch from Luca
2008-01-28 Alexander Larsson <alexl@redhat.com> * daemon/Makefile.am: * daemon/daemon-main.c: * daemon/main.c: Enable translations for daemons and some l10n fixes. Patch from Luca Ferretti. svn path=/trunk/; revision=1186
Diffstat (limited to 'daemon/main.c')
-rw-r--r--daemon/main.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/daemon/main.c b/daemon/main.c
index 3b912a7b..2c444083 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -1,3 +1,5 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
@@ -46,12 +48,18 @@ main (int argc, char *argv[])
{ NULL }
};
+ setlocale (LC_ALL, "");
+
+ bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
g_thread_init (NULL);
g_set_application_name (_("GVFS Daemon"));
context = g_option_context_new ("");
- g_option_context_set_summary (context, "Main daemon for GVFS");
+ g_option_context_set_summary (context, _("Main daemon for GVFS"));
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
@@ -60,7 +68,13 @@ main (int argc, char *argv[])
error = NULL;
if (!g_option_context_parse (context, &argc, &argv, &error))
{
- g_print ("%s, use --help for usage\n", error->message);
+ /* Translators: the first %s is the application name, */
+ /* the second %s is the error message */
+ g_printerr (_("%s: %s"), g_get_application_name(), error->message);
+ g_printerr ("\n");
+ g_printerr (_("Try \"%s --help\" for more information."),
+ g_get_prgname ());
+ g_printerr ("\n");
g_error_free (error);
return 1;
}