From 1303d4a7580b71a974bc07bc030386ae066a62fb Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 23 Apr 2011 22:05:16 +0300 Subject: [PATCH] Make error message format consistent --- programs/gvfs-cat.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/gvfs-cat.c b/programs/gvfs-cat.c index e879d3d..0b36b39 100644 --- a/programs/gvfs-cat.c +++ b/programs/gvfs-cat.c @@ -60,71 +60,71 @@ cat (GFile * file) return; } while (1) { res = g_input_stream_read (in, buffer, sizeof (buffer) - 1, NULL, &error); if (res > 0) { ssize_t written; p = buffer; while (res > 0) { written = write (STDOUT_FILENO, p, res); if (written == -1 && errno != EINTR) { /* Translators: the first %s is the program name, the */ /* second one is the URI of the file. */ - g_printerr (_("%s: %s, error writing to stdout"), + g_printerr (_("%s: %s: error writing to stdout"), g_get_prgname (), g_file_get_uri (file)); goto out; } res -= written; p += written; } } else if (res < 0) { /* Translators: the first %s is the program name, the second one */ /* is the URI of the file, the third is the error message. */ g_printerr (_("%s: %s: error reading: %s\n"), g_get_prgname (), g_file_get_uri (file), error->message); g_error_free (error); error = NULL; break; } else if (res == 0) break; } out: close_res = g_input_stream_close (in, NULL, &error); if (!close_res) { /* Translators: the first %s is the program name, the second one */ /* is the URI of the file, the third is the error message. */ - g_printerr (_("%s: %s:error closing: %s\n"), + g_printerr (_("%s: %s: error closing: %s\n"), g_get_prgname (), g_file_get_uri (file), error->message); g_error_free (error); } } int main (int argc, char *argv[]) { GError *error = NULL; GOptionContext *context = NULL; GFile *file; gchar *summary; int i; setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); -- 1.7.1