diff --git a/po/LINGUAS b/po/LINGUAS diff --git a/po/Makefile.in.in b/po/Makefile.in.in diff --git a/src/Makefile.am b/src/Makefile.am index aa96ab7..aba6eb4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,6 +16,7 @@ INCLUDES = \ -DPREFIX=\""$(prefix)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DLIBDIR=\""$(libdir)"\" \ + -DLOCALEDIR=\""$(localedir)"\" \ -DVERSION="\"$(VERSION)\"" \ -DPK_DATA=\"$(pkgdatadir)\" \ -I$(top_srcdir)/libgbus \ diff --git a/src/pk-application-main.c b/src/pk-application-main.c index 703ef7a..042bd5f 100644 --- a/src/pk-application-main.c +++ b/src/pk-application-main.c @@ -72,12 +72,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } diff --git a/src/pk-backend-status.c b/src/pk-backend-status.c index a871bbc..d392d4f 100644 --- a/src/pk-backend-status.c +++ b/src/pk-backend-status.c @@ -72,12 +72,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } diff --git a/src/pk-install-file.c b/src/pk-install-file.c index 6f997de..63f2365 100644 --- a/src/pk-install-file.c +++ b/src/pk-install-file.c @@ -65,12 +65,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } @@ -93,7 +99,7 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); if (argc < 2) { - g_print ("You need to specify a file to install\n"); + g_print (_("You need to specify a file to install\n")); return 1; } diff --git a/src/pk-install-package.c b/src/pk-install-package.c index 1f88f5c..fde48b4 100644 --- a/src/pk-install-package.c +++ b/src/pk-install-package.c @@ -132,12 +132,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } @@ -160,7 +166,7 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); if (argc < 2) { - g_print ("You need to specify a package to install\n"); + g_print (_("You need to specify a package to install\n")); return 1; } loop = g_main_loop_new (NULL, FALSE); diff --git a/src/pk-prefs.c b/src/pk-prefs.c index 2c225e5..770017d 100644 --- a/src/pk-prefs.c +++ b/src/pk-prefs.c @@ -36,14 +36,14 @@ #include #include "pk-common-gui.h" -#define PK_FREQ_HOURLY_TEXT _("Hourly") -#define PK_FREQ_DAILY_TEXT _("Daily") -#define PK_FREQ_WEEKLY_TEXT _("Weekly") -#define PK_FREQ_NEVER_TEXT _("Never") +#define PK_FREQ_HOURLY_TEXT N_("Hourly") +#define PK_FREQ_DAILY_TEXT N_("Daily") +#define PK_FREQ_WEEKLY_TEXT N_("Weekly") +#define PK_FREQ_NEVER_TEXT N_("Never") -#define PK_UPDATE_ALL_TEXT _("All updates") -#define PK_UPDATE_SECURITY_TEXT _("Only security updates") -#define PK_UPDATE_NONE_TEXT _("Nothing") +#define PK_UPDATE_ALL_TEXT N_("All updates") +#define PK_UPDATE_SECURITY_TEXT N_("Only security updates") +#define PK_UPDATE_NONE_TEXT N_("Nothing") static GladeXML *glade_xml = NULL; @@ -293,12 +293,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } diff --git a/src/pk-repo.c b/src/pk-repo.c index d0e3e74..921ee87 100644 --- a/src/pk-repo.c +++ b/src/pk-repo.c @@ -216,12 +216,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } @@ -294,7 +300,7 @@ main (int argc, char *argv[]) /* get the update list */ pk_client_get_repo_list (client); } else { - pk_repo_detail_cb (client, "default", "Getting repository list not supported by backend", FALSE, NULL); + pk_repo_detail_cb (client, "default", _("Getting repository list not supported by backend"), FALSE, NULL); widget = glade_xml_get_widget (glade_xml, "treeview_repo"); gtk_widget_set_sensitive (widget, FALSE); } diff --git a/src/pk-transaction-viewer.c b/src/pk-transaction-viewer.c index 2d3dec7..7f85f1c 100644 --- a/src/pk-transaction-viewer.c +++ b/src/pk-transaction-viewer.c @@ -110,7 +110,7 @@ pk_transaction_db_get_pretty_date (const gchar *timespec) date = g_date_new (); g_date_set_time_val (date, &timeval); - g_date_strftime (buffer, 100, "%A, %d %B %Y", date); + g_date_strftime (buffer, 100, _("%A, %d %B %Y"), date); g_date_free (date); return g_strdup (buffer); } @@ -344,12 +344,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } diff --git a/src/pk-update-icon.c b/src/pk-update-icon.c index 9ac9feb..63f36db 100644 --- a/src/pk-update-icon.c +++ b/src/pk-update-icon.c @@ -50,12 +50,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); } diff --git a/src/pk-update-viewer.c b/src/pk-update-viewer.c index d041a10..e11bf70 100644 --- a/src/pk-update-viewer.c +++ b/src/pk-update-viewer.c @@ -1010,12 +1010,18 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, - "Show extra debugging information", NULL }, + N_("Show extra debugging information"), NULL }, { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show the program version and exit", NULL }, + N_("Show the program version and exit"), NULL }, { NULL} }; + setlocale (LC_ALL, ""); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (! g_thread_supported ()) { g_thread_init (NULL); }