full intl support
authorJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 6 May 2012 10:29:15 +0000 (10:29 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 6 May 2012 10:29:15 +0000 (10:29 +0000)
src/main.c

index 0b193b4..9bc93a0 100644 (file)
@@ -1,23 +1,24 @@
-/*a
-    Copyright (C) 2011 jeanfi@gmail.com
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301 USA
-*/
+/*
+ * Copyright (C) 2011-2012 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
 #include <libintl.h>
-#define _(String) gettext (String)
+#define _(String) gettext(String)
 
 #include <getopt.h>
 #include <stdlib.h>
@@ -110,11 +111,12 @@ static void print_help()
 {
        printf(_("Usage: %s [OPTION]... PPA_OWNER PPA_NAME\n"), program_name);
 
-       puts("ppastats is a command application"
-            " for generating PPA statistics.\n");
+       puts(_("ppastats is a command application"
+              " for generating PPA statistics.\n"));
 
-       puts("Prints number of downloads for each published packages of a PPA "
-            "or generates an HTML page containing a graph representation.");
+       puts(_("Prints number of downloads for each published packages of a "
+              "PPA or generates an HTML page containing a graph "
+              "representation."));
 
        puts("");
        puts(_("Options:"));
@@ -124,25 +126,23 @@ static void print_help()
 
        puts("");
 
-       puts("\
-  -o, --output-dir=[PATH]       \
-generates HTML pages into 'PATH'.");
+       puts(_("\
+  -o, --output-dir=[PATH]       generates HTML pages into 'PATH'."));
 
-       puts("\
+       puts(_("\
   -s, --status=[STATUS]                retrieves only package of the given status\n\
                                (possible values are: Pending, Published, \n\
-                               Superseded, Deleted or Obsolete).");
+                               Superseded, Deleted or Obsolete)."));
 
-       puts("\
-  -S, --skip-js-css            skip installation of js and css files");
+       puts(_("\
+  -S, --skip-js-css            skip installation of js and css files"));
        puts("");
 
-       printf("Report bugs to: %s\n", PACKAGE_BUGREPORT);
+       printf(_("Report bugs to: %s\n"), PACKAGE_BUGREPORT);
        puts("");
-       printf("%s home page: <%s>\n", PACKAGE_NAME, PACKAGE_URL);
+       printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
 }
 
-
 int main(int argc, char **argv)
 {
        char *owner, *ppa;
@@ -189,7 +189,7 @@ int main(int argc, char **argv)
        }
 
        if (!cmdok || optind + 2 != argc) {
-               fprintf(stderr, "Try `%s --help' for more information.\n",
+               fprintf(stderr, _("Try `%s --help' for more information.\n"),
                        program_name);
                exit(EXIT_FAILURE);
        }