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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
This commit is contained in:
Xavier Claessens 2022-03-25 10:18:34 -04:00 committed by GStreamer Marge Bot
parent 82ca0e291b
commit e950095867
5 changed files with 5 additions and 6 deletions

View 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

View 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')

View 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

View 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')

View 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