Always define ENABLE_NLS
authorXavier Claessens <xavier.claessens@collabora.com>
Fri, 25 Mar 2022 14:18:34 +0000 (10:18 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 19 Apr 2022 18:01:06 +0000 (18:01 +0000)
GLib guarantees libintl API is always available, provided by
proxy-libintl as last resort. GLib itself unconditionally define
ENABLE_NLS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>

subprojects/gst-plugins-bad/meson.build
subprojects/gst-plugins-base/meson.build
subprojects/gst-plugins-good/meson.build
subprojects/gst-plugins-ugly/meson.build
subprojects/gstreamer/docs/random/i18n

index 5a235bc..87bda3f 100644 (file)
@@ -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
 
index 8027840..222cbcb 100644 (file)
@@ -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')
index ea9f931..4390566 100644 (file)
@@ -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
 
index b7adc06..34a7309 100644 (file)
@@ -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')
index fb5e7c6..2b6cfdc 100644 (file)
@@ -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 <gst/gst-i18n-plugin.h> in all files that mark strings for
-    translation, or do the bindtextdomain call
   - in plugin_init, add a block like this:
 
 #ifdef ENABLE_NLS