Fix --no-nls (3/5), prefer #if in gtk2_ardour

This is for consistency with system-wide gettext.h which is used
by some 3rd party libs. system-wide gettext uses `#if ENABLE_NLS`,
not #ifdef
This commit is contained in:
Robin Gareus
2018-09-21 19:04:06 +02:00
parent 497a3fbaa1
commit dade5fca7d
5 changed files with 6 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ fixup_bundle_environment (int argc, char* argv[], string & localedir)
bundle_dir = Glib::path_get_dirname (exec_dir);
#ifdef ENABLE_NLS
#if ENABLE_NLS
if (!ARDOUR::translations_are_enabled ()) {
localedir = "/this/cannot/exist";
} else {

View File

@@ -67,7 +67,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[], string & localedir)
}
#endif
#ifdef ENABLE_NLS
#if ENABLE_NLS
if (!ARDOUR::translations_are_enabled ()) {
localedir = "/this/cannot/exist";
} else {

View File

@@ -20,7 +20,7 @@
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#ifdef ENABLE_NLS
#if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>

View File

@@ -311,7 +311,7 @@ int main (int argc, char *argv[])
fftwf_make_planner_thread_safe ();
#endif
#ifdef ENABLE_NLS
#if ENABLE_NLS
/* initialize C locale to user preference */
if (ARDOUR::translations_are_enabled ()) {
setlocale (LC_ALL, "");
@@ -327,7 +327,7 @@ int main (int argc, char *argv[])
windows_vst_gui_init (&argc, &argv);
#endif
#ifdef ENABLE_NLS
#if ENABLE_NLS
cerr << "bind txt domain [" << PACKAGE << "] to " << localedir << endl;
(void) bindtextdomain (PACKAGE, localedir.c_str());

View File

@@ -2280,7 +2280,7 @@ RCOptionEditor::RCOptionEditor ()
));
#ifdef ENABLE_NLS
#if ENABLE_NLS
add_option (_("General/Translation"), new OptionEditorHeading (_("Internationalization")));