From e950095867ba98e0e97a961176b76c4383ded240 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 25 Mar 2022 10:18:34 -0400 Subject: [PATCH] Always define ENABLE_NLS GLib guarantees libintl API is always available, provided by proxy-libintl as last resort. GLib itself unconditionally define ENABLE_NLS. Part-of: --- subprojects/gst-plugins-bad/meson.build | 2 +- subprojects/gst-plugins-base/meson.build | 2 +- subprojects/gst-plugins-good/meson.build | 2 +- subprojects/gst-plugins-ugly/meson.build | 3 ++- subprojects/gstreamer/docs/random/i18n | 2 -- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build index 5a235bc43a..87bda3f7ad 100644 --- a/subprojects/gst-plugins-bad/meson.build +++ b/subprojects/gst-plugins-bad/meson.build @@ -52,6 +52,7 @@ else endif cdata = configuration_data() +cdata.set('ENABLE_NLS', 1) if cc.get_id() == 'msvc' msvc_args = [ @@ -572,7 +573,6 @@ endif # xgettext is optional (on Windows for instance) if find_program('xgettext', required : get_option('nls')).found() - cdata.set('ENABLE_NLS', 1) subdir('po') endif diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build index 80278401e0..222cbcb417 100644 --- a/subprojects/gst-plugins-base/meson.build +++ b/subprojects/gst-plugins-base/meson.build @@ -96,6 +96,7 @@ if cc.has_link_argument('-Wl,-Bsymbolic-functions') endif core_conf = configuration_data() +core_conf.set('ENABLE_NLS', 1) # Symbol visibility if cc.get_id() == 'msvc' @@ -476,7 +477,6 @@ subdir('tests') # xgettext is optional (on Windows for instance) if find_program('xgettext', required : get_option('nls')).found() - core_conf.set('ENABLE_NLS', 1) subdir('po') endif subdir('docs') diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build index ea9f931745..4390566594 100644 --- a/subprojects/gst-plugins-good/meson.build +++ b/subprojects/gst-plugins-good/meson.build @@ -119,6 +119,7 @@ if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev) endif cdata = configuration_data() +cdata.set('ENABLE_NLS', 1) check_headers = [ ['HAVE_DLFCN_H', 'dlfcn.h'], @@ -494,7 +495,6 @@ endif # xgettext is optional (on Windows for instance) if find_program('xgettext', required : get_option('nls')).found() - cdata.set('ENABLE_NLS', 1) subdir('po') endif diff --git a/subprojects/gst-plugins-ugly/meson.build b/subprojects/gst-plugins-ugly/meson.build index b7adc060b6..34a7309dd6 100644 --- a/subprojects/gst-plugins-ugly/meson.build +++ b/subprojects/gst-plugins-ugly/meson.build @@ -89,6 +89,8 @@ if have_cxx and cxx.has_link_argument('-Wl,-Bsymbolic-functions') endif cdata = configuration_data() +cdata.set('ENABLE_NLS', 1) + check_headers = [ ['HAVE_DLFCN_H', 'dlfcn.h'], ['HAVE_INTTYPES_H', 'inttypes.h'], @@ -302,7 +304,6 @@ subdir('tests') # xgettext is optional (on Windows for instance) if find_program('xgettext', required : get_option('nls')).found() - cdata.set('ENABLE_NLS', 1) subdir('po') endif subdir('docs') diff --git a/subprojects/gstreamer/docs/random/i18n b/subprojects/gstreamer/docs/random/i18n index fb5e7c6fa3..2b6cfdcf55 100644 --- a/subprojects/gstreamer/docs/random/i18n +++ b/subprojects/gstreamer/docs/random/i18n @@ -11,8 +11,6 @@ Internationalization notes - use dgettext (possibly disguised as _) to translate from a set domain - How to make your plug-in code translatable: - - include in all files that mark strings for - translation, or do the bindtextdomain call - in plugin_init, add a block like this: #ifdef ENABLE_NLS -- 2.34.1