summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-20 11:06:51 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-20 11:06:51 (EST)
commitbdf7816f92b3dc9bbbdfa2f8af8e6379beea4b7d (patch)
tree195b98d2d57f96118be3b28c7fa2c089195eaa7c /src
parent442ad4ec92ff9d3339925ed600076f5c18a5cf2b (diff)
downloadmarquee-bdf7816f92b3dc9bbbdfa2f8af8e6379beea4b7d.zip
marquee-bdf7816f92b3dc9bbbdfa2f8af8e6379beea4b7d.tar.gz
marquee-bdf7816f92b3dc9bbbdfa2f8af8e6379beea4b7d.tar.bz2
src/main.c: Internationalize
Diffstat (limited to 'src')
-rw-r--r--src/main.c22
1 files changed, 12 insertions, 10 deletions
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 <gtk/gtk.h>
#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 "
"<http://gnu.org/licenses/gpl.html>.\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;
}