adapted packaging to new translation system
This commit is contained in:
parent
557d3e8f8c
commit
8cc788ec8f
|
@ -11,4 +11,5 @@ graft www-data
|
||||||
graft templates
|
graft templates
|
||||||
graft lang
|
graft lang
|
||||||
graft plugins
|
graft plugins
|
||||||
|
graft intl
|
||||||
prune package.exclude
|
prune package.exclude
|
||||||
|
|
22
setup.py
22
setup.py
|
@ -1,11 +1,13 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
## TODO: compilation of language files (po->mo) is not done here (only by debian/rules)
|
||||||
|
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
import distutils.sysconfig
|
import distutils.sysconfig
|
||||||
import os
|
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' ]
|
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 - we will fix this for debian in the rules file)
|
||||||
pydir = distutils.sysconfig.get_python_lib()
|
pydir = distutils.sysconfig.get_python_lib()
|
||||||
|
@ -50,6 +52,21 @@ def getdatafiles(prefix,dirs):
|
||||||
return filelist
|
return filelist
|
||||||
|
|
||||||
|
|
||||||
|
def get_language_files(prefix):
|
||||||
|
"""return a destination-file mapping for all compiled language files (*.po)"""
|
||||||
|
mapping = []
|
||||||
|
## find all language directories
|
||||||
|
intl_dirs = []
|
||||||
|
for root,dirs,files in os.walk(os.getcwd()):
|
||||||
|
if 'intl' in dirs: intl_dirs.append(os.path.join(root,'intl'))
|
||||||
|
print intl_dirs
|
||||||
|
for i_dir in intl_dirs:
|
||||||
|
for lang_dir in [ os.path.join(i_dir,e) for e in os.listdir(i_dir) if os.path.isdir(os.path.join(i_dir,e)) and (not e in IGNORE_FILES) ]:
|
||||||
|
mapping.append((os.path.join(prefix, os.path.basename(lang_dir),'LC_MESSAGES'), [ os.path.join(lang_dir,e) for e in os.listdir(lang_dir) if os.path.isfile(os.path.join(lang_dir,e)) and (e[-3:] == '.po') ]))
|
||||||
|
return mapping
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'cryptobox-server',
|
name = 'cryptobox-server',
|
||||||
version = '0.3.0',
|
version = '0.3.0',
|
||||||
|
@ -65,7 +82,8 @@ setup(
|
||||||
getdatafiles(confdir, ['conf-examples/cryptobox.conf']) +
|
getdatafiles(confdir, ['conf-examples/cryptobox.conf']) +
|
||||||
getdatafiles(os.path.join(confdir,'events.d'), ['event-scripts/README','event-scripts/_event_scripts_']) +
|
getdatafiles(os.path.join(confdir,'events.d'), ['event-scripts/README','event-scripts/_event_scripts_']) +
|
||||||
getdatafiles(docdir, ['doc/html']) +
|
getdatafiles(docdir, ['doc/html']) +
|
||||||
getdatafiles(docdir, ['conf-examples','event-scripts','README','changelog','LICENSE','copyright','doc/html']),
|
getdatafiles(docdir, ['conf-examples','event-scripts','README','changelog','LICENSE','copyright','doc/html']) +
|
||||||
|
get_language_files('share/locale'),
|
||||||
package_dir = { '': 'src' },
|
package_dir = { '': 'src' },
|
||||||
scripts = [ 'bin/CryptoBoxWebserver', 'bin/CryptoBoxRootActions' ],
|
scripts = [ 'bin/CryptoBoxWebserver', 'bin/CryptoBoxRootActions' ],
|
||||||
classifiers = [
|
classifiers = [
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
Name = English
|
||||||
|
|
||||||
|
Title {
|
||||||
|
Top = The CryptoBox
|
||||||
|
Slogan = Privacy for the rest of us.
|
||||||
|
Volume = Volume
|
||||||
|
AccessDenied = Access denied
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Text {
|
||||||
|
EnterCurrentPassword = Enter the current password
|
||||||
|
EnterNewPassword = Enter new password
|
||||||
|
EnterSamePassword = Repeat new password
|
||||||
|
RedirectNote = Click here if your browser does not support automatic redirection.
|
||||||
|
ProjectHomePage = Website of project
|
||||||
|
ProjectNote = The CryptoBox is a project of
|
||||||
|
ContainerName = Container's name
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Button {
|
||||||
|
HelpForForm = Get help
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WarningMessage {
|
||||||
|
|
||||||
|
AccessDenied {
|
||||||
|
Title = Invalid access credentials
|
||||||
|
Text = Sorry - you are not allowed to do this!
|
||||||
|
}
|
||||||
|
|
||||||
|
EmptyPassword {
|
||||||
|
Title = Missing password
|
||||||
|
Text = You have to enter a password!
|
||||||
|
}
|
||||||
|
|
||||||
|
EmptyNewPassword {
|
||||||
|
Title = Missing new password
|
||||||
|
Text = You have to enter a new password!
|
||||||
|
}
|
||||||
|
|
||||||
|
DifferentPasswords {
|
||||||
|
Title = Different passwords
|
||||||
|
Text = The passwords you entered did not match.
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidDevice {
|
||||||
|
Title = Invalid device
|
||||||
|
Text = The device you have chosen is invalid!
|
||||||
|
}
|
||||||
|
|
||||||
|
VolumeMayNotBeMounted {
|
||||||
|
Title = The container is mounted
|
||||||
|
Text = This action is not available while the container is active. Please turn it off first.
|
||||||
|
Link.Text = Deactivate volume
|
||||||
|
Link.Rel = volume_mount
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidAction {
|
||||||
|
Title = Invalid request
|
||||||
|
Text = 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.
|
||||||
|
Link.Text = View log
|
||||||
|
Link.Rel = logs
|
||||||
|
}
|
||||||
|
|
||||||
|
RuntimeError {
|
||||||
|
Title = Something weird happened
|
||||||
|
Text = 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!
|
||||||
|
Link.Text = View log
|
||||||
|
Link.Rel = logs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EnvironmentWarning {
|
||||||
|
|
||||||
|
ReadOnlyConfig {
|
||||||
|
Text = Read-only setup detected - probably you should create a configuration partition.
|
||||||
|
Link.Text = Initialize partition
|
||||||
|
Link.Rel = partition
|
||||||
|
}
|
||||||
|
|
||||||
|
NoSSL {
|
||||||
|
Text = The connection is not encrypted - passwords can be easily intercepted.
|
||||||
|
Link.Text = Use encrypted connection
|
||||||
|
Link.Prot = https
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue