From 0b2b6207c24bfab3878185d1f907fd0d960931da Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Tue, 19 Oct 2021 00:06:23 +0200 Subject: Factor out i18n stuff into separate i18n.h files Factor out the i18n definitions into i18n.h include files: One include file each for libgphoto2 and for libgphoto2_port. This removes the complete #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define _(String) (String) # define N_(String) (String) #endif block (which in some occasions defines even more macros) and replaces it with a single line #include "libgphoto2/i18n.h" for camlibs and libgphoto2 itself and with #include "libgphoto2_port/i18n.h" for iolibs and libgphoto2_port itself. This gives us two central locations to change the defintions. --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index da99fccfb..a4a38b3ac 100644 --- a/configure.ac +++ b/configure.ac @@ -194,7 +194,10 @@ dnl i18n support (including some hacks) dnl --------------------------------------------------------------------------- ALL_LINGUAS="cs da de es eu fr hu it ja nl pl ru sv uk vi zh_CN" -GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}]) +GP_GETTEXT_HACK([GETTEXT_PACKAGE_LIBGPHOTO2], + [${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}], + [The gPhoto Team], + [${MAIL_GPHOTO_TRANSLATION}]) AM_PO_SUBDIRS() AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT([external]) -- cgit v1.2.1