[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3277 - GNUnet GNUnet/src/applications/vpn GNUnet/src/inclu
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3277 - GNUnet GNUnet/src/applications/vpn GNUnet/src/include branches/GNUnet-0.7.0 branches/GNUnet-0.7.0/m4 branches/GNUnet-0.7.0/po branches/GNUnet-0.7.0/src/applications/vpn branches/GNUnet-0.7.0/src/include doodle-docs/WWW i18nHTML/src i18nHTML-docs/WWW |
Date: |
Sun, 20 Aug 2006 15:56:03 -0700 (PDT) |
Author: grothoff
Date: 2006-08-20 15:55:49 -0700 (Sun, 20 Aug 2006)
New Revision: 3277
Modified:
GNUnet/configure.ac
GNUnet/src/applications/vpn/Makefile.am
GNUnet/src/include/platform.h
branches/GNUnet-0.7.0/configure.ac
branches/GNUnet-0.7.0/m4/Makefile.in
branches/GNUnet-0.7.0/po/es.po
branches/GNUnet-0.7.0/src/applications/vpn/Makefile.am
branches/GNUnet-0.7.0/src/include/platform.h
doodle-docs/WWW/i18nhtml.inc.php
i18nHTML-docs/WWW/i18nhtml.inc.php
i18nHTML/src/i18nhtml.inc.php
Log:
patch from matthew for OS X
Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2006-08-20 21:51:45 UTC (rev 3276)
+++ GNUnet/configure.ac 2006-08-20 22:55:49 UTC (rev 3277)
@@ -73,6 +73,8 @@
AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
CFLAGS="-no-cpp-precomp $CFLAGS"
LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
+ AC_MSG_WARN([The VPN application cannot be compiled on your OS])
+ build_target="macosx"
;;
linux*)
AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
@@ -128,6 +130,7 @@
esac
AC_MSG_CHECKING([for build target])
+AM_CONDITIONAL(MACOSX, test "$build_target" = "macosx")
AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin")
AM_CONDITIONAL(MINGW, test "$build_target" = "mingw")
AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
Modified: GNUnet/src/applications/vpn/Makefile.am
===================================================================
--- GNUnet/src/applications/vpn/Makefile.am 2006-08-20 21:51:45 UTC (rev
3276)
+++ GNUnet/src/applications/vpn/Makefile.am 2006-08-20 22:55:49 UTC (rev
3277)
@@ -1,3 +1,4 @@
+if !MACOSX
INCLUDES = -I$(top_srcdir)/src/include
plugindir = $(libdir)/GNUnet
@@ -20,4 +21,5 @@
libgnunetmodule_vpn_la_LDFLAGS = \
-export-dynamic -avoid-version -module \
$(LDADD)
+endif
Modified: GNUnet/src/include/platform.h
===================================================================
--- GNUnet/src/include/platform.h 2006-08-20 21:51:45 UTC (rev 3276)
+++ GNUnet/src/include/platform.h 2006-08-20 22:55:49 UTC (rev 3277)
@@ -172,6 +172,9 @@
#ifdef OSX
#define socklen_t unsigned int
+ #define stat64 stat
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
#endif
#if !HAVE_ATOLL
Modified: branches/GNUnet-0.7.0/configure.ac
===================================================================
--- branches/GNUnet-0.7.0/configure.ac 2006-08-20 21:51:45 UTC (rev 3276)
+++ branches/GNUnet-0.7.0/configure.ac 2006-08-20 22:55:49 UTC (rev 3277)
@@ -72,6 +72,8 @@
AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
CFLAGS="-no-cpp-precomp $CFLAGS"
LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
+ AC_MSG_WARN([The VPN application cannot be compiled on your OS])
+ build_target="macosx"
;;
linux*)
AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
@@ -127,6 +129,7 @@
esac
AC_MSG_CHECKING([for build target])
+AM_CONDITIONAL(MACOSX, test "$build_target" = "macosx")
AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin")
AM_CONDITIONAL(MINGW, test "$build_target" = "mingw")
AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
Modified: branches/GNUnet-0.7.0/m4/Makefile.in
===================================================================
--- branches/GNUnet-0.7.0/m4/Makefile.in 2006-08-20 21:51:45 UTC (rev
3276)
+++ branches/GNUnet-0.7.0/m4/Makefile.in 2006-08-20 22:55:49 UTC (rev
3277)
@@ -77,7 +77,6 @@
CYGPATH_W = @CYGPATH_W@
CYGWIN_FALSE = @CYGWIN_FALSE@
CYGWIN_TRUE = @CYGWIN_TRUE@
-DATADIR = @DATADIR@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
@@ -92,8 +91,10 @@
F77 = @F77@
FFLAGS = @FFLAGS@
GMSGFMT = @GMSGFMT@
+GNDATADIR = @GNDATADIR@
GNUNETGTK_CFLAGS = @GNUNETGTK_CFLAGS@
GNUNETGTK_LIBS = @GNUNETGTK_LIBS@
+GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
GUILE = @GUILE@
@@ -171,15 +172,9 @@
XFREEBSD_FALSE = @XFREEBSD_FALSE@
XFREEBSD_TRUE = @XFREEBSD_TRUE@
XGETTEXT = @XGETTEXT@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -194,6 +189,9 @@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
guile_available = @guile_available@
host = @host@
@@ -201,17 +199,21 @@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
Modified: branches/GNUnet-0.7.0/po/es.po
===================================================================
--- branches/GNUnet-0.7.0/po/es.po 2006-08-20 21:51:45 UTC (rev 3276)
+++ branches/GNUnet-0.7.0/po/es.po 2006-08-20 22:55:49 UTC (rev 3277)
@@ -1786,17 +1786,14 @@
msgstr "Se produjo un error leyendo informaciĆ³n de gnunetd.\n"
#: src/applications/stats/statistics.c:206
-#, c-format
msgid "% of allowed network load (up)"
msgstr "% de red permitida para la subida"
#: src/applications/stats/statistics.c:208
-#, c-format
msgid "% of allowed network load (down)"
msgstr "% de red permitida para bajada"
#: src/applications/stats/statistics.c:210
-#, c-format
msgid "% of allowed cpu load"
msgstr "% de CPU permitida para el uso"
Modified: branches/GNUnet-0.7.0/src/applications/vpn/Makefile.am
===================================================================
--- branches/GNUnet-0.7.0/src/applications/vpn/Makefile.am 2006-08-20
21:51:45 UTC (rev 3276)
+++ branches/GNUnet-0.7.0/src/applications/vpn/Makefile.am 2006-08-20
22:55:49 UTC (rev 3277)
@@ -1,3 +1,4 @@
+if !MACOSX
INCLUDES = -I$(top_srcdir)/src/include
plugindir = $(libdir)/GNUnet
@@ -20,4 +21,5 @@
libgnunetmodule_vpn_la_LDFLAGS = \
-export-dynamic -avoid-version -module \
$(LDADD)
+endif
Modified: branches/GNUnet-0.7.0/src/include/platform.h
===================================================================
--- branches/GNUnet-0.7.0/src/include/platform.h 2006-08-20 21:51:45 UTC
(rev 3276)
+++ branches/GNUnet-0.7.0/src/include/platform.h 2006-08-20 22:55:49 UTC
(rev 3277)
@@ -169,6 +169,9 @@
#ifdef OSX
#define socklen_t unsigned int
+ #define stat64 stat
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
#endif
#if !HAVE_ATOLL
Modified: doodle-docs/WWW/i18nhtml.inc.php
===================================================================
--- doodle-docs/WWW/i18nhtml.inc.php 2006-08-20 21:51:45 UTC (rev 3276)
+++ doodle-docs/WWW/i18nhtml.inc.php 2006-08-20 22:55:49 UTC (rev 3277)
@@ -1,6 +1,6 @@
<?php
/*
- (C) 2003, 2004, 2005 Christian Grothoff and other contributing authors.
+ (C) 2003, 2004, 2005, 2006 Christian Grothoff and other contributing
authors.
This code is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -42,9 +42,9 @@
// die('PHP misconfigured. Disable get_magic_quotes.');
// establish default connection to database server
-$connection = @mysql_connect($i18nHTMLsqlServer,
- $i18nHTMLsqlUser,
- $i18nHTMLsqlPass);
+$connection = mysql_connect($i18nHTMLsqlServer,
+ $i18nHTMLsqlUser,
+ $i18nHTMLsqlPass);
if (!$connection) {
die ('Failure connecting to ' . $i18nHTMLsqlServer . ' : ' . mysql_error());
}
@@ -116,7 +116,7 @@
}
// If no language is specified, use english.
if ( (! $lang) || ($lang=="") )
- $lang = "English";
+ $lang = $i18nHTMLsrcLang;
$xlang = $_REQUEST['xlang'];
if ($xlang)
$lang = $xlang;
@@ -192,9 +192,8 @@
. $lang
. "&text=" . urlencode(fix($a))
. "&back=" . urlencode($back)
- . "\" title=\""
- .fix($a)
- ."\">" . $i18nHTMLmarker . "</a>\n";
+ . "\" title=\"" . fix($a)
+ . "\">" . $i18nHTMLmarker . "</a>\n";
} else
return "";
}
@@ -577,6 +576,7 @@
global $lang;
global $i18nHTMLrecordMode;
global $i18nHTMLhasTranslation, $i18nHTMLsqlPrefix;
+ global $i18nHTMLsrcLang;
$i18nHTMLhasTranslation = 1; // assume translation until failure
@@ -589,7 +589,7 @@
return $a;
}
- if ("English" == $lang) {
+ if ($i18nHTMLsrcLang == $lang) {
// no need to translate english, that's the
// hard-wired source language!
if ($i18nHTMLrecordMode == 2) {
@@ -608,7 +608,8 @@
return $a;
}
// attempt to get translations, ranked for best
- $query = "SELECT translation FROM ".$i18nHTMLsqlPrefix."map WHERE
name=\"$a_sql\" AND lang=\"$lang\" ORDER BY ranking DESC";
+ $query = "SELECT translation FROM " . $i18nHTMLsqlPrefix .
+ "map WHERE name=\"$a_sql\" AND lang=\"$lang\" ORDER BY ranking
DESC";
$result = mysql_query($query, $connection);
$num = 0;
if ($result)
@@ -618,7 +619,8 @@
// either insert untranslated item into pending table or update
// referenced count; count is used to display more used strings
// during mass translation before less common ones.
- $query = "SELECT count FROM ".$i18nHTMLsqlPrefix."pending WHERE
c=\"$a_sql\" AND lang=\"$lang\"";
+ $query = "SELECT count FROM " . $i18nHTMLsqlPrefix .
+ "pending WHERE c=\"$a_sql\" AND lang=\"$lang\"";
$result = mysql_query($query, $connection);
$num = 0;
if ($result)
@@ -627,9 +629,11 @@
if ($num > 0) {
$row = mysql_fetch_array($result);
$count = $row["count"] + 1;
- $query = "UPDATE ".$i18nHTMLsqlPrefix."pending SET count=$count WHERE
c=\"$a_sql\" AND lang=\"$lang\"";
+ $query = "UPDATE " . $i18nHTMLsqlPrefix .
+ "pending SET count=$count WHERE c=\"$a_sql\" AND
lang=\"$lang\"";
} else {
- $query = "INSERT INTO ".$i18nHTMLsqlPrefix."pending VALUES(\"$a_sql\",
\"$lang\", 1)";
+ $query = "INSERT INTO " . $i18nHTMLsqlPrefix .
+ "pending VALUES(\"$a_sql\", \"$lang\", 1)";
}
mysql_query($query, $connection);
@@ -705,7 +709,20 @@
echo extlink_($a, $b);
}
+// create internationalized, external link to
+// $a with description $b and title $c
+function extlink_title_($a, $b, $c) {
+ $ret = "<a href=\"" . $a . "\" title=\"" . TRANSLATE_($c) . "\">" .
TRANSLATE_($b) . "</a>" . translateLink_($b) . translateLink_($c);
+ return $ret;
+}
+// create internationalized, external link to
+// $a with description $b and title $c
+function extlink_title($a, $b, $c) {
+ echo extlink_title_($a, $b, $c);
+}
+
+
// *************************************************
// global, call-once helper functions
// *************************************************
@@ -734,11 +751,13 @@
$mode = "Transitional";
}
if ($type == "XHTML1")
- echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 " . $mode . "//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-" . $dtd . ".dtd\">\n";
+ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 " . $mode .
+ "//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-" . $dtd .
".dtd\">\n";
else if ($type == "XHTML1.1")
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
else
- echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " . $mode . "//EN\"
\"http://www.w3.org/TR/html4/" . $dtd . ".dtd\">\n";
+ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " . $mode .
+ "//EN\" \"http://www.w3.org/TR/html4/" . $dtd . ".dtd\">\n";
}
function TITLE($a,$b="") {
@@ -758,6 +777,7 @@
// at least 1 translated string.
function generateLanguageBar() {
global $connection, $i18nHTMLsqlPrefix;
+ global $i18nHTMLsrcLang;
if ($connection) {
echo "<center>[";
@@ -767,10 +787,10 @@
$num = 0;
if ($result)
$num = mysql_numrows($result);
- echo "<a href=\"?xlang=English\">";
- W("English");
+ echo "<a href=\"?xlang=" . $i18nHTMLsrcLang . "\">";
+ W($i18nHTMLsrcLang);
echo "</a>";
- $last = "English";
+ $last = $i18nHTMLsrcLang;
for ($i=0;$i<$num;$i++) {
$row = mysql_fetch_array($result);
$next = $row["lang"];
@@ -792,10 +812,11 @@
global $xlang;
global $editor;
global $HTTP_SERVER_VARS;
+ global $i18nHTMLsrcLang;
P();
- echo "Translation engine based on <a
href=\"http://gnunet.org/i18nHTML/\">i18nHTML</a> (C) 2003, 2004, 2005 <a
href=\"http://grothoff.org/christian/\">Christian Grothoff</a>.<br />\n";
- if ( ($xlang) && ($xlang != "English") ) {
+ echo "Translation engine based on <a
href=\"http://gnunet.org/i18nHTML/\">i18nHTML</a> (C) 2003, 2004, 2005, 2006 <a
href=\"http://grothoff.org/christian/\">Christian Grothoff</a>.<br />\n";
+ if ( ($xlang) && ($xlang != $i18nHTMLsrcLang) ) {
$protocol = "http";
if ($HTTP_SERVER_VARS["HTTPS"] == "on") {
$protocol = "https"; // switch to https
Modified: i18nHTML/src/i18nhtml.inc.php
===================================================================
--- i18nHTML/src/i18nhtml.inc.php 2006-08-20 21:51:45 UTC (rev 3276)
+++ i18nHTML/src/i18nhtml.inc.php 2006-08-20 22:55:49 UTC (rev 3277)
@@ -576,7 +576,7 @@
global $lang;
global $i18nHTMLrecordMode;
global $i18nHTMLhasTranslation, $i18nHTMLsqlPrefix;
- global $i18nHTMLsrcLang;
+ global $i18nHTMLsrcLang;
$i18nHTMLhasTranslation = 1; // assume translation until failure
@@ -777,7 +777,7 @@
// at least 1 translated string.
function generateLanguageBar() {
global $connection, $i18nHTMLsqlPrefix;
- global $i18nHTMLsrcLang;
+ global $i18nHTMLsrcLang;
if ($connection) {
echo "<center>[";
@@ -812,11 +812,11 @@
global $xlang;
global $editor;
global $HTTP_SERVER_VARS;
- global $i18nHTMLsrcLang;
+ global $i18nHTMLsrcLang;
P();
echo "Translation engine based on <a
href=\"http://gnunet.org/i18nHTML/\">i18nHTML</a> (C) 2003, 2004, 2005, 2006 <a
href=\"http://grothoff.org/christian/\">Christian Grothoff</a>.<br />\n";
- if ( ($lang) && ($lang != $i18nHTMLsrcLang) ) {
+ if ( ($xlang) && ($xlang != $i18nHTMLsrcLang) ) {
$protocol = "http";
if ($HTTP_SERVER_VARS["HTTPS"] == "on") {
$protocol = "https"; // switch to https
Modified: i18nHTML-docs/WWW/i18nhtml.inc.php
===================================================================
--- i18nHTML-docs/WWW/i18nhtml.inc.php 2006-08-20 21:51:45 UTC (rev 3276)
+++ i18nHTML-docs/WWW/i18nhtml.inc.php 2006-08-20 22:55:49 UTC (rev 3277)
@@ -1,6 +1,6 @@
<?php
/*
- (C) 2003, 2004, 2005 Christian Grothoff and other contributing authors.
+ (C) 2003, 2004, 2005, 2006 Christian Grothoff and other contributing
authors.
This code is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -42,9 +42,9 @@
// die('PHP misconfigured. Disable get_magic_quotes.');
// establish default connection to database server
-$connection = @mysql_connect($i18nHTMLsqlServer,
- $i18nHTMLsqlUser,
- $i18nHTMLsqlPass);
+$connection = mysql_connect($i18nHTMLsqlServer,
+ $i18nHTMLsqlUser,
+ $i18nHTMLsqlPass);
if (!$connection) {
die ('Failure connecting to ' . $i18nHTMLsqlServer . ' : ' . mysql_error());
}
@@ -116,7 +116,7 @@
}
// If no language is specified, use english.
if ( (! $lang) || ($lang=="") )
- $lang = "English";
+ $lang = $i18nHTMLsrcLang;
$xlang = $_REQUEST['xlang'];
if ($xlang)
$lang = $xlang;
@@ -192,9 +192,8 @@
. $lang
. "&text=" . urlencode(fix($a))
. "&back=" . urlencode($back)
- . "\" title=\""
- .fix($a)
- ."\">" . $i18nHTMLmarker . "</a>\n";
+ . "\" title=\"" . fix($a)
+ . "\">" . $i18nHTMLmarker . "</a>\n";
} else
return "";
}
@@ -577,6 +576,7 @@
global $lang;
global $i18nHTMLrecordMode;
global $i18nHTMLhasTranslation, $i18nHTMLsqlPrefix;
+ global $i18nHTMLsrcLang;
$i18nHTMLhasTranslation = 1; // assume translation until failure
@@ -589,7 +589,7 @@
return $a;
}
- if ("English" == $lang) {
+ if ($i18nHTMLsrcLang == $lang) {
// no need to translate english, that's the
// hard-wired source language!
if ($i18nHTMLrecordMode == 2) {
@@ -608,7 +608,8 @@
return $a;
}
// attempt to get translations, ranked for best
- $query = "SELECT translation FROM ".$i18nHTMLsqlPrefix."map WHERE
name=\"$a_sql\" AND lang=\"$lang\" ORDER BY ranking DESC";
+ $query = "SELECT translation FROM " . $i18nHTMLsqlPrefix .
+ "map WHERE name=\"$a_sql\" AND lang=\"$lang\" ORDER BY ranking
DESC";
$result = mysql_query($query, $connection);
$num = 0;
if ($result)
@@ -618,7 +619,8 @@
// either insert untranslated item into pending table or update
// referenced count; count is used to display more used strings
// during mass translation before less common ones.
- $query = "SELECT count FROM ".$i18nHTMLsqlPrefix."pending WHERE
c=\"$a_sql\" AND lang=\"$lang\"";
+ $query = "SELECT count FROM " . $i18nHTMLsqlPrefix .
+ "pending WHERE c=\"$a_sql\" AND lang=\"$lang\"";
$result = mysql_query($query, $connection);
$num = 0;
if ($result)
@@ -627,9 +629,11 @@
if ($num > 0) {
$row = mysql_fetch_array($result);
$count = $row["count"] + 1;
- $query = "UPDATE ".$i18nHTMLsqlPrefix."pending SET count=$count WHERE
c=\"$a_sql\" AND lang=\"$lang\"";
+ $query = "UPDATE " . $i18nHTMLsqlPrefix .
+ "pending SET count=$count WHERE c=\"$a_sql\" AND
lang=\"$lang\"";
} else {
- $query = "INSERT INTO ".$i18nHTMLsqlPrefix."pending VALUES(\"$a_sql\",
\"$lang\", 1)";
+ $query = "INSERT INTO " . $i18nHTMLsqlPrefix .
+ "pending VALUES(\"$a_sql\", \"$lang\", 1)";
}
mysql_query($query, $connection);
@@ -705,7 +709,20 @@
echo extlink_($a, $b);
}
+// create internationalized, external link to
+// $a with description $b and title $c
+function extlink_title_($a, $b, $c) {
+ $ret = "<a href=\"" . $a . "\" title=\"" . TRANSLATE_($c) . "\">" .
TRANSLATE_($b) . "</a>" . translateLink_($b) . translateLink_($c);
+ return $ret;
+}
+// create internationalized, external link to
+// $a with description $b and title $c
+function extlink_title($a, $b, $c) {
+ echo extlink_title_($a, $b, $c);
+}
+
+
// *************************************************
// global, call-once helper functions
// *************************************************
@@ -734,11 +751,13 @@
$mode = "Transitional";
}
if ($type == "XHTML1")
- echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 " . $mode . "//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-" . $dtd . ".dtd\">\n";
+ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 " . $mode .
+ "//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-" . $dtd .
".dtd\">\n";
else if ($type == "XHTML1.1")
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
else
- echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " . $mode . "//EN\"
\"http://www.w3.org/TR/html4/" . $dtd . ".dtd\">\n";
+ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " . $mode .
+ "//EN\" \"http://www.w3.org/TR/html4/" . $dtd . ".dtd\">\n";
}
function TITLE($a,$b="") {
@@ -758,6 +777,7 @@
// at least 1 translated string.
function generateLanguageBar() {
global $connection, $i18nHTMLsqlPrefix;
+ global $i18nHTMLsrcLang;
if ($connection) {
echo "<center>[";
@@ -767,10 +787,10 @@
$num = 0;
if ($result)
$num = mysql_numrows($result);
- echo "<a href=\"?xlang=English\">";
- W("English");
+ echo "<a href=\"?xlang=" . $i18nHTMLsrcLang . "\">";
+ W($i18nHTMLsrcLang);
echo "</a>";
- $last = "English";
+ $last = $i18nHTMLsrcLang;
for ($i=0;$i<$num;$i++) {
$row = mysql_fetch_array($result);
$next = $row["lang"];
@@ -792,10 +812,11 @@
global $xlang;
global $editor;
global $HTTP_SERVER_VARS;
+ global $i18nHTMLsrcLang;
P();
- echo "Translation engine based on <a
href=\"http://gnunet.org/i18nHTML/\">i18nHTML</a> (C) 2003, 2004, 2005 <a
href=\"http://grothoff.org/christian/\">Christian Grothoff</a>.<br />\n";
- if ( ($xlang) && ($xlang != "English") ) {
+ echo "Translation engine based on <a
href=\"http://gnunet.org/i18nHTML/\">i18nHTML</a> (C) 2003, 2004, 2005, 2006 <a
href=\"http://grothoff.org/christian/\">Christian Grothoff</a>.<br />\n";
+ if ( ($xlang) && ($xlang != $i18nHTMLsrcLang) ) {
$protocol = "http";
if ($HTTP_SERVER_VARS["HTTPS"] == "on") {
$protocol = "https"; // switch to https
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3277 - GNUnet GNUnet/src/applications/vpn GNUnet/src/include branches/GNUnet-0.7.0 branches/GNUnet-0.7.0/m4 branches/GNUnet-0.7.0/po branches/GNUnet-0.7.0/src/applications/vpn branches/GNUnet-0.7.0/src/include doodle-docs/WWW i18nHTML/src i18nHTML-docs/WWW,
grothoff <=