diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-08-24 16:42:12 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-08-24 17:04:19 +0200 |
commit | 05a9669be00e55f6b686327da95ffc56220bed22 (patch) | |
tree | acb01c0400c47ee508c40d4acbe4f2d3399dfa7d /programs/gvfs-mkdir.c | |
parent | f20369496be7bdb7a614916367c6d4fd459dd44a (diff) | |
download | gvfs-05a9669be00e55f6b686327da95ffc56220bed22.tar.gz |
Fix up various errors with i18n of programs/*.c
Lots of not translated strings, some errors did not go to stderr, etc.
Diffstat (limited to 'programs/gvfs-mkdir.c')
-rw-r--r-- | programs/gvfs-mkdir.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/programs/gvfs-mkdir.c b/programs/gvfs-mkdir.c index 483ebd87..a031dab7 100644 --- a/programs/gvfs-mkdir.c +++ b/programs/gvfs-mkdir.c @@ -1,5 +1,5 @@ /* GIO - GLib Input, Output and Streaming Library - * + * * Copyright (C) 2006-2007 Red Hat, Inc. * * This library is free software; you can redistribute it and/or @@ -28,10 +28,10 @@ #include <gio/gio.h> static gboolean parent = FALSE; -static GOptionEntry entries[] = +static GOptionEntry entries[] = { - { "parent", 'p', 0, G_OPTION_ARG_NONE, &parent, "create parent directories", NULL }, - { NULL } + { "parent", 'p', 0, G_OPTION_ARG_NONE, &parent, N_("create parent directories"), NULL }, + { NULL } }; @@ -41,54 +41,54 @@ main (int argc, char *argv[]) GError *error; GOptionContext *context; GFile *file; - + setlocale (LC_ALL, ""); g_type_init (); - + error = NULL; - context = g_option_context_new ("- delete files"); + context = g_option_context_new (_("- delete files")); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_parse (context, &argc, &argv, &error); g_option_context_free (context); if (error != NULL) { - g_printerr ("Error parsing commandline options: %s\n", error->message); + g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_printerr ("\n"); g_printerr (_("Try \"%s --help\" for more information."), - g_get_prgname ()); + g_get_prgname ()); g_printerr ("\n"); g_error_free(error); return 1; } - + if (argc > 1) { int i; - - for (i = 1; i < argc; i++) - { + + for (i = 1; i < argc; i++) + { file = g_file_new_for_commandline_arg (argv[i]); - error = NULL; - if (parent) - { - if (!g_file_make_directory_with_parents (file, NULL, &error)) - { - g_print ("Error creating directory: %s\n", error->message); - g_error_free (error); - } - } - else - { + error = NULL; + if (parent) + { + if (!g_file_make_directory_with_parents (file, NULL, &error)) + { + g_printerr (_("Error creating directory: %s\n"), error->message); + g_error_free (error); + } + } + else + { if (!g_file_make_directory (file, NULL, &error)) - { - g_print ("Error creating directory: %s\n", error->message); - g_error_free (error); - } - g_object_unref (file); - } - } + { + g_printerr (_("Error creating directory: %s\n"), error->message); + g_error_free (error); + } + g_object_unref (file); + } + } } return 0; |