From bdf7816f92b3dc9bbbdfa2f8af8e6379beea4b7d Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 20 Nov 2017 11:06:51 -0500 Subject: src/main.c: Internationalize --- (limited to 'src') diff --git a/src/main.c b/src/main.c index cd3618c..bd9e7ef 100644 --- a/src/main.c +++ b/src/main.c @@ -28,6 +28,7 @@ #include #include "application.h" +#include "i18n.h" extern const char *PACKAGE_VERSION_GIT; @@ -38,16 +39,16 @@ static const gchar **opt_uris; static GOptionEntry entries[] = { {"profile", 'P', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, &opt_profile, - "Load configuration and browsing data from PROFILE", - "PROFILE"}, + N_("Load configuration and browsing data from PROFILE"), + N_("PROFILE")}, {"version", 'V', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, &opt_version, - "Show application version", + N_("Show application version"), NULL}, {G_OPTION_REMAINING, '\0', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING_ARRAY, &opt_uris, - "URIs", + N_("URIs"), NULL}, {NULL} }; @@ -59,8 +60,8 @@ main(int argc, char *argv[]) MqApplication *application; error = NULL; - if (G_UNLIKELY(!gtk_init_with_args(&argc, &argv, "[URI]", entries, NULL, - &error))) { + if (G_UNLIKELY(!gtk_init_with_args(&argc, &argv, N_("[URI]"), entries, + NULL, &error))) { g_print("%s: %s\n", PACKAGE, error->message); return EXIT_FAILURE; } @@ -68,14 +69,15 @@ main(int argc, char *argv[]) if (G_UNLIKELY(opt_version)) { g_print("%s %s%s\n", PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_VERSION_GIT); - g_print("Copyright (C) %s %s\n", "2017", "Patrick McDermott"); - g_print("License GPLv3+: GNU GPL version 3 or later " + g_print(_("Copyright (C) %s %s\n"), + "2017", "Patrick McDermott"); + g_print(_("License GPLv3+: GNU GPL version 3 or later " ".\n" "This is free software: you are free to change and " "redistribute it.\n" "There is NO WARRANTY, to the extent permitted by " - "law.\n\n"); - g_print("Please report bugs to <%s>.\n", PACKAGE_BUGREPORT); + "law.\n\n")); + g_print(_("Please report bugs to <%s>.\n"), PACKAGE_BUGREPORT); return EXIT_SUCCESS; } -- cgit v0.9.1