top: fix a flaw in excluding a string from translation

In that commit referenced below, I removed the command
line help text from any translation so the TP wouldn't
delay our 4.0.1 release any further. In looking to the
future, when we might be able to reverse that, I found
gettext tools blocking use of the compile conditional.

They are too primitive for the original approach so we
must modify that exclusion mechanism hack accordingly.

____________________________excerpted program comments

The provision excluding some strings is intended to be
used very sparingly. It exists in case we collide with
some translation project person in a position to delay
a future release over his or her personal preferences.

If it's ever enabled, it will produce a fatal compiler
error as our only option since those gettext tools are
far too primitive to be influenced with a conditional.
They always ignore a '_X()' macro no matter its state.

Reference(s):
commit 8a368bfb05

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2022-10-04 00:00:00 -05:00 committed by Craig Small
parent 993bd1b7ab
commit ab05a3785f

View File

@ -28,16 +28,23 @@
#include <stdlib.h>
#endif
/*
* The provision excluding some strings is intended to be
* used very sparingly. It exists in case we collide with
* some translation project person in a position to delay
* a future release over his or her personal preferences.
* (it's currently used only on v4.0.1 command line help) */
#ifdef NLS_INCLUDED
# define _X(str) _(str)
#else
*
* If it's ever enabled, it will produce a fatal compiler
* error as our only option since those gettext tools are
* far too primitive to be influenced with a conditional.
* They always ignore a '_X()' macro no matter its state. */
#ifndef NLS_INCLUDED
# define _X(str) (str)
#else
# define _X(str)
# error instead of this #define, restore the true gettext macro(s)
#endif
// Programmer Note(s):