Call setlocale().

2007-01-02  Matthias Clasen  <mclasen@redhat.com>

        * gtk/updateiconcache.c (main): Call setlocale().

        * gtk/gtkfilesel.c:
        * gtk/gtkfilesystemunix.c:
        * gtk/gtkfilesystemwin32.c:
        * gtk/gtkfilechoosersettings.c:
        * gtk/updateiconcache.c: Consistently use folder instead of
        directory in translated messages.  (#344584, Javier F. Serrador)



svn path=/trunk/; revision=17024
This commit is contained in:
Matthias Clasen
2007-01-02 19:52:48 +00:00
committed by Matthias Clasen
parent 129ad4b48d
commit 78c7c07f3b
6 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,14 @@
2007-01-02 Matthias Clasen <mclasen@redhat.com>
* gtk/updateiconcache.c (main): Call setlocale().
* gtk/gtkfilesel.c:
* gtk/gtkfilesystemunix.c:
* gtk/gtkfilesystemwin32.c:
* gtk/gtkfilechoosersettings.c:
* gtk/updateiconcache.c: Consistently use folder instead of
directory in translated messages. (#344584, Javier F. Serrador)
2007-01-02 Matthias Clasen <mclasen@redhat.com> 2007-01-02 Matthias Clasen <mclasen@redhat.com>
Try to fix #315732, reported by Luke Hutchinson: Try to fix #315732, reported by Luke Hutchinson:

View File

@ -513,8 +513,8 @@ _gtk_file_chooser_settings_save (GtkFileChooserSettings *settings,
g_set_error (error, g_set_error (error,
G_FILE_ERROR, G_FILE_ERROR,
g_file_error_from_errno (saved_errno), g_file_error_from_errno (saved_errno),
_("Could not create directory: %s"), _("Error creating folder '%s': %s"),
dirname); dirname, g_strerror (saved_errno));
goto out; goto out;
} }

View File

@ -1405,7 +1405,7 @@ gtk_file_selection_create_dir_confirmed (GtkWidget *widget,
if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE))
buf = g_strdup_printf (_("The folder name \"%s\" contains symbols that are not allowed in filenames"), dirname); buf = g_strdup_printf (_("The folder name \"%s\" contains symbols that are not allowed in filenames"), dirname);
else else
buf = g_strdup_printf (_("Error creating directory '%s': %s"), buf = g_strdup_printf (_("Error creating folder '%s': %s"),
dirname, error->message); dirname, error->message);
gtk_file_selection_fileop_error (fs, buf); gtk_file_selection_fileop_error (fs, buf);
g_error_free (error); g_error_free (error);
@ -1414,7 +1414,7 @@ gtk_file_selection_create_dir_confirmed (GtkWidget *widget,
if (g_mkdir (sys_full_path, 0777) < 0) if (g_mkdir (sys_full_path, 0777) < 0)
{ {
buf = g_strdup_printf (_("Error creating directory '%s': %s"), buf = g_strdup_printf (_("Error creating folder '%s': %s"),
dirname, g_strerror (errno)); dirname, g_strerror (errno));
gtk_file_selection_fileop_error (fs, buf); gtk_file_selection_fileop_error (fs, buf);
} }

View File

@ -1044,7 +1044,7 @@ gtk_file_system_unix_create_folder (GtkFileSystem *file_syst
g_set_error (&error, g_set_error (&error,
GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR,
GTK_FILE_SYSTEM_ERROR_NONEXISTENT, GTK_FILE_SYSTEM_ERROR_NONEXISTENT,
_("Error creating directory '%s': %s"), _("Error creating folder '%s': %s"),
display_name, display_name,
g_strerror (save_errno)); g_strerror (save_errno));

View File

@ -1161,7 +1161,7 @@ gtk_file_system_win32_create_folder (GtkFileSystem *file_syst
g_set_error (&error, g_set_error (&error,
GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR,
GTK_FILE_SYSTEM_ERROR_NONEXISTENT, GTK_FILE_SYSTEM_ERROR_NONEXISTENT,
_("Error creating directory '%s': %s"), _("Error creating folder '%s': %s"),
display_filename, display_filename,
g_strerror (save_errno)); g_strerror (save_errno));

View File

@ -1125,7 +1125,7 @@ write_file (FILE *cache, GHashTable *files, GList *directories)
if (!write_dir_index (cache, new_offset, directories)) if (!write_dir_index (cache, new_offset, directories))
{ {
g_printerr (_("Failed to write directory index\n")); g_printerr (_("Failed to write folder index\n"));
return FALSE; return FALSE;
} }
@ -1296,6 +1296,8 @@ main (int argc, char **argv)
if (argc < 2) if (argc < 2)
return 0; return 0;
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");