projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Remove ENABLE_NLS definition. Either we HAVE_USELOCALE or we don't translate...
[citadel.git]
/
webcit
/
setup.c
diff --git
a/webcit/setup.c
b/webcit/setup.c
index f4653dcac0563304ce5d32be7b594e13acce5627..cfb215eb73f8a275349fdf5dfa229d380174d105 100644
(file)
--- a/
webcit/setup.c
+++ b/
webcit/setup.c
@@
-31,10
+31,15
@@
void RegisterNS(const char *NSName, long len,
void RegisterHeaderHandler(const char *Name, long Len, Header_Evaluator F){}
pthread_key_t MyConKey;
void RegisterHeaderHandler(const char *Name, long Len, Header_Evaluator F){}
pthread_key_t MyConKey;
+#ifdef ENABLE_NLS
+
#ifdef HAVE_USELOCALE
int localeoffset = 1;
#ifdef HAVE_USELOCALE
int localeoffset = 1;
+#else
+int localeoffset = 0;
#endif
#endif
+#endif
/*
* Delete an entry from /etc/inittab
*/
/*
* Delete an entry from /etc/inittab
*/
@@
-406,7
+411,7
@@
void progress(char *text, long int curr, long int cmax)
*/
void install_init_scripts(void)
{
*/
void install_init_scripts(void)
{
-#ifdef
HAVE_USELOCALE
+#ifdef
ENABLE_NLS
int localechoice;
#endif
char question[1024];
int localechoice;
#endif
char question[1024];
@@
-441,8
+446,10
@@
void install_init_scripts(void)
return;
return;
-#ifdef HAVE_USELOCALE
+#ifdef ENABLE_NLS
+
localechoice = GetLocalePrefs();
localechoice = GetLocalePrefs();
+
#endif
/* Defaults */
sprintf(http_port, "2000");
#endif
/* Defaults */
sprintf(http_port, "2000");
@@
-548,18
+555,22
@@
void install_init_scripts(void)
fprintf(fp, "CTDL_HOSTNAME=%s\n", hostname);
fprintf(fp, "CTDL_PORTNAME=%s\n", portname);
fprintf(fp, "CTDL_HOSTNAME=%s\n", hostname);
fprintf(fp, "CTDL_PORTNAME=%s\n", portname);
-#ifdef HAVE_USELOCALE
+#ifdef ENABLE_NLS
+
if (localechoice == 0) {
if (localechoice == 0) {
+#ifdef HAVE_USELOCALE
+ fprintf(fp, "unset LANG\n");
+#else
+ fprintf(fp, "export WEBCIT_LANG=c\n");
+#endif
+ }
+ else {
fprintf(fp, "export WEBCIT_LANG=%s\n", AvailLang[localechoice - localeoffset]);
fprintf(fp, "export WEBCIT_LANG=%s\n", AvailLang[localechoice - localeoffset]);
+
}
#else
fprintf(fp, "# your system doesn't support locales\n");
#endif
}
#else
fprintf(fp, "# your system doesn't support locales\n");
#endif
-
-
-
-
-
fprintf(fp, "\n"
"\n"
"case \"$1\" in\n"
fprintf(fp, "\n"
"\n"
"case \"$1\" in\n"