X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fmain.c;h=0b193b468f2520f91748942f75f10ef385cd4a78;hb=50cb5b56107bbbdc5eb1565404015efaba66bed4;hp=94cf6964a96a366f50e8a16ca97c978344460e82;hpb=04e8520815632d17a6705219ad8301c1352058f6;p=ppastats.git diff --git a/src/main.c b/src/main.c index 94cf696..0b193b4 100644 --- a/src/main.c +++ b/src/main.c @@ -16,6 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#define _(String) gettext (String) #include #include @@ -96,17 +98,17 @@ static struct option long_options[] = { static void print_version() { printf("ppastats %s\n", VERSION); - printf("Copyright (C) %s jeanfi@gmail.com\n\ + printf(_("Copyright (C) %s jeanfi@gmail.com\n\ License GPLv2: GNU GPL version 2 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", - "2011"); +There is NO WARRANTY, to the extent permitted by law.\n"), + "2011-2012"); } static void print_help() { - printf("Usage: %s [OPTION]... PPA_OWNER PPA_NAME\n", program_name); + printf(_("Usage: %s [OPTION]... PPA_OWNER PPA_NAME\n"), program_name); puts("ppastats is a command application" " for generating PPA statistics.\n"); @@ -115,10 +117,10 @@ static void print_help() "or generates an HTML page containing a graph representation."); puts(""); - puts("Options:"); - puts("\ + puts(_("Options:")); + puts(_("\ -h, --help display this help and exit\n\ - -v, --version display version information and exit"); + -v, --version display version information and exit")); puts(""); @@ -153,6 +155,10 @@ int main(int argc, char **argv) program_name = argv[0]; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + while ((optc = getopt_long(argc, argv, "vho:ds:S", long_options, NULL)) != -1) { switch (optc) {