]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msgmerge: Deprecate option '--sort-output'.
authorBruno Haible <bruno@clisp.org>
Fri, 14 Jul 2023 16:23:06 +0000 (18:23 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 14 Jul 2023 16:23:06 +0000 (18:23 +0200)
Reported by Ben Siemerink <gnu@mail.qoben.com> in
<https://savannah.gnu.org/bugs/?61249>.

* gettext-tools/src/msgmerge.c (main): Warn when option '--sort-output' is used.
(usage): Mark the option '--sort-output' deprecated.
* gettext-tools/doc/msgmerge.texi: Likewise.
* NEWS: Mention it.

NEWS
gettext-tools/doc/msgmerge.texi
gettext-tools/src/msgmerge.c

diff --git a/NEWS b/NEWS
index 7420e9ecee73f18e3f81d5e600c1902ee85feccb..07aace64f3d378eb64a14647582051c0873243cc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ Version 0.23 - July 2023
 * Programming languages support:
   - Glade: xgettext has improved support for GtkBuilder 4.
 
+* msgmerge:
+  - The msgmerge option '--sorted-output' is now deprecated.
+
 Version 0.22 - June 2023
 
 * PO file format:
index c64a22cf0d4c03edec0c37bfad37468703b7a78e..ce335e5cb47d036d4df044af89bb510f8cb0bc31 100644 (file)
@@ -1,5 +1,5 @@
 @c This file is part of the GNU gettext manual.
-@c Copyright (C) 1995-2019 Free Software Foundation, Inc.
+@c Copyright (C) 1995-2023 Free Software Foundation, Inc.
 @c See the file gettext.texi for copying conditions.
 
 @pindex msgmerge
@@ -249,8 +249,8 @@ lines which are wider than the output page width will be split.
 @opindex -s@r{, @code{msgmerge} option}
 @opindex --sort-output@r{, @code{msgmerge} option}
 @cindex sorting @code{msgmerge} output
-Generate sorted output.  Note that using this option makes it much harder
-for the translator to understand each message's context.
+Generate sorted output (deprecated).  Note that using this option makes it
+much harder for the translator to understand each message's context.
 
 @item -F
 @itemx --sort-by-file
index 17fd8c22a3b3c8ffb4ee6bf64f302284a12e9132..c3e614289579a701401b50c0e9c20b25f82eb48c 100644 (file)
@@ -436,6 +436,11 @@ There is NO WARRANTY, to the extent permitted by law.\n\
     error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"),
            "--sort-output", "--sort-by-file");
 
+  /* Warn when deprecated options are used.  */
+  if (sort_by_msgid)
+    error (EXIT_SUCCESS, 0, _("The option '%s' is deprecated."),
+           "--sort-output");
+
   /* In update mode, --properties-input implies --properties-output.  */
   if (update_mode && input_syntax == &input_format_properties)
     output_syntax = &output_format_properties;
@@ -654,7 +659,7 @@ Output details:\n"));
       --no-wrap               do not break long message lines, longer than\n\
                               the output page width, into several lines\n"));
       printf (_("\
-  -s, --sort-output           generate sorted output\n"));
+  -s, --sort-output           generate sorted output (deprecated)\n"));
       printf (_("\
   -F, --sort-by-file          sort output by file location\n"));
       printf ("\n");