projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d295b0
)
Call textdomain() and bindtextdomain() at the beginning of initialize_locales() inste...
author
Art Cancro
<ajc@uncensored.citadel.org>
Sun, 19 Feb 2012 22:47:30 +0000
(17:47 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Sun, 19 Feb 2012 22:47:30 +0000
(17:47 -0500)
webcit/gettext.c
patch
|
blob
|
history
diff --git
a/webcit/gettext.c
b/webcit/gettext.c
index 5ae10394584427297d9797e9d397d1f76379b6cc..96c7206c55833c97cb10389f1fc8b5b3abc84476 100644
(file)
--- a/
webcit/gettext.c
+++ b/
webcit/gettext.c
@@
-293,6
+293,13
@@
void initialize_locales(void) {
char buf[32];
char *language = NULL;
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++;
nLocales = 0;
while (!IsEmptyStr(AvailLang[nLocales]))
nLocales++;
@@
-328,7
+335,12
@@
void initialize_locales(void) {
(((i > 0) && (wc_locales[0] != NULL)) ? wc_locales[0] : Empty_Locale)
);
if (wc_locales[nLocalesLoaded] == NULL) {
(((i > 0) && (wc_locales[0] != NULL)) ? wc_locales[0] : Empty_Locale)
);
if (wc_locales[nLocalesLoaded] == NULL) {
- syslog(1, "locale for %s disabled: %s", buf, strerror(errno));
+ syslog(1, "locale for %s disabled: %s (domain: %s, path: %s)",
+ buf,
+ strerror(errno),
+ textdomain(NULL),
+ bindtextdomain(textdomain(NULL), NULL)
+ );
}
else {
syslog(3, "Found locale: %s", buf);
}
else {
syslog(3, "Found locale: %s", buf);
@@
-364,13
+376,6
@@
void initialize_locales(void) {
AvailLangLoaded[0] = AvailLang[0];
nLocalesLoaded = 1;
}
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
}
}