From 74a74db32e08b03135eb07792aee9adcd9aa90e3 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 26 Feb 2012 15:16:07 -0500 Subject: [PATCH] Revert "Call textdomain() and bindtextdomain() at the beginning of initialize_locales() instead of at the end. This has not yet solved my binding problem but it's definitely a step that is required." This reverts commit c68578c522448bdd34cb1d6ded094f25ec0578ff. --- webcit/gettext.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/webcit/gettext.c b/webcit/gettext.c index 96c7206c5..5ae103945 100644 --- a/webcit/gettext.c +++ b/webcit/gettext.c @@ -293,13 +293,6 @@ void initialize_locales(void) { char buf[32]; char *language = NULL; -#ifdef ENABLE_NLS - setlocale(LC_ALL, ""); - syslog(9, "Text domain: %s", textdomain("webcit")); - syslog(9, "Message catalog directory: %s", bindtextdomain(textdomain(NULL), LOCALEDIR)); - syslog(9, "Text domain Charset: %s", bind_textdomain_codeset("webcit","UTF8")); -#endif - nLocales = 0; while (!IsEmptyStr(AvailLang[nLocales])) nLocales++; @@ -335,12 +328,7 @@ void initialize_locales(void) { (((i > 0) && (wc_locales[0] != NULL)) ? wc_locales[0] : Empty_Locale) ); if (wc_locales[nLocalesLoaded] == NULL) { - syslog(1, "locale for %s disabled: %s (domain: %s, path: %s)", - buf, - strerror(errno), - textdomain(NULL), - bindtextdomain(textdomain(NULL), NULL) - ); + syslog(1, "locale for %s disabled: %s", buf, strerror(errno)); } else { syslog(3, "Found locale: %s", buf); @@ -376,6 +364,13 @@ void initialize_locales(void) { AvailLangLoaded[0] = AvailLang[0]; nLocalesLoaded = 1; } + +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + syslog(9, "Message catalog directory: %s", bindtextdomain("webcit", LOCALEDIR"/locale")); + syslog(9, "Text domain: %s", textdomain("webcit")); + syslog(9, "Text domain Charset: %s", bind_textdomain_codeset("webcit","UTF8")); +#endif } -- 2.30.2