From eb6f79d516612e8de3e1c29d75501b4f31b8b7a7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Jun 2006 22:32:03 +0000 Subject: [PATCH] Marks strings for translation. (#314278, Claudio Saavedra) ` 2006-06-19 Matthias Clasen * gtk/updateiconcache.c: Marks strings for translation. (#314278, Claudio Saavedra) ` --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ gtk/updateiconcache.c | 40 ++++++++++++++++++++++------------------ po/ChangeLog | 4 ++++ po/POTFILES.in | 1 + 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index f74b7ae84c..d62521ec26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-06-19 Matthias Clasen + * gtk/updateiconcache.c: Marks strings for translation. (#314278, + Claudio Saavedra) + * gtk/gtkentrycompletion.c (gtk_entry_completion_compute_prefix): Don't call g_str_has_prefix on a NULL strung. (#344897, Tommi Komulainen) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f74b7ae84c..d62521ec26 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2006-06-19 Matthias Clasen + * gtk/updateiconcache.c: Marks strings for translation. (#314278, + Claudio Saavedra) + * gtk/gtkentrycompletion.c (gtk_entry_completion_compute_prefix): Don't call g_str_has_prefix on a NULL strung. (#344897, Tommi Komulainen) diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index 86add541ca..dac18a225d 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -37,6 +37,7 @@ #include #include #include +#include static gboolean force_update = FALSE; static gboolean ignore_theme_index = FALSE; @@ -409,7 +410,7 @@ maybe_cache_image_data (Image *image, idata2 = g_hash_table_lookup (image_data_hash, path2); if (idata && idata2 && idata != idata2) - g_error ("different idatas found for symlinked '%s' and '%s'\n", + g_error (_("different idatas found for symlinked '%s' and '%s'\n"), path, path2); if (idata && !idata2) @@ -1112,19 +1113,19 @@ write_file (FILE *cache, GHashTable *files, GList *directories) * back and change it later */ if (!write_header (cache, 0)) { - g_printerr ("Failed to write header\n"); + g_printerr (_("Failed to write header\n")); return FALSE; } if (!write_hash_table (cache, &context, &new_offset)) { - g_printerr ("Failed to write hash table\n"); + g_printerr (_("Failed to write hash table\n")); return FALSE; } if (!write_dir_index (cache, new_offset, directories)) { - g_printerr ("Failed to write directory index\n"); + g_printerr (_("Failed to write directory index\n")); return FALSE; } @@ -1132,7 +1133,7 @@ write_file (FILE *cache, GHashTable *files, GList *directories) if (!write_header (cache, new_offset)) { - g_printerr ("Failed to rewrite header\n"); + g_printerr (_("Failed to rewrite header\n")); return FALSE; } @@ -1158,7 +1159,7 @@ build_cache (const gchar *path) if (!cache) { - g_printerr ("Failed to write cache file: %s\n", g_strerror (errno)); + g_printerr (_("Failed to write cache file: %s\n"), g_strerror (errno)); exit (1); } @@ -1198,7 +1199,7 @@ build_cache (const gchar *path) g_unlink (bak_cache_path); if (g_rename (cache_path, bak_cache_path) == -1) { - g_printerr ("Could not rename %s to %s: %s, removing %s then.\n", + g_printerr (_("Could not rename %s to %s: %s, removing %s then.\n"), cache_path, bak_cache_path, g_strerror (errno), cache_path); @@ -1210,14 +1211,14 @@ build_cache (const gchar *path) if (g_rename (tmp_cache_path, cache_path) == -1) { - g_printerr ("Could not rename %s to %s: %s\n", + g_printerr (_("Could not rename %s to %s: %s\n"), tmp_cache_path, cache_path, g_strerror (errno)); g_unlink (tmp_cache_path); #ifdef G_OS_WIN32 if (bak_cache_path != NULL) if (g_rename (bak_cache_path, cache_path) == -1) - g_printerr ("Could not rename %s back to %s: %s.\n", + g_printerr (_("Could not rename %s back to %s: %s.\n"), bak_cache_path, cache_path, g_strerror (errno)); #endif @@ -1239,7 +1240,7 @@ build_cache (const gchar *path) utime (path, &utime_buf); if (!quiet) - g_printerr ("Cache file created successfully.\n"); + g_printerr (_("Cache file created successfully.\n")); } void @@ -1278,11 +1279,11 @@ write_csource (const gchar *path) } static GOptionEntry args[] = { - { "force", 'f', 0, G_OPTION_ARG_NONE, &force_update, "Overwrite an existing cache, even if uptodate", NULL }, - { "ignore-theme-index", 't', 0, G_OPTION_ARG_NONE, &ignore_theme_index, "Don't check for the existence of index.theme", NULL }, - { "index-only", 'i', 0, G_OPTION_ARG_NONE, &index_only, "Don't include image data in the cache", NULL }, - { "source", 'c', 0, G_OPTION_ARG_STRING, &var_name, "Output a C header file", "NAME" }, - { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Turn off verbose output", NULL }, + { "force", 'f', 0, G_OPTION_ARG_NONE, &force_update, N_("Overwrite an existing cache, even if uptodate"), NULL }, + { "ignore-theme-index", 't', 0, G_OPTION_ARG_NONE, &ignore_theme_index, N_("Don't check for the existence of index.theme"), NULL }, + { "index-only", 'i', 0, G_OPTION_ARG_NONE, &index_only, N_("Don't include image data in the cache"), NULL }, + { "source", 'c', 0, G_OPTION_ARG_STRING, &var_name, N_("Output a C header file"), "NAME" }, + { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, N_("Turn off verbose output"), NULL }, { NULL } }; @@ -1294,9 +1295,12 @@ main (int argc, char **argv) if (argc < 2) return 0; + + bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); context = g_option_context_new ("ICONPATH"); - g_option_context_add_main_entries (context, args, NULL); + g_option_context_add_main_entries (context, args, GETTEXT_PACKAGE); g_option_context_parse (context, &argc, &argv, NULL); @@ -1307,8 +1311,8 @@ main (int argc, char **argv) if (!ignore_theme_index && !has_theme_index (path)) { - g_printerr ("No theme index file in '%s'.\n" - "If you really want to create an icon cache here, use --ignore-theme-index.\n", path); + g_printerr (_("No theme index file in '%s'.\n" + "If you really want to create an icon cache here, use --ignore-theme-index.\n"), path); return 1; } diff --git a/po/ChangeLog b/po/ChangeLog index 5c951493dc..bcf5ffd60f 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2006-06-19 Matthias Clasen + + * POTFILES.in: add gtk/updateiconcache.c + 2006-06-19 Hendrik Richter * de.po: Updated German translation. diff --git a/po/POTFILES.in b/po/POTFILES.in index 22bfde11ac..3073db7b57 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -248,3 +248,4 @@ gtk/gtkrecentchooser.c gtk/gtktextbufferrichtext.c gtk/gtktextbufferserialize.c gtk/paper_names.c +gtk/updateiconcache.c