updated translation
This commit is contained in:
parent
2ee30de3b7
commit
f5be96ec9c
|
@ -1 +0,0 @@
|
||||||
en
|
|
|
@ -1 +0,0 @@
|
||||||
en
|
|
|
@ -143,7 +143,7 @@ msgstr "Es ist derzeit nicht möglich, die Konfiguration zu speichern. Vielleich
|
||||||
|
|
||||||
#: EnvironmentWarning.ReadOnlyConfig.Link.Text
|
#: EnvironmentWarning.ReadOnlyConfig.Link.Text
|
||||||
msgid "Initialize partition"
|
msgid "Initialize partition"
|
||||||
msgstr "Partitionieren"
|
msgstr "Jetzt partitionieren"
|
||||||
|
|
||||||
#: EnvironmentWarning.NoSSL.Text
|
#: EnvironmentWarning.NoSSL.Text
|
||||||
msgid "The connection is not encrypted - passwords can be easily intercepted."
|
msgid "The connection is not encrypted - passwords can be easily intercepted."
|
||||||
|
|
|
@ -5,167 +5,187 @@ msgstr ""
|
||||||
"Project-Id-Version: CryptoBox-Server 0.3\n"
|
"Project-Id-Version: CryptoBox-Server 0.3\n"
|
||||||
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
|
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
|
||||||
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
|
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
"X-Generator: Translate Toolkit 0.10.1\n"
|
"X-Generator: Pootle 0.10.1\n"
|
||||||
|
|
||||||
#: Name
|
#: Name
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr ""
|
msgstr "English"
|
||||||
|
|
||||||
#: Title.Top
|
#: Title.Top
|
||||||
msgid "The CryptoBox"
|
msgid "The CryptoBox"
|
||||||
msgstr ""
|
msgstr "The CryptoBox"
|
||||||
|
|
||||||
#: Title.Slogan
|
#: Title.Slogan
|
||||||
msgid "Privacy for the rest of us."
|
msgid "Privacy for the rest of us."
|
||||||
msgstr ""
|
msgstr "Privacy for the rest of us."
|
||||||
|
|
||||||
#: Title.Volume
|
#: Title.Volume
|
||||||
msgid "Volume"
|
msgid "Volume"
|
||||||
msgstr ""
|
msgstr "Volume"
|
||||||
|
|
||||||
#: Title.AccessDenied
|
#: Title.AccessDenied
|
||||||
msgid "Access denied"
|
msgid "Access denied"
|
||||||
msgstr ""
|
msgstr "Access denied"
|
||||||
|
|
||||||
#: Text.EnterCurrentPassword
|
#: Text.EnterCurrentPassword
|
||||||
msgid "Enter the current password"
|
msgid "Enter the current password"
|
||||||
msgstr ""
|
msgstr "Enter the current password"
|
||||||
|
|
||||||
#: Text.EnterNewPassword
|
#: Text.EnterNewPassword
|
||||||
msgid "Enter new password"
|
msgid "Enter new password"
|
||||||
msgstr ""
|
msgstr "Enter new password"
|
||||||
|
|
||||||
#: Text.EnterSamePassword
|
#: Text.EnterSamePassword
|
||||||
msgid "Repeat new password"
|
msgid "Repeat new password"
|
||||||
msgstr ""
|
msgstr "Repeat new password"
|
||||||
|
|
||||||
#: Text.RedirectNote
|
#: Text.RedirectNote
|
||||||
msgid "Click here if your browser does not support automatic redirection."
|
msgid "Click here if your browser does not support automatic redirection."
|
||||||
msgstr ""
|
msgstr "Click here if your browser does not support automatic redirection."
|
||||||
|
|
||||||
#: Text.ProjectHomePage
|
#: Text.ProjectHomePage
|
||||||
msgid "Website of project"
|
msgid "Website of project"
|
||||||
msgstr ""
|
msgstr "Website of project"
|
||||||
|
|
||||||
#: Text.ProjectNote
|
#: Text.ProjectNote
|
||||||
msgid "The CryptoBox is a project of"
|
msgid "The CryptoBox is a project of"
|
||||||
msgstr ""
|
msgstr "The CryptoBox is a project of"
|
||||||
|
|
||||||
#: Text.ContainerName
|
#: Text.ContainerName
|
||||||
msgid "Container's name"
|
msgid "Container's name"
|
||||||
msgstr ""
|
msgstr "Container's name"
|
||||||
|
|
||||||
#: Button.HelpForForm
|
#: Button.HelpForForm
|
||||||
msgid "Get help"
|
msgid "Get help"
|
||||||
msgstr ""
|
msgstr "Get help"
|
||||||
|
|
||||||
#: WarningMessage.AccessDenied.Title
|
#: WarningMessage.AccessDenied.Title
|
||||||
msgid "Invalid access credentials"
|
msgid "Invalid access credentials"
|
||||||
msgstr ""
|
msgstr "Invalid access credentials"
|
||||||
|
|
||||||
#: WarningMessage.AccessDenied.Text
|
#: WarningMessage.AccessDenied.Text
|
||||||
msgid "Sorry - you are not allowed to do this!"
|
msgid "Sorry - you are not allowed to do this!"
|
||||||
msgstr ""
|
msgstr "Sorry - you are not allowed to do this!"
|
||||||
|
|
||||||
#: WarningMessage.EmptyPassword.Title
|
#: WarningMessage.EmptyPassword.Title
|
||||||
msgid "Missing password"
|
msgid "Missing password"
|
||||||
msgstr ""
|
msgstr "Missing password"
|
||||||
|
|
||||||
#: WarningMessage.EmptyPassword.Text
|
#: WarningMessage.EmptyPassword.Text
|
||||||
msgid "You have to enter a password!"
|
msgid "You have to enter a password!"
|
||||||
msgstr ""
|
msgstr "You have to enter a password!"
|
||||||
|
|
||||||
#: WarningMessage.EmptyNewPassword.Title
|
#: WarningMessage.EmptyNewPassword.Title
|
||||||
msgid "Missing new password"
|
msgid "Missing new password"
|
||||||
msgstr ""
|
msgstr "Missing new password"
|
||||||
|
|
||||||
#: WarningMessage.EmptyNewPassword.Text
|
#: WarningMessage.EmptyNewPassword.Text
|
||||||
msgid "You have to enter a new password!"
|
msgid "You have to enter a new password!"
|
||||||
msgstr ""
|
msgstr "You have to enter a new password!"
|
||||||
|
|
||||||
#: WarningMessage.DifferentPasswords.Title
|
#: WarningMessage.DifferentPasswords.Title
|
||||||
msgid "Different passwords"
|
msgid "Different passwords"
|
||||||
msgstr ""
|
msgstr "Different passwords"
|
||||||
|
|
||||||
#: WarningMessage.DifferentPasswords.Text
|
#: WarningMessage.DifferentPasswords.Text
|
||||||
msgid "The passwords you entered did not match."
|
msgid "The passwords you entered did not match."
|
||||||
msgstr ""
|
msgstr "The passwords you entered did not match."
|
||||||
|
|
||||||
#: WarningMessage.InvalidDevice.Title
|
#: WarningMessage.InvalidDevice.Title
|
||||||
msgid "Invalid device"
|
msgid "Invalid device"
|
||||||
msgstr ""
|
msgstr "Invalid device"
|
||||||
|
|
||||||
#: WarningMessage.InvalidDevice.Text
|
#: WarningMessage.InvalidDevice.Text
|
||||||
msgid "The device you have chosen is invalid!"
|
msgid "The device you have chosen is invalid!"
|
||||||
msgstr ""
|
msgstr "The device you have chosen is invalid!"
|
||||||
|
|
||||||
#: WarningMessage.VolumeMayNotBeMounted.Title
|
#: WarningMessage.VolumeMayNotBeMounted.Title
|
||||||
msgid "The container is mounted"
|
msgid "The container is mounted"
|
||||||
msgstr ""
|
msgstr "The container is mounted"
|
||||||
|
|
||||||
#: WarningMessage.VolumeMayNotBeMounted.Text
|
#: WarningMessage.VolumeMayNotBeMounted.Text
|
||||||
msgid "This action is not available while the container is active. Please turn it off first."
|
msgid ""
|
||||||
|
"This action is not available while the container is active. Please turn it "
|
||||||
|
"off first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"This action is not available while the container is active. Please turn it "
|
||||||
|
"off first."
|
||||||
|
|
||||||
#: WarningMessage.VolumeMayNotBeMounted.Link.Text
|
#: WarningMessage.VolumeMayNotBeMounted.Link.Text
|
||||||
msgid "Deactivate volume"
|
msgid "Deactivate volume"
|
||||||
msgstr ""
|
msgstr "Deactivate volume"
|
||||||
|
|
||||||
#: WarningMessage.InvalidAction.Title
|
#: WarningMessage.InvalidAction.Title
|
||||||
msgid "Invalid request"
|
msgid "Invalid request"
|
||||||
msgstr ""
|
msgstr "Invalid request"
|
||||||
|
|
||||||
#: WarningMessage.InvalidAction.Text
|
#: WarningMessage.InvalidAction.Text
|
||||||
msgid "Sorry - I do not know how to handle this request. If you think, that this is a bug, then you should send the most recent part of the CryptoBox log to info@cryptobox.org."
|
msgid ""
|
||||||
|
"Sorry - I do not know how to handle this request. If you think, that this is "
|
||||||
|
"a bug, then you should send the most recent part of the CryptoBox log to "
|
||||||
|
"info@cryptobox.org."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Sorry - I do not know how to handle this request. If you think, that this is "
|
||||||
|
"a bug, then you should send the most recent part of the CryptoBox log to "
|
||||||
|
"info@cryptobox.org."
|
||||||
|
|
||||||
#: WarningMessage.InvalidAction.Link.Text
|
#: WarningMessage.InvalidAction.Link.Text
|
||||||
msgid "View log"
|
msgid "View log"
|
||||||
msgstr ""
|
msgstr "View log"
|
||||||
|
|
||||||
#: WarningMessage.RuntimeError.Title
|
#: WarningMessage.RuntimeError.Title
|
||||||
msgid "Something weird happened"
|
msgid "Something weird happened"
|
||||||
msgstr ""
|
msgstr "Something weird happened"
|
||||||
|
|
||||||
#: WarningMessage.RuntimeError.Text
|
#: WarningMessage.RuntimeError.Text
|
||||||
msgid "We (the developer of the CryptoBox) would like to fix this problem for you and others. Please send the most recent part of the CryptoBox log to info@cryptobox.org. Thanks for your contribution!"
|
msgid ""
|
||||||
|
"We (the developer of the CryptoBox) would like to fix this problem for you "
|
||||||
|
"and others. Please send the most recent part of the CryptoBox log to "
|
||||||
|
"info@cryptobox.org. Thanks for your contribution!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"We (the developer of the CryptoBox) would like to fix this problem for you "
|
||||||
|
"and others. Please send the most recent part of the CryptoBox log to "
|
||||||
|
"info@cryptobox.org. Thanks for your contribution!"
|
||||||
|
|
||||||
#: EnvironmentWarning.ReadOnlyConfig.Text
|
#: EnvironmentWarning.ReadOnlyConfig.Text
|
||||||
msgid "Read-only setup detected - probably you should create a configuration partition."
|
msgid ""
|
||||||
|
"Read-only setup detected - probably you should create a configuration "
|
||||||
|
"partition."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Read-only setup detected - probably you should create a configuration "
|
||||||
|
"partition."
|
||||||
|
|
||||||
#: EnvironmentWarning.ReadOnlyConfig.Link.Text
|
#: EnvironmentWarning.ReadOnlyConfig.Link.Text
|
||||||
msgid "Initialize partition"
|
msgid "Initialize partition"
|
||||||
msgstr ""
|
msgstr "Initialize partition"
|
||||||
|
|
||||||
#: EnvironmentWarning.NoSSL.Text
|
#: EnvironmentWarning.NoSSL.Text
|
||||||
msgid "The connection is not encrypted - passwords can be easily intercepted."
|
msgid "The connection is not encrypted - passwords can be easily intercepted."
|
||||||
msgstr ""
|
msgstr "The connection is not encrypted - passwords can be easily intercepted."
|
||||||
|
|
||||||
#: EnvironmentWarning.NoSSL.Link.Text
|
#: EnvironmentWarning.NoSSL.Link.Text
|
||||||
msgid "Use encrypted connection"
|
msgid "Use encrypted connection"
|
||||||
msgstr ""
|
msgstr "Use encrypted connection"
|
||||||
|
|
||||||
#: WarningMessage.VolumeMayNotBeMounted.Link.Rel
|
#: WarningMessage.VolumeMayNotBeMounted.Link.Rel
|
||||||
msgid "volume_mount"
|
msgid "volume_mount"
|
||||||
msgstr ""
|
msgstr "volume_mount"
|
||||||
|
|
||||||
#: WarningMessage.InvalidAction.Link.Rel
|
#: WarningMessage.InvalidAction.Link.Rel
|
||||||
msgid "logs"
|
msgid "logs"
|
||||||
msgstr ""
|
msgstr "logs"
|
||||||
|
|
||||||
#: EnvironmentWarning.ReadOnlyConfig.Link.Rel
|
#: EnvironmentWarning.ReadOnlyConfig.Link.Rel
|
||||||
msgid "partition"
|
msgid "partition"
|
||||||
msgstr ""
|
msgstr "partition"
|
||||||
|
|
||||||
#: EnvironmentWarning.NoSSL.Link.Prot
|
#: EnvironmentWarning.NoSSL.Link.Prot
|
||||||
msgid "https"
|
msgid "https"
|
||||||
msgstr ""
|
msgstr "https"
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
#
|
#
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: CryptoBox-Server 0.3\n"
|
"Project-Id-Version: CryptoBox-Server 0.3\n"
|
||||||
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
|
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
|
||||||
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
|
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: 2006-11-30 08:49+0100\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
"X-Generator: Translate Toolkit 0.10.1\n"
|
"X-Generator: Pootle 0.10.1\n"
|
||||||
|
|
||||||
#: Name
|
#: Name
|
||||||
msgid "English"
|
msgid "English"
|
||||||
|
@ -20,7 +19,7 @@ msgstr ""
|
||||||
|
|
||||||
#: Title.Top
|
#: Title.Top
|
||||||
msgid "The CryptoBox"
|
msgid "The CryptoBox"
|
||||||
msgstr ""
|
msgstr "La CryptoBox"
|
||||||
|
|
||||||
#: Title.Slogan
|
#: Title.Slogan
|
||||||
msgid "Privacy for the rest of us."
|
msgid "Privacy for the rest of us."
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
#
|
#
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: CryptoBox-Server 0.3\n"
|
"Project-Id-Version: CryptoBox-Server 0.3\n"
|
||||||
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
|
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
|
||||||
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
|
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: 2006-11-30 08:49+0100\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||||
"X-Generator: Translate Toolkit 0.10.1\n"
|
"X-Generator: Pootle 0.10.1\n"
|
||||||
|
|
||||||
#: Name
|
#: Name
|
||||||
msgid "English"
|
msgid "English"
|
||||||
|
@ -20,7 +19,7 @@ msgstr ""
|
||||||
|
|
||||||
#: Title.Top
|
#: Title.Top
|
||||||
msgid "The CryptoBox"
|
msgid "The CryptoBox"
|
||||||
msgstr ""
|
msgstr "Privatnost v vsako vas"
|
||||||
|
|
||||||
#: Title.Slogan
|
#: Title.Slogan
|
||||||
msgid "Privacy for the rest of us."
|
msgid "Privacy for the rest of us."
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
#!/usr/bin/env python2.4
|
#!/usr/bin/env python2.4
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
23
setup.py
23
setup.py
|
@ -1,4 +1,25 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# Dependencies: clearsilver(python), cherrypy, python-configobj
|
||||||
|
#
|
||||||
|
|
||||||
## TODO: compilation of language files (po->mo) is not done here (only by debian/rules)
|
## TODO: compilation of language files (po->mo) is not done here (only by debian/rules)
|
||||||
|
|
||||||
|
@ -9,7 +30,7 @@ import os
|
||||||
## define some strings (not patterns) to exclude specific files or directories
|
## define some strings (not patterns) to exclude specific files or directories
|
||||||
IGNORE_FILES = [ '.svn', 'intl' ]
|
IGNORE_FILES = [ '.svn', 'intl' ]
|
||||||
|
|
||||||
## define the data destination directory (below the python directory - we will fix this for debian in the rules file)
|
## define the data destination directory (below the python directory - for debian this gets overridden the rules file)
|
||||||
pydir = distutils.sysconfig.get_python_lib()
|
pydir = distutils.sysconfig.get_python_lib()
|
||||||
## remove installation prefix to get relative path
|
## remove installation prefix to get relative path
|
||||||
pydir = pydir.replace(distutils.sysconfig.get_config_var("prefix") + os.path.sep, '')
|
pydir = pydir.replace(distutils.sysconfig.get_config_var("prefix") + os.path.sep, '')
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
## check python version
|
## check python version
|
||||||
import sys
|
import sys
|
||||||
(ver_major, ver_minor, ver_sub, ver_desc, ver_subsub) = sys.version_info
|
(ver_major, ver_minor, ver_sub, ver_desc, ver_subsub) = sys.version_info
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
"""
|
"""
|
||||||
exceptions of the cryptobox package
|
exceptions of the cryptobox package
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
'''
|
'''
|
||||||
This is the web interface for a fileserver managing encrypted filesystems.
|
This is the web interface for a fileserver managing encrypted filesystems.
|
||||||
'''
|
'''
|
||||||
|
@ -60,7 +80,7 @@ class CryptoBox:
|
||||||
|
|
||||||
# do some initial checks
|
# do some initial checks
|
||||||
def __runTests(self):
|
def __runTests(self):
|
||||||
self.__runTestUID()
|
#self.__runTestUID()
|
||||||
self.__runTestRootPriv()
|
self.__runTestRootPriv()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
from cryptobox.core.exceptions import *
|
from cryptobox.core.exceptions import *
|
||||||
import logging
|
import logging
|
||||||
try:
|
try:
|
||||||
|
@ -361,9 +381,8 @@ DisabledPlugins = list(default=list())
|
||||||
MountParentDir = directoryExists(default="/var/cache/cryptobox-server/mnt")
|
MountParentDir = directoryExists(default="/var/cache/cryptobox-server/mnt")
|
||||||
SettingsDir = directoryExists(default="/var/cache/cryptobox-server/settings")
|
SettingsDir = directoryExists(default="/var/cache/cryptobox-server/settings")
|
||||||
TemplateDir = directoryExists(default="/usr/share/cryptobox-server/template")
|
TemplateDir = directoryExists(default="/usr/share/cryptobox-server/template")
|
||||||
LangDir = directoryExists(default="/usr/share/cryptobox-server/lang")
|
|
||||||
DocDir = directoryExists(default="/usr/share/doc/cryptobox-server/www-data")
|
DocDir = directoryExists(default="/usr/share/doc/cryptobox-server/www-data")
|
||||||
PluginDir = directoryExists(default="/usr/share/cryptobox-server/plugins")
|
PluginDir = listOfExistingDirectories(default=list("/usr/share/cryptobox-server/plugins"))
|
||||||
EventDir = string(default="/etc/cryptobox-server/events.d")
|
EventDir = string(default="/etc/cryptobox-server/events.d")
|
||||||
|
|
||||||
[Log]
|
[Log]
|
||||||
|
@ -407,6 +426,7 @@ class CryptoBoxSettingsValidator(validate.Validator):
|
||||||
self.functions["directoryExists"] = self.check_directoryExists
|
self.functions["directoryExists"] = self.check_directoryExists
|
||||||
self.functions["fileExecutable"] = self.check_fileExecutable
|
self.functions["fileExecutable"] = self.check_fileExecutable
|
||||||
self.functions["fileWriteable"] = self.check_fileWriteable
|
self.functions["fileWriteable"] = self.check_fileWriteable
|
||||||
|
self.functions["listOfExistingDirectories"] = self.check_listOfExistingDirectories
|
||||||
|
|
||||||
|
|
||||||
def check_directoryExists(self, value):
|
def check_directoryExists(self, value):
|
||||||
|
@ -440,8 +460,24 @@ class CryptoBoxSettingsValidator(validate.Validator):
|
||||||
return file_path
|
return file_path
|
||||||
|
|
||||||
|
|
||||||
|
def check_listOfExistingDirectories(self, value):
|
||||||
|
if not value:
|
||||||
|
raise validate.VdtValueError("no plugin directory specified")
|
||||||
|
if not isinstance(value,list):
|
||||||
|
value = [value]
|
||||||
|
result = []
|
||||||
|
for d in value:
|
||||||
|
dir_path = os.path.abspath(d)
|
||||||
|
if not os.path.isdir(dir_path):
|
||||||
|
raise validate.VdtValueError("%s (plugin directory not found)" % d)
|
||||||
|
if not os.access(dir_path, os.X_OK):
|
||||||
|
raise validate.VdtValueError("%s (access denied for plugin directory)" % d)
|
||||||
|
result.append(dir_path)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
class MiscConfigFile:
|
class MiscConfigFile:
|
||||||
|
"""all other config files (e.g. a ssl certificate) to be stored"""
|
||||||
|
|
||||||
maxSize = 20480
|
maxSize = 20480
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -2,6 +2,25 @@
|
||||||
#
|
#
|
||||||
# parent class for all plugins of the CryptoBox
|
# parent class for all plugins of the CryptoBox
|
||||||
#
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import cherrypy
|
import cherrypy
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
#!/usr/bin/env python2.4
|
#!/usr/bin/env python2.4
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -1,23 +1,51 @@
|
||||||
#!/usr/bin/env python2.4
|
#!/usr/bin/env python2.4
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import cryptobox.core.tools as cbxTools
|
import cryptobox.core.tools as cbxTools
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
## use /dev/ubd? if possible - otherwise /dev/hd?
|
||||||
|
## so it will be possible to use these tests inside of an uml
|
||||||
|
for d in ["ubdb", "ubda", "udbc", "ubdd", "hdb", "hda", "hdc", "hdd"]:
|
||||||
|
if os.path.exists("/dev/%s1" % d):
|
||||||
|
device = d
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
device = "hda"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CryptoBoxToolsTests(unittest.TestCase):
|
class CryptoBoxToolsTests(unittest.TestCase):
|
||||||
|
|
||||||
def testGetAbsoluteDeviceName(self):
|
def testGetAbsoluteDeviceName(self):
|
||||||
func = cbxTools.getAbsoluteDeviceName
|
func = cbxTools.getAbsoluteDeviceName
|
||||||
self.assertTrue(func("hda") == "/dev/hda")
|
self.assertTrue(func(device) == "/dev/%s" % device)
|
||||||
self.assertTrue(func("loop0") == "/dev/loop0")
|
self.assertTrue(func("loop0") == "/dev/loop0")
|
||||||
self.assertTrue(func(os.path.devnull) == os.path.devnull)
|
self.assertTrue(func(os.path.devnull) == os.path.devnull)
|
||||||
|
|
||||||
|
|
||||||
def testFindMajorMinorOfDevice(self):
|
def testFindMajorMinorOfDevice(self):
|
||||||
func = cbxTools.findMajorMinorOfDevice
|
func = cbxTools.findMajorMinorOfDevice
|
||||||
self.assertTrue(func("/dev/hda") == (3,0))
|
|
||||||
self.assertTrue(func("/dev/hda1") == (3,1))
|
|
||||||
self.assertTrue(func(os.path.devnull) == (1,3))
|
self.assertTrue(func(os.path.devnull) == (1,3))
|
||||||
self.assertTrue(func("/dev/nothere") is None)
|
self.assertTrue(func("/dev/nothere") is None)
|
||||||
|
|
||||||
|
@ -25,20 +53,20 @@ class CryptoBoxToolsTests(unittest.TestCase):
|
||||||
def testFindMajorMinorDeviceName(self):
|
def testFindMajorMinorDeviceName(self):
|
||||||
func = cbxTools.findMajorMinorDeviceName
|
func = cbxTools.findMajorMinorDeviceName
|
||||||
dir = os.path.join(os.path.sep, "dev")
|
dir = os.path.join(os.path.sep, "dev")
|
||||||
self.assertTrue(os.path.join(dir,"hda") in func(dir,3,0))
|
|
||||||
self.assertTrue(os.path.devnull in func(dir,1,3))
|
self.assertTrue(os.path.devnull in func(dir,1,3))
|
||||||
self.assertFalse(os.path.devnull in func(dir,2,3))
|
self.assertFalse(os.path.devnull in func(dir,2,3))
|
||||||
|
self.assertFalse(None in func(dir,17,23))
|
||||||
|
|
||||||
|
|
||||||
def testIsPartOfBlockDevice(self):
|
def testIsPartOfBlockDevice(self):
|
||||||
func = cbxTools.isPartOfBlockDevice
|
func = cbxTools.isPartOfBlockDevice
|
||||||
self.assertTrue(func("/dev/hda", "/dev/hda1"))
|
self.assertTrue(func("/dev/%s" % device, "/dev/%s1" % device))
|
||||||
self.assertFalse(func("/dev/hda", "/dev/hda"))
|
self.assertFalse(func("/dev/%s" % device, "/dev/%s" % device))
|
||||||
self.assertFalse(func("/dev/hda1", "/dev/hda"))
|
self.assertFalse(func("/dev/%s1" % device, "/dev/%s" % device))
|
||||||
self.assertFalse(func("/dev/hda1", "/dev/hda1"))
|
self.assertFalse(func("/dev/%s1" % device, "/dev/%s1" % device))
|
||||||
self.assertFalse(func("/dev/hda", "/dev/hdb1"))
|
self.assertFalse(func("/dev/%s" % device, "/dev/hde1"))
|
||||||
self.assertFalse(func(None, "/dev/hdb1"))
|
self.assertFalse(func(None, "/dev/%s1" % device))
|
||||||
self.assertFalse(func("/dev/hda", None))
|
self.assertFalse(func("/dev/%s" % device, None))
|
||||||
self.assertFalse(func(None, ""))
|
self.assertFalse(func(None, ""))
|
||||||
self.assertFalse(func("loop0", "loop1"))
|
self.assertFalse(func("loop0", "loop1"))
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
#!/usr/bin/python2.4
|
#!/usr/bin/python2.4
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import cryptobox.plugins.manage
|
import cryptobox.plugins.manage
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
#!/usr/bin/env python2.4
|
#!/usr/bin/env python2.4
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
@ -15,7 +35,9 @@ class WebServer(cryptobox.web.testclass.WebInterfaceTestClass):
|
||||||
|
|
||||||
def test_is_server_running(self):
|
def test_is_server_running(self):
|
||||||
'''the server should run under given name and port'''
|
'''the server should run under given name and port'''
|
||||||
|
self.register_auth(self.URL)
|
||||||
self.cmd.go(self.URL)
|
self.cmd.go(self.URL)
|
||||||
|
self.cmd.find("CBOX-STATUS")
|
||||||
## other URLs must not be checked, as we do not know, if they are valid
|
## other URLs must not be checked, as we do not know, if they are valid
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,11 +46,12 @@ class BuiltinPages(cryptobox.web.testclass.WebInterfaceTestClass):
|
||||||
|
|
||||||
def test_goto_index(self):
|
def test_goto_index(self):
|
||||||
'''display all devices'''
|
'''display all devices'''
|
||||||
self.cmd.go(self.URL + "?weblang=en")
|
self.register_auth(self.URL)
|
||||||
|
self.cmd.go(self.URL)
|
||||||
self.cmd.find("The CryptoBox")
|
self.cmd.find("The CryptoBox")
|
||||||
self.cmd.go(self.URL + "?weblang=de")
|
self.cmd.go(self.URL + "?weblang=de")
|
||||||
self.cmd.find("Die CryptoBox")
|
self.cmd.find("Die CryptoBox")
|
||||||
self.cmd.go(self.URL + "?weblang=si")
|
self.cmd.go(self.URL + "?weblang=sl")
|
||||||
self.cmd.find("Privatnost v vsako vas")
|
self.cmd.find("Privatnost v vsako vas")
|
||||||
self.cmd.go(self.URL + "?weblang=fr")
|
self.cmd.go(self.URL + "?weblang=fr")
|
||||||
self.cmd.find("La CryptoBox")
|
self.cmd.find("La CryptoBox")
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from cryptobox.core.exceptions import *
|
from cryptobox.core.exceptions import *
|
||||||
import cryptobox.core.container as cbxContainer
|
import cryptobox.core.container as cbxContainer
|
||||||
|
@ -24,7 +44,7 @@ class WebInterfaceDataset(dict):
|
||||||
import cryptobox.core.main
|
import cryptobox.core.main
|
||||||
import cryptobox.web.languages
|
import cryptobox.web.languages
|
||||||
self["Data.Version"] = cryptobox.core.main.VERSION
|
self["Data.Version"] = cryptobox.core.main.VERSION
|
||||||
langs = self.cbox.prefs["WebSettings"]["Languages"]
|
langs = self.cbox.prefs["WebSettings"]["Languages"][:]
|
||||||
langs.sort()
|
langs.sort()
|
||||||
for (index, lang) in enumerate(langs):
|
for (index, lang) in enumerate(langs):
|
||||||
try:
|
try:
|
||||||
|
@ -125,7 +145,6 @@ class WebInterfaceDataset(dict):
|
||||||
|
|
||||||
def __setConfigValues(self):
|
def __setConfigValues(self):
|
||||||
self["Settings.TemplateDir"] = os.path.abspath(self.prefs["Locations"]["TemplateDir"])
|
self["Settings.TemplateDir"] = os.path.abspath(self.prefs["Locations"]["TemplateDir"])
|
||||||
self["Settings.LanguageDir"] = os.path.abspath(self.prefs["Locations"]["LangDir"])
|
|
||||||
self["Settings.DocDir"] = os.path.abspath(self.prefs["Locations"]["DocDir"])
|
self["Settings.DocDir"] = os.path.abspath(self.prefs["Locations"]["DocDir"])
|
||||||
self["Settings.Stylesheet"] = self.prefs["WebSettings"]["Stylesheet"]
|
self["Settings.Stylesheet"] = self.prefs["WebSettings"]["Stylesheet"]
|
||||||
self["Settings.Language"] = self.prefs["WebSettings"]["Languages"][0]
|
self["Settings.Language"] = self.prefs["WebSettings"]["Languages"][0]
|
||||||
|
@ -133,15 +152,3 @@ class WebInterfaceDataset(dict):
|
||||||
self["Settings.SettingsDir"] = self.prefs["Locations"]["SettingsDir"]
|
self["Settings.SettingsDir"] = self.prefs["Locations"]["SettingsDir"]
|
||||||
|
|
||||||
|
|
||||||
def __getLanguageName(self, lang):
|
|
||||||
try:
|
|
||||||
import neo_cgi, neo_util, neo_cs
|
|
||||||
except:
|
|
||||||
raise CBEnvironmentError("couldn't import 'neo_*'! Try 'apt-get install python-clearsilver'.")
|
|
||||||
hdf_path = os.path.join(self.prefs["Locations"]["LangDir"], lang + ".hdf")
|
|
||||||
hdf = neo_util.HDF()
|
|
||||||
hdf.readFile(hdf_path)
|
|
||||||
return hdf.getValue("Name",lang)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,24 @@
|
||||||
|
#-*- coding: UTF-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
"""supply information about existing languages
|
"""supply information about existing languages
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
import cryptobox.core.main
|
import cryptobox.core.main
|
||||||
import cryptobox.web.dataset
|
import cryptobox.web.dataset
|
||||||
import cryptobox.plugins.manage
|
import cryptobox.plugins.manage
|
||||||
|
@ -47,7 +67,7 @@ class WebInterfaceSites:
|
||||||
## store the original http error handler
|
## store the original http error handler
|
||||||
self._cp_on_http_error = self.newHTTPErrorHandler
|
self._cp_on_http_error = self.newHTTPErrorHandler
|
||||||
## set initial language order
|
## set initial language order
|
||||||
self.langOrder = self.cbox.prefs["WebSettings"]["Languages"]
|
self.langOrder = self.cbox.prefs["WebSettings"]["Languages"][:]
|
||||||
|
|
||||||
|
|
||||||
def __resetDataset(self):
|
def __resetDataset(self):
|
||||||
|
@ -331,18 +351,22 @@ class WebInterfaceSites:
|
||||||
"""
|
"""
|
||||||
## start with the configured language order
|
## start with the configured language order
|
||||||
langOrder = self.cbox.prefs["WebSettings"]["Languages"][:]
|
langOrder = self.cbox.prefs["WebSettings"]["Languages"][:]
|
||||||
|
self.cbox.log.debug("updating language preferences (default: %s)" % str(langOrder))
|
||||||
## put the preferred browser language in front
|
## put the preferred browser language in front
|
||||||
guess = self.__getPreferredBrowserLanguage(langOrder)
|
guess = self.__getPreferredBrowserLanguage(langOrder)
|
||||||
if guess:
|
if guess:
|
||||||
langOrder.remove(guess)
|
langOrder.remove(guess)
|
||||||
langOrder.insert(0,guess)
|
langOrder.insert(0,guess)
|
||||||
|
self.cbox.log.debug("raised priority of preferred browser language: %s" % guess)
|
||||||
## is the chosen language (via web interface) valid? - put it in front
|
## is the chosen language (via web interface) valid? - put it in front
|
||||||
if value and (value in langOrder) and (not re.search(u'\W',value)):
|
if value and (value in langOrder) and (not re.search(u'\W',value)):
|
||||||
langOrder.remove(value)
|
langOrder.remove(value)
|
||||||
langOrder.insert(0,value)
|
langOrder.insert(0,value)
|
||||||
|
self.cbox.log.debug("raised priority of selected language: %s" % value)
|
||||||
elif value:
|
elif value:
|
||||||
self.cbox.log.info("invalid language selected: %s" % value)
|
self.cbox.log.info("invalid language selected: %s" % value)
|
||||||
## store current language setting
|
## store current language setting
|
||||||
|
self.cbox.log.debug("current language preference: %s" % str(langOrder))
|
||||||
self.langOrder = langOrder
|
self.langOrder = langOrder
|
||||||
self.dataset["Settings.Language"] = langOrder[0]
|
self.dataset["Settings.Language"] = langOrder[0]
|
||||||
self.dataset["Settings.LinkAttrs.weblang"] = langOrder[0]
|
self.dataset["Settings.LinkAttrs.weblang"] = langOrder[0]
|
||||||
|
@ -402,7 +426,12 @@ class WebInterfaceSites:
|
||||||
def translate_node(node):
|
def translate_node(node):
|
||||||
for (key,value) in node.attrs():
|
for (key,value) in node.attrs():
|
||||||
if key == 'LINK': return
|
if key == 'LINK': return
|
||||||
node.setValue("",translator.ugettext(node.value()))
|
try:
|
||||||
|
node.setValue("",translator.ugettext(node.value()))
|
||||||
|
except UnicodeEncodeError, errMsg:
|
||||||
|
self.cbox.log.info("Failed unicode encoding for gettext: %s - %s" % (node.value(),errMsg))
|
||||||
|
## fallback to default encoding
|
||||||
|
node.setValue("",translator.gettext(node.value()))
|
||||||
while hdf_node:
|
while hdf_node:
|
||||||
translate_node(hdf_node)
|
translate_node(hdf_node)
|
||||||
walk_tree(hdf_node.child())
|
walk_tree(hdf_node.child())
|
||||||
|
@ -417,7 +446,7 @@ class WebInterfaceSites:
|
||||||
## check if the language setting was changed - use cached data if possible
|
## check if the language setting was changed - use cached data if possible
|
||||||
try:
|
try:
|
||||||
if self.cachedLanguageData["langOrder"] == self.langOrder:
|
if self.cachedLanguageData["langOrder"] == self.langOrder:
|
||||||
self.cbox.log.debug("using cached language data")
|
self.cbox.log.debug("using cached language data: %s" % str(self.langOrder))
|
||||||
return self.cachedLanguageData["hdf"]
|
return self.cachedLanguageData["hdf"]
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
#
|
||||||
|
# Copyright 2006 sense.lab e.V.
|
||||||
|
#
|
||||||
|
# This file is part of the CryptoBox.
|
||||||
|
#
|
||||||
|
# The CryptoBox is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The CryptoBox is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the CryptoBox; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
"""
|
"""
|
||||||
super class of all web interface unittests for the cryptobox
|
super class of all web interface unittests for the cryptobox
|
||||||
|
|
||||||
|
@ -8,6 +28,8 @@ import unittest
|
||||||
import twill
|
import twill
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import cryptobox.web.sites
|
import cryptobox.web.sites
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
## we do the following, for easy surfing
|
## we do the following, for easy surfing
|
||||||
## e.g. use: cbx.go(your_url)
|
## e.g. use: cbx.go(your_url)
|
||||||
|
@ -42,7 +64,7 @@ class WebInterfaceTestClass(unittest.TestCase):
|
||||||
'server.threadPool': 1,
|
'server.threadPool': 1,
|
||||||
'server.environment': 'production',
|
'server.environment': 'production',
|
||||||
})
|
})
|
||||||
cherrypy.root = cryptobox.web.sites.WebInterfaceSites()
|
cherrypy.root = cryptobox.web.sites.WebInterfaceSites("cryptobox-unittests.conf")
|
||||||
cherrypy.server.start(initOnly=True, serverClass=None)
|
cherrypy.server.start(initOnly=True, serverClass=None)
|
||||||
|
|
||||||
from cherrypy._cpwsgi import wsgiApp
|
from cherrypy._cpwsgi import wsgiApp
|
||||||
|
@ -55,6 +77,17 @@ class WebInterfaceTestClass(unittest.TestCase):
|
||||||
self.URL = CBX_URL
|
self.URL = CBX_URL
|
||||||
self.cbox = cherrypy.root.cbox
|
self.cbox = cherrypy.root.cbox
|
||||||
self.globals, self.locals = twill.namespaces.get_twill_glocals()
|
self.globals, self.locals = twill.namespaces.get_twill_glocals()
|
||||||
|
## search for a usable block device
|
||||||
|
## use /dev/ubd? if possible - otherwise /dev/hd?
|
||||||
|
## so it will be possible to use these tests inside of an uml
|
||||||
|
for d in ["ubdb", "loop", "ubda", "udbc", "ubdd", "hdb", "hda", "hdc", "hdd"]:
|
||||||
|
if os.path.exists("/dev/%s1" % d):
|
||||||
|
device = d
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
device = "hda"
|
||||||
|
self.device = device
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Bug-Report: twill/other-modules/ClientForm.py: uncomment line 846 ("XHTMLCompatibleFormParser" instead of default parser) - this solves an eternal loop-problem caused by line 958 ("fp.feed(ch)")
|
Bug-Report: twill/other-packages/ClientForm.py: uncomment line 846 ("XHTMLCompatibleFormParser" instead of default parser) - this solves an eternal loop-problem caused by line 958 ("fp.feed(ch)")
|
||||||
|
|
||||||
Bug-Report: testoob - loading of a TestSuite (as advertised by the commandline help) does not work (due to unittest.py/loadTestsFromModule)
|
Bug-Report: testoob - loading of a TestSuite (as advertised by the commandline help) does not work (due to unittest.py/loadTestsFromModule)
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
</div><!-- end of 'main' -->
|
</div><!-- end of 'main' -->
|
||||||
|
|
||||||
<?cs # TODO: update these status settings - most are outdated ... ?>
|
|
||||||
<!-- CBOX-STATUS-begin - used for validation - do not touch!
|
<!-- CBOX-STATUS-begin - used for validation - do not touch!
|
||||||
Settings.Language=<?cs var:html_escape(Settings.Language) ?>
|
Settings.Language=<?cs var:html_escape(Settings.Language) ?>
|
||||||
Data.Version=<?cs var:html_escape(Data.Version) ?>
|
Data.Version=<?cs var:html_escape(Data.Version) ?>
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
Name = English
|
|
||||||
|
|
||||||
Title {
|
Title {
|
||||||
Top = The CryptoBox
|
Top = The CryptoBox
|
||||||
Slogan = Privacy for the rest of us.
|
Slogan = Privacy for the rest of us.
|
||||||
|
|
Loading…
Reference in a new issue