From: Bruno Haible Date: Fri, 14 Jul 2023 16:23:06 +0000 (+0200) Subject: msgmerge: Deprecate option '--sort-output'. X-Git-Tag: v0.23~417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a9b25f4ec6fa23191136da48553bbb9d966831;p=thirdparty%2Fgettext.git msgmerge: Deprecate option '--sort-output'. Reported by Ben Siemerink in . * 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. --- diff --git a/NEWS b/NEWS index 7420e9ece..07aace64f 100644 --- 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: diff --git a/gettext-tools/doc/msgmerge.texi b/gettext-tools/doc/msgmerge.texi index c64a22cf0..ce335e5cb 100644 --- a/gettext-tools/doc/msgmerge.texi +++ b/gettext-tools/doc/msgmerge.texi @@ -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 diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index 17fd8c22a..c3e614289 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -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");