From 0084d3177b87b2a5c4ac1e7b24430b181678d966 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 1 Jan 2009 21:09:12 +0000 Subject: [PATCH] * add gettext tokens to the tabbed api * remove all templates that just contain translated strings needed before... * exit configure if openssl features were requested, but the library wasn't detected. --- webcit/configure.ac | 7 ++++++- webcit/static/t/aide_inetconf.html | 14 +++++++------- webcit/static/t/display_aide_menu.html | 8 ++++---- webcit/static/t/display_main_menu.html | 6 +++--- webcit/static/t/display_serverrestart.html | 2 +- webcit/static/t/display_serverrestartpage.html | 2 +- webcit/static/t/display_sitewide_config.html | 18 +++++++++--------- webcit/static/t/edituser_select.html | 4 ++-- .../static/t/subj_advanced_roomcommands.html | 1 - webcit/static/t/subj_basic_commands.html | 1 - webcit/static/t/subj_your_info.html | 1 - webcit/static/t/subject_access.html | 1 - webcit/static/t/subject_aiderestart.html | 1 - webcit/static/t/subject_autopurger.html | 1 - .../static/t/subject_box_edituser_select.html | 1 - webcit/static/t/subject_directory.html | 1 - webcit/static/t/subject_edituser_add.html | 1 - webcit/static/t/subject_floorconfig.html | 1 - webcit/static/t/subject_general.html | 1 - webcit/static/t/subject_global_config.html | 1 - webcit/static/t/subject_indexing.html | 1 - webcit/static/t/subject_inet_aliases.html | 1 - webcit/static/t/subject_inet_clamav.html | 1 - webcit/static/t/subject_inet_dirnames.html | 1 - webcit/static/t/subject_inet_masqdomains.html | 1 - webcit/static/t/subject_inet_rbldns.html | 1 - webcit/static/t/subject_inet_smarthosts.html | 1 - webcit/static/t/subject_inet_spamass.html | 1 - webcit/static/t/subject_network.html | 1 - webcit/static/t/subject_pop3.html | 1 - webcit/static/t/subject_pushmail.html | 1 - webcit/static/t/subject_serverrestartpage.html | 1 - webcit/static/t/subject_tuning.html | 1 - webcit/static/t/subject_usermanagement.html | 1 - webcit/subst.c | 15 ++++++++++++--- 35 files changed, 45 insertions(+), 57 deletions(-) delete mode 100644 webcit/static/t/subj_advanced_roomcommands.html delete mode 100644 webcit/static/t/subj_basic_commands.html delete mode 100644 webcit/static/t/subj_your_info.html delete mode 100644 webcit/static/t/subject_access.html delete mode 100644 webcit/static/t/subject_aiderestart.html delete mode 100644 webcit/static/t/subject_autopurger.html delete mode 100644 webcit/static/t/subject_box_edituser_select.html delete mode 100644 webcit/static/t/subject_directory.html delete mode 100644 webcit/static/t/subject_edituser_add.html delete mode 100644 webcit/static/t/subject_floorconfig.html delete mode 100644 webcit/static/t/subject_general.html delete mode 100644 webcit/static/t/subject_global_config.html delete mode 100644 webcit/static/t/subject_indexing.html delete mode 100644 webcit/static/t/subject_inet_aliases.html delete mode 100644 webcit/static/t/subject_inet_clamav.html delete mode 100644 webcit/static/t/subject_inet_dirnames.html delete mode 100644 webcit/static/t/subject_inet_masqdomains.html delete mode 100644 webcit/static/t/subject_inet_rbldns.html delete mode 100644 webcit/static/t/subject_inet_smarthosts.html delete mode 100644 webcit/static/t/subject_inet_spamass.html delete mode 100644 webcit/static/t/subject_network.html delete mode 100644 webcit/static/t/subject_pop3.html delete mode 100644 webcit/static/t/subject_pushmail.html delete mode 100644 webcit/static/t/subject_serverrestartpage.html delete mode 100644 webcit/static/t/subject_tuning.html delete mode 100644 webcit/static/t/subject_usermanagement.html diff --git a/webcit/configure.ac b/webcit/configure.ac index e2ac5e7f1..786e43a2d 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -196,7 +196,7 @@ AC_CHECK_HEADER(libcitadel.h, - +found_ssl=no # The big search for OpenSSL if test "$with_ssl" != "no"; then saved_LIBS="$LIBS" @@ -279,6 +279,7 @@ if test "$with_ssl" != "no"; then if test "x$ac_cv_openssldir" != "xno" ; then AC_DEFINE(HAVE_OPENSSL,[],[whethe we have openssl]) + found_ssl=yes LIBS="-lssl -lcrypto $LIBS" dnl Need to recover ssldir - test above runs in subshell ssldir=$ac_cv_openssldir @@ -314,6 +315,10 @@ AC_ARG_WITH(ssldir, [ if test "x$withval" != "xno" ; then ssl_dir="$withval" + if test "$found_ssl" = "no"; then + echo "Your setup was incomplete; ssldir doesn't make sense without openssl" + exit + fi fi AC_SUBST(MAKE_SSL_DIR) ] diff --git a/webcit/static/t/aide_inetconf.html b/webcit/static/t/aide_inetconf.html index 649f65c19..4aae57667 100644 --- a/webcit/static/t/aide_inetconf.html +++ b/webcit/static/t/aide_inetconf.html @@ -12,17 +12,17 @@
-
-
- +
+
+
-
-
-
- +
+
+
+
diff --git a/webcit/static/t/display_aide_menu.html b/webcit/static/t/display_aide_menu.html index 5b1b01209..4c686c36b 100644 --- a/webcit/static/t/display_aide_menu.html +++ b/webcit/static/t/display_aide_menu.html @@ -11,12 +11,12 @@
- + - +
- + - +
diff --git a/webcit/static/t/display_main_menu.html b/webcit/static/t/display_main_menu.html index 608a5656a..1487fb01d 100644 --- a/webcit/static/t/display_main_menu.html +++ b/webcit/static/t/display_main_menu.html @@ -6,12 +6,12 @@
- +
- + - +
diff --git a/webcit/static/t/display_serverrestart.html b/webcit/static/t/display_serverrestart.html index c96e2c5d0..af48f5da3 100644 --- a/webcit/static/t/display_serverrestart.html +++ b/webcit/static/t/display_serverrestart.html @@ -27,6 +27,6 @@
- +
diff --git a/webcit/static/t/display_serverrestartpage.html b/webcit/static/t/display_serverrestartpage.html index c83a4cd6b..62a564da0 100644 --- a/webcit/static/t/display_serverrestartpage.html +++ b/webcit/static/t/display_serverrestartpage.html @@ -1,6 +1,6 @@
- +
diff --git a/webcit/static/t/display_sitewide_config.html b/webcit/static/t/display_sitewide_config.html index 97e23d76f..1d1809c66 100644 --- a/webcit/static/t/display_sitewide_config.html +++ b/webcit/static/t/display_sitewide_config.html @@ -8,15 +8,15 @@
-
diff --git a/webcit/static/t/edituser_select.html b/webcit/static/t/edituser_select.html index 2282d490a..fde9e292a 100644 --- a/webcit/static/t/edituser_select.html +++ b/webcit/static/t/edituser_select.html @@ -15,9 +15,9 @@
- + - +
diff --git a/webcit/static/t/subj_advanced_roomcommands.html b/webcit/static/t/subj_advanced_roomcommands.html deleted file mode 100644 index 7f5388e29..000000000 --- a/webcit/static/t/subj_advanced_roomcommands.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subj_basic_commands.html b/webcit/static/t/subj_basic_commands.html deleted file mode 100644 index ce6ae2bff..000000000 --- a/webcit/static/t/subj_basic_commands.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subj_your_info.html b/webcit/static/t/subj_your_info.html deleted file mode 100644 index 9da9ca848..000000000 --- a/webcit/static/t/subj_your_info.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_access.html b/webcit/static/t/subject_access.html deleted file mode 100644 index a9986627e..000000000 --- a/webcit/static/t/subject_access.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_aiderestart.html b/webcit/static/t/subject_aiderestart.html deleted file mode 100644 index 8b11af6e3..000000000 --- a/webcit/static/t/subject_aiderestart.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_autopurger.html b/webcit/static/t/subject_autopurger.html deleted file mode 100644 index 781c5cccb..000000000 --- a/webcit/static/t/subject_autopurger.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_box_edituser_select.html b/webcit/static/t/subject_box_edituser_select.html deleted file mode 100644 index 722bc93ef..000000000 --- a/webcit/static/t/subject_box_edituser_select.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_directory.html b/webcit/static/t/subject_directory.html deleted file mode 100644 index def1107c6..000000000 --- a/webcit/static/t/subject_directory.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_edituser_add.html b/webcit/static/t/subject_edituser_add.html deleted file mode 100644 index 703521496..000000000 --- a/webcit/static/t/subject_edituser_add.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_floorconfig.html b/webcit/static/t/subject_floorconfig.html deleted file mode 100644 index 6ab741a0e..000000000 --- a/webcit/static/t/subject_floorconfig.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_general.html b/webcit/static/t/subject_general.html deleted file mode 100644 index e59c2e8dd..000000000 --- a/webcit/static/t/subject_general.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_global_config.html b/webcit/static/t/subject_global_config.html deleted file mode 100644 index adc8489a7..000000000 --- a/webcit/static/t/subject_global_config.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_indexing.html b/webcit/static/t/subject_indexing.html deleted file mode 100644 index 1319d4ee5..000000000 --- a/webcit/static/t/subject_indexing.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_aliases.html b/webcit/static/t/subject_inet_aliases.html deleted file mode 100644 index a68b51929..000000000 --- a/webcit/static/t/subject_inet_aliases.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_clamav.html b/webcit/static/t/subject_inet_clamav.html deleted file mode 100644 index 521452b6f..000000000 --- a/webcit/static/t/subject_inet_clamav.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_dirnames.html b/webcit/static/t/subject_inet_dirnames.html deleted file mode 100644 index 9a43094ae..000000000 --- a/webcit/static/t/subject_inet_dirnames.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_masqdomains.html b/webcit/static/t/subject_inet_masqdomains.html deleted file mode 100644 index 151ab4d91..000000000 --- a/webcit/static/t/subject_inet_masqdomains.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_rbldns.html b/webcit/static/t/subject_inet_rbldns.html deleted file mode 100644 index bc52ca274..000000000 --- a/webcit/static/t/subject_inet_rbldns.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_smarthosts.html b/webcit/static/t/subject_inet_smarthosts.html deleted file mode 100644 index 4f9928066..000000000 --- a/webcit/static/t/subject_inet_smarthosts.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_inet_spamass.html b/webcit/static/t/subject_inet_spamass.html deleted file mode 100644 index 972a52b40..000000000 --- a/webcit/static/t/subject_inet_spamass.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_network.html b/webcit/static/t/subject_network.html deleted file mode 100644 index e79a3f98f..000000000 --- a/webcit/static/t/subject_network.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_pop3.html b/webcit/static/t/subject_pop3.html deleted file mode 100644 index 499ae00f9..000000000 --- a/webcit/static/t/subject_pop3.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_pushmail.html b/webcit/static/t/subject_pushmail.html deleted file mode 100644 index 394b5c408..000000000 --- a/webcit/static/t/subject_pushmail.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_serverrestartpage.html b/webcit/static/t/subject_serverrestartpage.html deleted file mode 100644 index a12b331dc..000000000 --- a/webcit/static/t/subject_serverrestartpage.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_tuning.html b/webcit/static/t/subject_tuning.html deleted file mode 100644 index 5bb01aeac..000000000 --- a/webcit/static/t/subject_tuning.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/static/t/subject_usermanagement.html b/webcit/static/t/subject_usermanagement.html deleted file mode 100644 index 88950ce83..000000000 --- a/webcit/static/t/subject_usermanagement.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/webcit/subst.c b/webcit/subst.c index f932e10ba..a43cdcffd 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -1795,10 +1795,20 @@ void tmpl_do_tabbed(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Co TabNames = (StrBuf **) malloc(ntabs * sizeof(StrBuf*)); for (i = 0; i < ntabs; i++) { - TabNames[i] = NewStrBuf(); - if (Tokens->Params[i * 2]->len > 0) { + if ((Tokens->Params[i * 2]->Type == TYPE_STR) && + (Tokens->Params[i * 2]->len > 0)) { + TabNames[i] = NewStrBuf(); DoTemplate(TKEY(i * 2), TabNames[i], Context, ContextType); } + else if (Tokens->Params[i * 2]->Type == TYPE_GETTEXT) { + const char *Ch; + long len; + GetTemplateTokenString(Tokens, + i * 2, + &Ch, + &len); + TabNames[i] = NewStrBufPlain(Ch, -1); + } else { /** A Tab without subject? we can't count that, add it as silent */ nTabs --; @@ -1808,7 +1818,6 @@ void tmpl_do_tabbed(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Co StrTabbedDialog(Target, nTabs, TabNames); for (i = 0; i < ntabs; i++) { StrBeginTab(Target, i, nTabs); - DoTemplate(TKEY(i * 2 + 1), Target, Context, ContextType); StrEndTab(Target, i, nTabs); } -- 2.30.2