gio-tool: Various fixes related to error messages

This patch contains the following changes:
- Print all errors with "gio: " prefix
- Print file uri in error for each tool allowing multiple locations
- Mark all error messages translatable
- Do not leak strings used in error messages
- Always start error messages with capital letter
- Unify some error messages across various tools
- Fix addional/missing new line characters

https://bugzilla.gnome.org/show_bug.cgi?id=776169
This commit is contained in:
Ondrej Holy
2016-12-16 14:32:29 +01:00
parent a83ccc535f
commit 0beeeb2ec9
12 changed files with 83 additions and 52 deletions

View File

@@ -105,7 +105,7 @@ save (GFile *file)
if (written == -1)
{
save_res = FALSE;
g_printerr ("gio: Error writing to stream: %s\n", error->message);
print_error (error->message);
g_error_free (error);
goto out;
}
@@ -116,7 +116,7 @@ save (GFile *file)
else if (res < 0)
{
save_res = FALSE;
g_printerr ("gio: Error reading from standard input\n");
print_error (_("Error reading from standard input"));
break;
}
else if (res == 0)
@@ -129,7 +129,7 @@ save (GFile *file)
if (!close_res)
{
save_res = FALSE;
g_printerr ("gio: Error closing: %s\n", error->message);
print_error (error->message);
g_error_free (error);
}