]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
version-etc: Optionally emit another line for the man page.
authorBruno Haible <bruno@clisp.org>
Fri, 24 Apr 2026 13:31:00 +0000 (15:31 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 24 Apr 2026 13:58:31 +0000 (15:58 +0200)
* lib/version-etc.c: Include <stdlib.h>.
(emit_bug_reporting_address): Terminate the "Report bugs to" sentence,
as suggested in
https://www.gnu.org/software/gettext/manual/html_node/Bug-Report-Address.html.
Add a "Report any translation bugs to" sentence, but only when producing
a man page.

ChangeLog
lib/version-etc.c

index 49c5616992ffa39cf248fc1055c2682a9c92bdfe..b364f67a61aad25e6c9e72d22fdcd1fa31a7cddc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2026-04-24  Bruno Haible  <bruno@clisp.org>
+
+       version-etc: Optionally emit another line for the man page.
+       * lib/version-etc.c: Include <stdlib.h>.
+       (emit_bug_reporting_address): Terminate the "Report bugs to" sentence,
+       as suggested in
+       https://www.gnu.org/software/gettext/manual/html_node/Bug-Report-Address.html.
+       Add a "Report any translation bugs to" sentence, but only when producing
+       a man page.
+
 2026-04-24  Bruno Haible  <bruno@clisp.org>
 
        bcp47: Fix handling of variants of length 4.
index b5778709b7d7ecbe7a76599ed259fa4d51096d99..d6131a0bfded71a06c05b66689bf933f6ce6695d 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #if USE_UNLOCKED_IO
 # include "unlocked-io.h"
@@ -245,7 +246,15 @@ emit_bug_reporting_address (void)
      for this package.  Please add _another line_ saying
      "Report translation bugs to <...>\n" with the address for translation
      bugs (typically your translation team's web or email address).  */
-  printf (_("Report bugs to: %s\n"), PACKAGE_BUGREPORT);
+  printf (_("Report bugs to: <%s>.\n"), PACKAGE_BUGREPORT);
+#ifdef PACKAGE_L10N_BUGREPORT
+  /* PACKAGE_L10N_BUGREPORT may be defined to the URL of the package's
+     translation project, e.g. "https://translationproject.org/team/".  */
+  /* Get this reporting instruction included in the (English) man page
+     only.  No need to include it in the normal --help output.  */
+  if (getenv ("IN_HELP2MAN") != NULL)
+    printf ("Report any translation bugs to: <%s>.\n", PACKAGE_L10N_BUGREPORT);
+#endif
 #ifdef PACKAGE_PACKAGER_BUG_REPORTS
   printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
           PACKAGE_PACKAGER_BUG_REPORTS);