summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Ziak <0xe2.0x9a.0x9b@xfce.org>2022-01-30 23:30:11 +0100
committerJan Ziak <0xe2.0x9a.0x9b@xfce.org>2022-01-30 23:30:11 +0100
commite3a9b0d2b22fdbaa1a9c4ecbac64cfe843b8b509 (patch)
treede93973a9964ac770f56433b82017172fd5f2fb5
parente25e7ff679b8d4d597a4e5e6bd50f2ce631f7b20 (diff)
downloadlibxfce4util-e3a9b0d2b22fdbaa1a9c4ecbac64cfe843b8b509.tar.gz
Remove invalid custom ngettext() macro
This patch removes all custom gettext macro definitions. There are multiple issues with these macros: - They are redundant: gettext functions are already declared in <libintl.h> - The implementations of the ngettext macros are invalid - If an Xfce GUI app or plugin accidentally uses any of the gettext macros defined in xfce-i18n.h, then it completely disables localication in the app or plugin The file <libintl.h> containing the declaration of gettext() has been included by both <gi18n.h> and <gi18n-lib.h> since year 2008 (at least). The removal also resolves the following warning messages: GISCAN Libxfce4util-1.0.gir xfce-i18n.h:61: Warning: Libxfce4util: symbol='gettext': Unknown namespace for symbol 'gettext' xfce-i18n.h:62: Warning: Libxfce4util: symbol='dgettext': Unknown namespace for symbol 'dgettext' xfce-i18n.h:63: Warning: Libxfce4util: symbol='dcgettext': Unknown namespace for symbol 'dcgettext' xfce-i18n.h:64: Warning: Libxfce4util: symbol='ngettext': Unknown namespace for symbol 'ngettext' xfce-i18n.h:65: Warning: Libxfce4util: symbol='dngettext': Unknown namespace for symbol 'dngettext' xfce-i18n.h:66: Warning: Libxfce4util: symbol='dcngettext': Unknown namespace for symbol 'dcngettext' Closes: https://gitlab.xfce.org/xfce/libxfce4util/-/issues/7
-rw-r--r--.gitignore3
-rw-r--r--libxfce4util/xfce-i18n.h30
2 files changed, 2 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
index cf9e810..a501f69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,4 +50,5 @@ libxfce4util/test-suite.log
xfce4-kiosk-query/xfce4-kiosk-query
xfce4-kiosk-query/xfce4_kiosk_query-main.o
-python-example/html/
+/nbproject
+/python-example/html/
diff --git a/libxfce4util/xfce-i18n.h b/libxfce4util/xfce-i18n.h
index 681c004..4f9cdc2 100644
--- a/libxfce4util/xfce-i18n.h
+++ b/libxfce4util/xfce-i18n.h
@@ -37,36 +37,6 @@
G_BEGIN_DECLS
-#if !defined(GETTEXT_PACKAGE)
-
-#ifdef gettext
-#undef gettext
-#endif
-#ifdef dgettext
-#undef dgettext
-#endif
-#ifdef dcgettext
-#undef dcgettext
-#endif
-#ifdef ngettext
-#undef ngettext
-#endif
-#ifdef dngettext
-#undef dngettext
-#endif
-#ifdef dcngettext
-#undef dcngettext
-#endif
-
-#define gettext(s) (s)
-#define dgettext(domain,s) (s)
-#define dcgettext(domain,s,type) (s)
-#define ngettext(msgid, msgid_plural, n) (((n) > 0) ? (msgid) : (msgid_plural))
-#define dngettext(domainname, msgid, msgid_plural, n) (((n) > 0) ? (msgid) : (msgid_plural))
-#define dcngettext(domainname, msgid, msgid_plural, n, type) (((n) > 0) ? (msgid) : (msgid_plural))
-
-#endif /* !defined(GETTEXT_PACKAGE) */
-
void xfce_textdomain (const gchar *package,
const gchar *localedir,
const gchar *encoding);