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 if get_option('nls') == true
subdir('po') subdir('po')
terminology_dependencies += cc.find_library('intl', required: true) terminology_dependencies += cc.find_library('intl', required: false)
endif endif
foreach efl_dep: efl_deps foreach efl_dep: efl_deps

View File

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

View File

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

View File

@ -418,7 +418,7 @@ static Ecore_Getopt options = {
} }
}; };
#if HAVE_GETTEXT && ENABLE_NLS #if ENABLE_NLS
static void static void
_translate_options(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_bin_dir_set(PACKAGE_BIN_DIR);
elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
#if HAVE_GETTEXT && ENABLE_NLS #if ENABLE_NLS
elm_app_compile_locale_set(LOCALEDIR); elm_app_compile_locale_set(LOCALEDIR);
#endif #endif
elm_app_info_set(elm_main, "terminology", "themes/default.edj"); 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()); bindtextdomain(PACKAGE, elm_app_locale_dir_get());
textdomain(PACKAGE); textdomain(PACKAGE);
_translate_options(); _translate_options();
@ -1002,7 +1002,7 @@ remote:
_log_domain = -1; _log_domain = -1;
#if HAVE_GETTEXT && ENABLE_NLS #if ENABLE_NLS
eina_stringshare_del(options.copyright); eina_stringshare_del(options.copyright);
#endif #endif

View File

@ -60,7 +60,7 @@ _cb_op_color_item_sel(void *data,
continue; continue;
if (ctx->colitem[j][i] == it) if (ctx->colitem[j][i] == it)
elm_object_text_set(ctx->label, elm_object_text_set(ctx->label,
#if HAVE_GETTEXT && ENABLE_NLS #if ENABLE_NLS
gettext(mapping_names[i]) gettext(mapping_names[i])
#else #else
mapping_names[i] 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); ctx->label = o = elm_label_add(opbox);
elm_object_text_set(o, elm_object_text_set(o,
#if HAVE_GETTEXT && ENABLE_NLS #if ENABLE_NLS
gettext(mapping_names[0]) gettext(mapping_names[0])
#else #else
mapping_names[0] mapping_names[0]

View File

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