summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2022-10-04 00:00:00 -0500
committerCraig Small <csmall@dropbear.xyz>2022-10-06 22:05:36 +1100
commitab05a3785f29cc4b754e17c53bfb3d8ba054563e (patch)
tree7c5e3db3b355536f7dc8b28846d21a919d58a5de /src
parent993bd1b7ab358ef1ae2b015cdff5129e1cc51620 (diff)
downloadprocps-ng-ab05a3785f29cc4b754e17c53bfb3d8ba054563e.tar.gz
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 8a368bfb05a978a9904647f128dec8f1c4d4cc84 Signed-off-by: Jim Warner <james.warner@comcast.net>
Diffstat (limited to 'src')
-rw-r--r--src/top/top_nls.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/top/top_nls.c b/src/top/top_nls.c
index 6dde025..84d8acd 100644
--- a/src/top/top_nls.c
+++ b/src/top/top_nls.c
@@ -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):