clean up mess with libintl

The header must exist, the lib itself may not
This commit is contained in:
Boris Faure 2019-07-08 00:06:51 +02:00
parent fb922e0ec4
commit 048c5cb825
6 changed files with 9 additions and 10 deletions

View File

@ -63,7 +63,7 @@ edj_files = []
if get_option('nls') == true
subdir('po')
terminology_dependencies += cc.find_library('intl', required: true)
terminology_dependencies += cc.find_library('intl', required: false)
endif
foreach efl_dep: efl_deps

View File

@ -28,6 +28,5 @@ if get_option('nls')
'--from-code=UTF-8',
'--foreign-user'
])
config_data.set('HAVE_GETTEXT', '1')
config_data.set('ENABLE_NLS', '1')
endif

View File

@ -850,7 +850,7 @@ key_bindings_load(Config *config)
if (!_key_bindings)
{
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
Shortcut_Action *action = _actions;
while (action->action)

View File

@ -418,7 +418,7 @@ static Ecore_Getopt options = {
}
};
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
static void
_translate_options(void)
{
@ -559,12 +559,12 @@ elm_main(int argc, char **argv)
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
elm_app_compile_locale_set(LOCALEDIR);
#endif
elm_app_info_set(elm_main, "terminology", "themes/default.edj");
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
bindtextdomain(PACKAGE, elm_app_locale_dir_get());
textdomain(PACKAGE);
_translate_options();
@ -1002,7 +1002,7 @@ remote:
_log_domain = -1;
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
eina_stringshare_del(options.copyright);
#endif

View File

@ -60,7 +60,7 @@ _cb_op_color_item_sel(void *data,
continue;
if (ctx->colitem[j][i] == it)
elm_object_text_set(ctx->label,
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
gettext(mapping_names[i])
#else
mapping_names[i]
@ -326,7 +326,7 @@ options_colors(Evas_Object *opbox, Evas_Object *term, Evas_Object *bg)
ctx->label = o = elm_label_add(opbox);
elm_object_text_set(o,
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
gettext(mapping_names[0])
#else
mapping_names[0]

View File

@ -5,7 +5,7 @@
#include "terminology_config.h"
#endif
#if HAVE_GETTEXT && ENABLE_NLS
#if ENABLE_NLS
#include <libintl.h>
#define _(string) gettext (string)
#else