initial commit
6
ABOUT
Normal file
@@ -0,0 +1,6 @@
|
||||
web2py is an open source full-stack framework for agile development
|
||||
of secure database-driven web-based applications, written and programmable in
|
||||
Python.
|
||||
|
||||
Created by Massimo Di Pierro <mdipierro@cs.depaul.edu>
|
||||
|
||||
0
Introduction
Normal file
137
LICENSE
Normal file
@@ -0,0 +1,137 @@
|
||||
## Web2py License
|
||||
|
||||
Web2py is Licensed under the LGPL license version 3
|
||||
(http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
Copyrighted (c) by Massimo Di Pierro (2007-2011)
|
||||
|
||||
### On Commercial Redistribution
|
||||
|
||||
In accordance with LGPL you may:
|
||||
- redistribute web2py with your apps (including official web2py binary versions)
|
||||
- release your applications which use official web2py libraries under any license you wish
|
||||
But you must:
|
||||
- make clear in the documentation that your application uses web2py
|
||||
- release any modification of the web2py libraries under the LGPLv3 license
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
||||
NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT
|
||||
HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE,
|
||||
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
|
||||
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
|
||||
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
(Earlier versions of web2py, 1.0.*-1.90.*, were released under the GPL2 license plus a
|
||||
commercial exception which, for practical purposes, was very similar to the current LPGLv3)
|
||||
|
||||
### Licenses for third party contributed software
|
||||
|
||||
web2py contains third party software under the gluon/contrib/ folder.
|
||||
Each file/module in contrib is distributed with web2py under its original license.
|
||||
Here we list some of them.
|
||||
|
||||
#### gluon.contrib.simplejson LICENSE
|
||||
|
||||
Copyright (c) 2006 Bob Ippolito - Permission is hereby granted, free of charge,
|
||||
to any person obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
#### gluon.contrib.rss2.py (originally PyRSS2Gen) LICENSE
|
||||
|
||||
This is copyright (c) by Dalke Scientific Software, LLC and released under the
|
||||
BSD license. See the file LICENSE in the distribution or
|
||||
<http://www.opensource.org/licenses/bsd-license.php> for details.
|
||||
|
||||
#### gluon.contrib.markdown (markdown2) LICENSE
|
||||
|
||||
MIT License from from <http://code.google.com/p/python-markdown2/>
|
||||
|
||||
#### gluon.contrib.feedparser LICENSE
|
||||
|
||||
Copyright (c) 2002-2005, Mark Pilgrim
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#### gluon.wsgiserver.py LICENSE (borrowed from cherrypy)
|
||||
|
||||
Copyright (c) 2004, CherryPy Team (team@cherrypy.org)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the CherryPy Team nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#### gluon.contrib.pam LICENSE
|
||||
|
||||
Copyright (C) 2007-2009 Chris AtLee <chris@atlee.ca> Licensed under the MIT license
|
||||
|
||||
#### gluon.contrib.shell LICENSE
|
||||
|
||||
Copyright (C) by Google inc. Apache 2.0 Lincense
|
||||
|
||||
#### The javascript licenses are in the code itself
|
||||
|
||||
1
MANIFEST.in
Normal file
@@ -0,0 +1 @@
|
||||
include VERSION LICENSE
|
||||
123
Makefile
Normal file
@@ -0,0 +1,123 @@
|
||||
clean:
|
||||
rm -f httpserver.log
|
||||
rm -f parameters*.py
|
||||
rm -f -r applications/*/compiled
|
||||
find ./ -name '*~' -exec rm -f {} \;
|
||||
find ./ -name '*.orig' -exec rm -f {} \;
|
||||
find ./ -name '*.rej' -exec rm -f {} \;
|
||||
find ./ -name '#*' -exec rm -f {} \;
|
||||
find ./ -name 'Thumbs.db' -exec rm -f {} \;
|
||||
find ./gluon/ -name '.*' -exec rm -f {} \;
|
||||
find ./gluon/ -name '*class' -exec rm -f {} \;
|
||||
find ./applications/admin/ -name '.*' -exec rm -f {} \;
|
||||
find ./applications/examples/ -name '.*' -exec rm -f {} \;
|
||||
find ./applications/welcome/ -name '.*' -exec rm -f {} \;
|
||||
find ./ -name '*.pyc' -exec rm -f {} \;
|
||||
all:
|
||||
echo "The Makefile is used to build the distribution."
|
||||
echo "In order to run web2py you do not need to make anything."
|
||||
echo "just run web2py.py"
|
||||
epydoc:
|
||||
### build epydoc
|
||||
rm -f -r applications/examples/static/epydoc/
|
||||
epydoc --config epydoc.conf
|
||||
cp applications/examples/static/title.png applications/examples/static/epydoc
|
||||
tests:
|
||||
cd gluon/tests; ./test.sh 1>tests.log 2>&1
|
||||
update:
|
||||
wget -O gluon/contrib/feedparser.py http://feedparser.googlecode.com/svn/trunk/feedparser/feedparser.py
|
||||
wget -O gluon/contrib/simplejsonrpc.py http://rad2py.googlecode.com/hg/ide2py/simplejsonrpc.py
|
||||
src:
|
||||
echo 'Version 1.99.3 ('`date +%Y-%m-%d\ %H:%M:%S`') dev' > VERSION
|
||||
### rm -f all junk files
|
||||
make clean
|
||||
### clean up baisc apps
|
||||
rm -f routes.py
|
||||
rm -f applications/*/sessions/*
|
||||
rm -f applications/*/errors/* | echo 'too many files'
|
||||
rm -f applications/*/cache/*
|
||||
rm -f applications/admin/databases/*
|
||||
rm -f applications/welcome/databases/*
|
||||
rm -f applications/examples/databases/*
|
||||
rm -f applications/admin/uploads/*
|
||||
rm -f applications/welcome/uploads/*
|
||||
rm -f applications/examples/uploads/*
|
||||
### make admin layout and appadmin the default
|
||||
cp applications/admin/views/appadmin.html applications/welcome/views
|
||||
cp applications/admin/views/appadmin.html applications/examples/views
|
||||
cp applications/admin/controllers/appadmin.py applications/welcome/controllers
|
||||
cp applications/admin/controllers/appadmin.py applications/examples/controllers
|
||||
### update the license
|
||||
cp ABOUT applications/admin/
|
||||
cp ABOUT applications/examples/
|
||||
cp LICENSE applications/admin/
|
||||
cp LICENSE applications/examples/
|
||||
### build web2py_src.zip
|
||||
echo '' > NEWINSTALL
|
||||
mv web2py_src.zip web2py_src_old.zip | echo 'no old'
|
||||
cd ..; zip -r web2py/web2py_src.zip web2py/gluon/*.py web2py/gluon/contrib/* web2py/splashlogo.gif web2py/*.py web2py/ABOUT web2py/LICENSE web2py/README web2py/NEWINSTALL web2py/VERSION web2py/Makefile web2py/epydoc.css web2py/epydoc.conf web2py/app.example.yaml web2py/logging.example.conf web2py_exe.conf web2py/queue.example.yaml MANIFEST.in w2p_apps w2p_clone w2p_run startweb2py web2py/scripts/*.sh web2py/scripts/*.py web2py/applications/admin web2py/applications/examples/ web2py/applications/welcome web2py/applications/__init__.py web2py/site-packages/__init__.py web2py/gluon/tests/*.sh web2py/gluon/tests/*.py
|
||||
|
||||
mdp:
|
||||
make epydoc
|
||||
make src
|
||||
make app
|
||||
make win
|
||||
app:
|
||||
echo 'did you uncomment import_all in gluon/main.py?'
|
||||
python2.5 -c 'import compileall; compileall.compile_dir("gluon/")'
|
||||
#python web2py.py -S welcome -R __exit__.py
|
||||
find gluon -path '*.pyc' -exec cp {} ../web2py_osx/site-packages/{} \;
|
||||
cd ../web2py_osx/site-packages/; zip -r ../site-packages.zip *
|
||||
mv ../web2py_osx/site-packages.zip ../web2py_osx/web2py/web2py.app/Contents/Resources/lib/python2.5
|
||||
cp ABOUT ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp NEWINSTALL ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp LICENSE ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp VERSION ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp README ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp splashlogo.gif ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp options_std.py ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp routes.example.py ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp router.example.py ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp app.example.yaml ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp queue.example.yaml ../web2py_osx/web2py/web2py.app/Contents/Resources
|
||||
cp -r applications/admin ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
|
||||
cp -r applications/welcome ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
|
||||
cp -r applications/examples ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
|
||||
cp applications/__init__.py ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
|
||||
cd ../web2py_osx; zip -r web2py_osx.zip web2py
|
||||
mv ../web2py_osx/web2py_osx.zip .
|
||||
win:
|
||||
echo 'did you uncomment import_all in gluon/main.py?'
|
||||
python2.5 -c 'import compileall; compileall.compile_dir("gluon/")'
|
||||
find gluon -path '*.pyc' -exec cp {} ../web2py_win/library/{} \;
|
||||
cd ../web2py_win/library/; zip -r ../library.zip *
|
||||
mv ../web2py_win/library.zip ../web2py_win/web2py
|
||||
cp ABOUT ../web2py_win/web2py/
|
||||
cp NEWINSTALL ../web2py_win/web2py/
|
||||
cp LICENSE ../web2py_win/web2py/
|
||||
cp VERSION ../web2py_win/web2py/
|
||||
cp README ../web2py_win/web2py/
|
||||
cp splashlogo.gif ../web2py_win/web2py/
|
||||
cp options_std.py ../web2py_win/web2py/
|
||||
cp routes.example.py ../web2py_win/web2py/
|
||||
cp router.example.py ../web2py_win/web2py/
|
||||
cp app.example.yaml ../web2py_win/web2py/
|
||||
cp queue.example.yaml ../web2py_win/web2py/
|
||||
cp -r applications/admin ../web2py_win/web2py/applications
|
||||
cp -r applications/welcome ../web2py_win/web2py/applications
|
||||
cp -r applications/examples ../web2py_win/web2py/applications
|
||||
cp applications/__init__.py ../web2py_win/web2py/applications
|
||||
cd ../web2py_win; zip -r web2py_win.zip web2py
|
||||
mv ../web2py_win/web2py_win.zip .
|
||||
pip:
|
||||
# create Web2py distribution for upload to Pypi
|
||||
# after upload clean Web2py sources with rm -R ./dist
|
||||
python setup.py sdist
|
||||
run:
|
||||
python2.5 web2py.py -a hello
|
||||
push:
|
||||
make src
|
||||
echo '' > NEWINSTALL
|
||||
hg push
|
||||
bzr push bzr+ssh://mdipierro@bazaar.launchpad.net/~mdipierro/web2py/devel --use-existing-dir
|
||||
|
||||
1
NEWINSTALL
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
TODO
Normal file
@@ -0,0 +1,3 @@
|
||||
idea for scheduler
|
||||
http://panela.blog-city.com/how_to_timeout_in_python_with_multiprocessing.htm
|
||||
|
||||
3
__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
||||
300
anyserver.py
Normal file
@@ -0,0 +1,300 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
This file is part of the web2py Web Framework
|
||||
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
|
||||
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
This file is based, although a rewrite, on MIT-licensed code from the Bottle web framework.
|
||||
"""
|
||||
|
||||
import os, sys, optparse, urllib
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
os.chdir(path)
|
||||
sys.path = [path]+[p for p in sys.path if not p==path]
|
||||
import gluon.main
|
||||
from gluon.fileutils import read_file, write_file
|
||||
|
||||
class Servers:
|
||||
@staticmethod
|
||||
def cgi(app, address=None, **options):
|
||||
from wsgiref.handlers import CGIHandler
|
||||
CGIHandler().run(app) # Just ignore host and port here
|
||||
|
||||
@staticmethod
|
||||
def flup(app,address, **options):
|
||||
import flup.server.fcgi
|
||||
flup.server.fcgi.WSGIServer(app, bindAddress=address).run()
|
||||
|
||||
@staticmethod
|
||||
def wsgiref(app,address,**options): # pragma: no cover
|
||||
from wsgiref.simple_server import make_server, WSGIRequestHandler
|
||||
class QuietHandler(WSGIRequestHandler):
|
||||
def log_request(*args, **kw): pass
|
||||
options['handler_class'] = QuietHandler
|
||||
srv = make_server(address[0],address[1],app,**options)
|
||||
srv.serve_forever()
|
||||
|
||||
@staticmethod
|
||||
def cherrypy(app,address, **options):
|
||||
from cherrypy import wsgiserver
|
||||
server = wsgiserver.CherryPyWSGIServer(address, app)
|
||||
server.start()
|
||||
|
||||
@staticmethod
|
||||
def rocket(app,address, **options):
|
||||
from gluon.rocket import CherryPyWSGIServer
|
||||
server = CherryPyWSGIServer(address, app)
|
||||
server.start()
|
||||
|
||||
@staticmethod
|
||||
def rocket_with_repoze_profiler(app,address, **options):
|
||||
from gluon.rocket import CherryPyWSGIServer
|
||||
from repoze.profile.profiler import AccumulatingProfileMiddleware
|
||||
from gluon.settings import global_settings
|
||||
global_settings.web2py_crontype = 'none'
|
||||
wrapped = AccumulatingProfileMiddleware(
|
||||
app,
|
||||
log_filename='wsgi.prof',
|
||||
discard_first_request=True,
|
||||
flush_at_shutdown=True,
|
||||
path = '/__profile__'
|
||||
)
|
||||
server = CherryPyWSGIServer(address, wrapped)
|
||||
server.start()
|
||||
|
||||
@staticmethod
|
||||
def paste(app,address,**options):
|
||||
from paste import httpserver
|
||||
from paste.translogger import TransLogger
|
||||
httpserver.serve(app, host=address[0], port=address[1], **options)
|
||||
|
||||
@staticmethod
|
||||
def fapws(app,address, **options):
|
||||
import fapws._evwsgi as evwsgi
|
||||
from fapws import base
|
||||
evwsgi.start(address[0],str(address[1]))
|
||||
evwsgi.set_base_module(base)
|
||||
def app(environ, start_response):
|
||||
environ['wsgi.multiprocess'] = False
|
||||
return app(environ, start_response)
|
||||
evwsgi.wsgi_cb(('',app))
|
||||
evwsgi.run()
|
||||
|
||||
|
||||
@staticmethod
|
||||
def gevent(app,address, **options):
|
||||
from gevent import monkey; monkey.patch_all()
|
||||
from gevent import pywsgi
|
||||
from gevent.pool import Pool
|
||||
pywsgi.WSGIServer(address, app, spawn = 'workers' in options and Pool(int(options.workers)) or 'default').serve_forever()
|
||||
|
||||
@staticmethod
|
||||
def bjoern(app,address, **options):
|
||||
import bjoern
|
||||
bjoern.run(app, *address)
|
||||
|
||||
@staticmethod
|
||||
def tornado(app,address, **options):
|
||||
import tornado.wsgi
|
||||
import tornado.httpserver
|
||||
import tornado.ioloop
|
||||
container = tornado.wsgi.WSGIContainer(app)
|
||||
server = tornado.httpserver.HTTPServer(container)
|
||||
server.listen(address=address[0], port=address[1])
|
||||
tornado.ioloop.IOLoop.instance().start()
|
||||
|
||||
@staticmethod
|
||||
def twisted(app,address, **options):
|
||||
from twisted.web import server, wsgi
|
||||
from twisted.python.threadpool import ThreadPool
|
||||
from twisted.internet import reactor
|
||||
thread_pool = ThreadPool()
|
||||
thread_pool.start()
|
||||
reactor.addSystemEventTrigger('after', 'shutdown', thread_pool.stop)
|
||||
factory = server.Site(wsgi.WSGIResource(reactor, thread_pool, app))
|
||||
reactor.listenTCP(address[1], factory, interface=address[0])
|
||||
reactor.run()
|
||||
|
||||
@staticmethod
|
||||
def diesel(app,address, **options):
|
||||
from diesel.protocols.wsgi import WSGIApplication
|
||||
app = WSGIApplication(app, port=address[1])
|
||||
app.run()
|
||||
|
||||
@staticmethod
|
||||
def gnuicorn(app,address, **options):
|
||||
import gunicorn.arbiter
|
||||
gunicorn.arbiter.Arbiter(address, 4, app).run()
|
||||
|
||||
@staticmethod
|
||||
def eventlet(app,address, **options):
|
||||
from eventlet import wsgi, listen
|
||||
wsgi.server(listen(address), app)
|
||||
|
||||
@staticmethod
|
||||
def mongrel2(app,address,**options):
|
||||
import uuid
|
||||
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
|
||||
from mongrel2 import handler
|
||||
conn = handler.Connection(str(uuid.uuid4()),
|
||||
"tcp://127.0.0.1:9997",
|
||||
"tcp://127.0.0.1:9996")
|
||||
mongrel2_handler(app,conn,debug=False)
|
||||
|
||||
|
||||
def run(servername,ip,port,softcron=True,logging=False,profiler=None):
|
||||
if logging:
|
||||
application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
|
||||
logfilename='httpserver.log',
|
||||
profilerfilename=profiler)
|
||||
else:
|
||||
application = gluon.main.wsgibase
|
||||
if softcron:
|
||||
from gluon.settings import global_settings
|
||||
global_settings.web2py_crontype = 'soft'
|
||||
getattr(Servers,servername)(application,(ip,int(port)))
|
||||
|
||||
def mongrel2_handler(application,conn,debug=False):
|
||||
"""
|
||||
Based on :
|
||||
https://github.com/berry/Mongrel2-WSGI-Handler/blob/master/wsgi-handler.py
|
||||
|
||||
WSGI handler based on the Python wsgiref SimpleHandler.
|
||||
A WSGI application should return a iterable op StringTypes.
|
||||
Any encoding must be handled by the WSGI application itself.
|
||||
"""
|
||||
from wsgiref.handlers import SimpleHandler
|
||||
try:
|
||||
import cStringIO as StringIO
|
||||
except:
|
||||
import StringIO
|
||||
|
||||
# TODO - this wsgi handler executes the application and renders a page
|
||||
# in memory completely before returning it as a response to the client.
|
||||
# Thus, it does not "stream" the result back to the client. It should be
|
||||
# possible though. The SimpleHandler accepts file-like stream objects. So,
|
||||
# it should be just a matter of connecting 0MQ requests/response streams to
|
||||
# the SimpleHandler requests and response streams. However, the Python API
|
||||
# for Mongrel2 doesn't seem to support file-like stream objects for requests
|
||||
# and responses. Unless I have missed something.
|
||||
|
||||
while True:
|
||||
if debug: print "WAITING FOR REQUEST"
|
||||
|
||||
# receive a request
|
||||
req = conn.recv()
|
||||
if debug: print "REQUEST BODY: %r\n" % req.body
|
||||
|
||||
if req.is_disconnect():
|
||||
if debug: print "DISCONNECT"
|
||||
continue #effectively ignore the disconnect from the client
|
||||
|
||||
# Set a couple of environment attributes a.k.a. header attributes
|
||||
# that are a must according to PEP 333
|
||||
environ = req.headers
|
||||
environ['SERVER_PROTOCOL'] = 'HTTP/1.1' # SimpleHandler expects a server_protocol, lets assume it is HTTP 1.1
|
||||
environ['REQUEST_METHOD'] = environ['METHOD']
|
||||
if ':' in environ['Host']:
|
||||
environ['SERVER_NAME'] = environ['Host'].split(':')[0]
|
||||
environ['SERVER_PORT'] = environ['Host'].split(':')[1]
|
||||
else:
|
||||
environ['SERVER_NAME'] = environ['Host']
|
||||
environ['SERVER_PORT'] = ''
|
||||
environ['SCRIPT_NAME'] = '' # empty for now
|
||||
environ['PATH_INFO'] = urllib.unquote(environ['PATH'])
|
||||
if '?' in environ['URI']:
|
||||
environ['QUERY_STRING'] = environ['URI'].split('?')[1]
|
||||
else:
|
||||
environ['QUERY_STRING'] = ''
|
||||
if environ.has_key('Content-Length'):
|
||||
environ['CONTENT_LENGTH'] = environ['Content-Length'] # necessary for POST to work with Django
|
||||
environ['wsgi.input'] = req.body
|
||||
|
||||
if debug: print "ENVIRON: %r\n" % environ
|
||||
|
||||
# SimpleHandler needs file-like stream objects for
|
||||
# requests, errors and responses
|
||||
reqIO = StringIO.StringIO(req.body)
|
||||
errIO = StringIO.StringIO()
|
||||
respIO = StringIO.StringIO()
|
||||
|
||||
# execute the application
|
||||
handler = SimpleHandler(reqIO, respIO, errIO, environ, multithread = False, multiprocess = False)
|
||||
handler.run(application)
|
||||
|
||||
# Get the response and filter out the response (=data) itself,
|
||||
# the response headers,
|
||||
# the response status code and the response status description
|
||||
response = respIO.getvalue()
|
||||
response = response.split("\r\n")
|
||||
data = response[-1]
|
||||
headers = dict([r.split(": ") for r in response[1:-2]])
|
||||
code = response[0][9:12]
|
||||
status = response[0][13:]
|
||||
|
||||
# strip BOM's from response data
|
||||
# Especially the WSGI handler from Django seems to generate them (2 actually, huh?)
|
||||
# a BOM isn't really necessary and cause HTML parsing errors in Chrome and Safari
|
||||
# See also: http://www.xs4all.nl/~mechiel/projects/bomstrip/
|
||||
# Although I still find this a ugly hack, it does work.
|
||||
data = data.replace('\xef\xbb\xbf', '')
|
||||
|
||||
# Get the generated errors
|
||||
errors = errIO.getvalue()
|
||||
|
||||
# return the response
|
||||
if debug: print "RESPONSE: %r\n" % response
|
||||
if errors:
|
||||
if debug: print "ERRORS: %r" % errors
|
||||
data = "%s\r\n\r\n%s" % (data, errors)
|
||||
conn.reply_http(req, data, code = code, status = status, headers = headers)
|
||||
|
||||
def main():
|
||||
usage = "python anyserver.py -s tornado -i 127.0.0.1 -p 8000 -l -P"
|
||||
try:
|
||||
version = read_file('VERSION')
|
||||
except IOError:
|
||||
version = ''
|
||||
parser = optparse.OptionParser(usage, None, optparse.Option, version)
|
||||
parser.add_option('-l',
|
||||
'--logging',
|
||||
action='store_true',
|
||||
default=False,
|
||||
dest='logging',
|
||||
help='log into httpserver.log')
|
||||
parser.add_option('-P',
|
||||
'--profiler',
|
||||
default=False,
|
||||
dest='profiler',
|
||||
help='profiler filename')
|
||||
servers = ', '.join(x for x in dir(Servers) if not x[0]=='_')
|
||||
parser.add_option('-s',
|
||||
'--server',
|
||||
default='rocket',
|
||||
dest='server',
|
||||
help='server name (%s)' % servers)
|
||||
parser.add_option('-i',
|
||||
'--ip',
|
||||
default='127.0.0.1',
|
||||
dest='ip',
|
||||
help='ip address')
|
||||
parser.add_option('-p',
|
||||
'--port',
|
||||
default='8000',
|
||||
dest='port',
|
||||
help='port number')
|
||||
parser.add_option('-w',
|
||||
'--workers',
|
||||
default='',
|
||||
dest='workers',
|
||||
help='number of workers number')
|
||||
(options, args) = parser.parse_args()
|
||||
print 'starting %s on %s:%s...' % (options.server,options.ip,options.port)
|
||||
run(options.server,options.ip,options.port,logging=options.logging,profiler=options.profiler)
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
main()
|
||||
|
||||
86
app.example.yaml
Normal file
@@ -0,0 +1,86 @@
|
||||
# For Google App Engine deployment, copy this file to app.yaml
|
||||
# and edit as required
|
||||
# See http://code.google.com/appengine/docs/python/config/appconfig.html
|
||||
# and http://web2py.com/book/default/chapter/11?search=app.yaml
|
||||
|
||||
application: web2py
|
||||
version: 1
|
||||
api_version: 1
|
||||
|
||||
# use this line for Python 2.5
|
||||
#
|
||||
runtime: python
|
||||
|
||||
# use these lines for Python 2.7
|
||||
# upload app with: appcfg.py update web2py (where 'web2py' is web2py's root directory)
|
||||
#
|
||||
# runtime: python27
|
||||
# threadsafe: true # true for WSGI & concurrent requests (Python 2.7 only)
|
||||
|
||||
default_expiration: "24h" # for static files
|
||||
|
||||
handlers:
|
||||
|
||||
- url: /(?P<a>.+?)/static/(?P<b>.+)
|
||||
static_files: applications/\1/static/\2
|
||||
upload: applications/(.+?)/static/(.+)
|
||||
secure: optional
|
||||
|
||||
- url: /favicon.ico
|
||||
static_files: applications/welcome/static/favicon.ico
|
||||
upload: applications/welcome/static/favicon.ico
|
||||
|
||||
- url: /robots.txt
|
||||
static_files: applications/welcome/static/robots.txt
|
||||
upload: applications/welcome/static/robots.txt
|
||||
|
||||
- url: .*
|
||||
script: gaehandler.py # CGI
|
||||
# script: gaehandler.wsgiapp # WSGI (Python 2.7 only)
|
||||
secure: optional
|
||||
|
||||
admin_console:
|
||||
pages:
|
||||
- name: Appstats
|
||||
url: /_ah/stats
|
||||
|
||||
skip_files: |
|
||||
^(.*/)?(
|
||||
(app\.yaml)|
|
||||
(app\.yml)|
|
||||
(index\.yaml)|
|
||||
(index\.yml)|
|
||||
(#.*#)|
|
||||
(.*~)|
|
||||
(.*\.py[co])|
|
||||
(.*/RCS/.*)|
|
||||
(\..*)|
|
||||
(applications/(admin|examples)/.*)|
|
||||
((admin|examples|welcome)\.(w2p|tar))|
|
||||
(applications/.*?/(cron|databases|errors|cache|sessions)/.*)|
|
||||
((logs|scripts)/.*)|
|
||||
(anyserver\.py)|
|
||||
(web2py\.py)|
|
||||
((cgi|fcgi|modpython|wsgi)handler\.py)|
|
||||
(epydoc\.(conf|css))|
|
||||
(httpserver\.log)|
|
||||
(logging\.example\.conf)|
|
||||
(route[rs]\.example\.py)|
|
||||
(setup_(app|exe)\.py)|
|
||||
(splashlogo\.gif)|
|
||||
(parameters_\d+\.py)|
|
||||
(options_std.py)|
|
||||
(gluon/tests/.*)|
|
||||
(gluon/(rocket|winservice)\.py)|
|
||||
(contrib/(gateways|markdown|memcache|pymysql)/.*)|
|
||||
(contrib/(populate|taskbar_widget)\.py)|
|
||||
(google_appengine/.*)|
|
||||
(.*\.(bak|orig))|
|
||||
)$
|
||||
|
||||
builtins:
|
||||
- remote_api: on
|
||||
- datastore_admin: on
|
||||
- appstats: on
|
||||
- admin_redirect: on
|
||||
- deferred: on
|
||||
5
appengine_config.py
Normal file
@@ -0,0 +1,5 @@
|
||||
def webapp_add_wsgi_middleware(app):
|
||||
from google.appengine.ext.appstats import recording
|
||||
app = recording.appstats_wsgi_middleware(app)
|
||||
return app
|
||||
|
||||
6
applications/admin/ABOUT
Normal file
@@ -0,0 +1,6 @@
|
||||
web2py is an open source full-stack framework for agile development
|
||||
of secure database-driven web-based applications, written and programmable in
|
||||
Python.
|
||||
|
||||
Created by Massimo Di Pierro <mdipierro@cs.depaul.edu>
|
||||
|
||||
137
applications/admin/LICENSE
Normal file
@@ -0,0 +1,137 @@
|
||||
## Web2py License
|
||||
|
||||
Web2py is Licensed under the LGPL license version 3
|
||||
(http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
Copyrighted (c) by Massimo Di Pierro (2007-2011)
|
||||
|
||||
### On Commercial Redistribution
|
||||
|
||||
In accordance with LGPL you may:
|
||||
- redistribute web2py with your apps (including official web2py binary versions)
|
||||
- release your applications which use official web2py libraries under any license you wish
|
||||
But you must:
|
||||
- make clear in the documentation that your application uses web2py
|
||||
- release any modification of the web2py libraries under the LGPLv3 license
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
||||
NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT
|
||||
HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE,
|
||||
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
|
||||
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
|
||||
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
(Earlier versions of web2py, 1.0.*-1.90.*, were released under the GPL2 license plus a
|
||||
commercial exception which, for practical purposes, was very similar to the current LPGLv3)
|
||||
|
||||
### Licenses for third party contributed software
|
||||
|
||||
web2py contains third party software under the gluon/contrib/ folder.
|
||||
Each file/module in contrib is distributed with web2py under its original license.
|
||||
Here we list some of them.
|
||||
|
||||
#### gluon.contrib.simplejson LICENSE
|
||||
|
||||
Copyright (c) 2006 Bob Ippolito - Permission is hereby granted, free of charge,
|
||||
to any person obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
#### gluon.contrib.rss2.py (originally PyRSS2Gen) LICENSE
|
||||
|
||||
This is copyright (c) by Dalke Scientific Software, LLC and released under the
|
||||
BSD license. See the file LICENSE in the distribution or
|
||||
<http://www.opensource.org/licenses/bsd-license.php> for details.
|
||||
|
||||
#### gluon.contrib.markdown (markdown2) LICENSE
|
||||
|
||||
MIT License from from <http://code.google.com/p/python-markdown2/>
|
||||
|
||||
#### gluon.contrib.feedparser LICENSE
|
||||
|
||||
Copyright (c) 2002-2005, Mark Pilgrim
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#### gluon.wsgiserver.py LICENSE (borrowed from cherrypy)
|
||||
|
||||
Copyright (c) 2004, CherryPy Team (team@cherrypy.org)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the CherryPy Team nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#### gluon.contrib.pam LICENSE
|
||||
|
||||
Copyright (C) 2007-2009 Chris AtLee <chris@atlee.ca> Licensed under the MIT license
|
||||
|
||||
#### gluon.contrib.shell LICENSE
|
||||
|
||||
Copyright (C) by Google inc. Apache 2.0 Lincense
|
||||
|
||||
#### The javascript licenses are in the code itself
|
||||
|
||||
0
applications/admin/__init__.py
Normal file
430
applications/admin/controllers/appadmin.py
Normal file
@@ -0,0 +1,430 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# ##########################################################
|
||||
# ## make sure administrator is on localhost
|
||||
# ###########################################################
|
||||
|
||||
import os
|
||||
import socket
|
||||
import datetime
|
||||
import copy
|
||||
import gluon.contenttype
|
||||
import gluon.fileutils
|
||||
|
||||
# ## critical --- make a copy of the environment
|
||||
|
||||
global_env = copy.copy(globals())
|
||||
global_env['datetime'] = datetime
|
||||
|
||||
http_host = request.env.http_host.split(':')[0]
|
||||
remote_addr = request.env.remote_addr
|
||||
try:
|
||||
hosts = (http_host, socket.gethostname(),
|
||||
socket.gethostbyname(http_host),
|
||||
'::1','127.0.0.1','::ffff:127.0.0.1')
|
||||
except:
|
||||
hosts = (http_host, )
|
||||
|
||||
if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
|
||||
in ['https', 'HTTPS']:
|
||||
session.secure()
|
||||
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
|
||||
raise HTTP(200, T('appadmin is disabled because insecure channel'))
|
||||
|
||||
if (request.application=='admin' and not session.authorized) or \
|
||||
(request.application!='admin' and not gluon.fileutils.check_credentials(request)):
|
||||
redirect(URL('admin', 'default', 'index',
|
||||
vars=dict(send=URL(args=request.args,vars=request.vars))))
|
||||
|
||||
ignore_rw = True
|
||||
response.view = 'appadmin.html'
|
||||
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
|
||||
args=[request.application])], [T('db'), False,
|
||||
URL('index')], [T('state'), False,
|
||||
URL('state')], [T('cache'), False,
|
||||
URL('ccache')]]
|
||||
|
||||
# ##########################################################
|
||||
# ## auxiliary functions
|
||||
# ###########################################################
|
||||
|
||||
|
||||
def get_databases(request):
|
||||
dbs = {}
|
||||
for (key, value) in global_env.items():
|
||||
cond = False
|
||||
try:
|
||||
cond = isinstance(value, GQLDB)
|
||||
except:
|
||||
cond = isinstance(value, SQLDB)
|
||||
if cond:
|
||||
dbs[key] = value
|
||||
return dbs
|
||||
|
||||
|
||||
databases = get_databases(None)
|
||||
|
||||
|
||||
def eval_in_global_env(text):
|
||||
exec ('_ret=%s' % text, {}, global_env)
|
||||
return global_env['_ret']
|
||||
|
||||
|
||||
def get_database(request):
|
||||
if request.args and request.args[0] in databases:
|
||||
return eval_in_global_env(request.args[0])
|
||||
else:
|
||||
session.flash = T('invalid request')
|
||||
redirect(URL('index'))
|
||||
|
||||
|
||||
def get_table(request):
|
||||
db = get_database(request)
|
||||
if len(request.args) > 1 and request.args[1] in db.tables:
|
||||
return (db, request.args[1])
|
||||
else:
|
||||
session.flash = T('invalid request')
|
||||
redirect(URL('index'))
|
||||
|
||||
|
||||
def get_query(request):
|
||||
try:
|
||||
return eval_in_global_env(request.vars.query)
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
def query_by_table_type(tablename,db,request=request):
|
||||
keyed = hasattr(db[tablename],'_primarykey')
|
||||
if keyed:
|
||||
firstkey = db[tablename][db[tablename]._primarykey[0]]
|
||||
cond = '>0'
|
||||
if firstkey.type in ['string', 'text']:
|
||||
cond = '!=""'
|
||||
qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
|
||||
else:
|
||||
qry = '%s.%s.id>0' % tuple(request.args[:2])
|
||||
return qry
|
||||
|
||||
|
||||
|
||||
# ##########################################################
|
||||
# ## list all databases and tables
|
||||
# ###########################################################
|
||||
|
||||
|
||||
def index():
|
||||
return dict(databases=databases)
|
||||
|
||||
|
||||
# ##########################################################
|
||||
# ## insert a new record
|
||||
# ###########################################################
|
||||
|
||||
|
||||
def insert():
|
||||
(db, table) = get_table(request)
|
||||
form = SQLFORM(db[table], ignore_rw=ignore_rw)
|
||||
if form.accepts(request.vars, session):
|
||||
response.flash = T('new record inserted')
|
||||
return dict(form=form,table=db[table])
|
||||
|
||||
|
||||
# ##########################################################
|
||||
# ## list all records in table and insert new record
|
||||
# ###########################################################
|
||||
|
||||
|
||||
def download():
|
||||
import os
|
||||
db = get_database(request)
|
||||
return response.download(request,db)
|
||||
|
||||
def csv():
|
||||
import gluon.contenttype
|
||||
response.headers['Content-Type'] = \
|
||||
gluon.contenttype.contenttype('.csv')
|
||||
db = get_database(request)
|
||||
query = get_query(request)
|
||||
if not query:
|
||||
return None
|
||||
response.headers['Content-disposition'] = 'attachment; filename=%s_%s.csv'\
|
||||
% tuple(request.vars.query.split('.')[:2])
|
||||
return str(db(query).select())
|
||||
|
||||
|
||||
def import_csv(table, file):
|
||||
table.import_from_csv_file(file)
|
||||
|
||||
def select():
|
||||
import re
|
||||
db = get_database(request)
|
||||
dbname = request.args[0]
|
||||
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
|
||||
if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
|
||||
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
|
||||
if request.vars.query:
|
||||
match = regex.match(request.vars.query)
|
||||
if match:
|
||||
request.vars.query = '%s.%s.%s==%s' % (request.args[0],
|
||||
match.group('table'), match.group('field'),
|
||||
match.group('value'))
|
||||
else:
|
||||
request.vars.query = session.last_query
|
||||
query = get_query(request)
|
||||
if request.vars.start:
|
||||
start = int(request.vars.start)
|
||||
else:
|
||||
start = 0
|
||||
nrows = 0
|
||||
stop = start + 100
|
||||
table = None
|
||||
rows = []
|
||||
orderby = request.vars.orderby
|
||||
if orderby:
|
||||
orderby = dbname + '.' + orderby
|
||||
if orderby == session.last_orderby:
|
||||
if orderby[0] == '~':
|
||||
orderby = orderby[1:]
|
||||
else:
|
||||
orderby = '~' + orderby
|
||||
session.last_orderby = orderby
|
||||
session.last_query = request.vars.query
|
||||
form = FORM(TABLE(TR(T('Query:'), '', INPUT(_style='width:400px',
|
||||
_name='query', _value=request.vars.query or '',
|
||||
requires=IS_NOT_EMPTY(error_message=T("Cannot be empty")))), TR(T('Update:'),
|
||||
INPUT(_name='update_check', _type='checkbox',
|
||||
value=False), INPUT(_style='width:400px',
|
||||
_name='update_fields', _value=request.vars.update_fields
|
||||
or '')), TR(T('Delete:'), INPUT(_name='delete_check',
|
||||
_class='delete', _type='checkbox', value=False), ''),
|
||||
TR('', '', INPUT(_type='submit', _value='submit'))),
|
||||
_action=URL(r=request,args=request.args))
|
||||
if request.vars.csvfile != None:
|
||||
try:
|
||||
import_csv(db[request.vars.table],
|
||||
request.vars.csvfile.file)
|
||||
response.flash = T('data uploaded')
|
||||
except Exception, e:
|
||||
response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
|
||||
if form.accepts(request.vars, formname=None):
|
||||
# regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
|
||||
regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')
|
||||
|
||||
match = regex.match(form.vars.query.strip())
|
||||
if match:
|
||||
table = match.group('table')
|
||||
try:
|
||||
nrows = db(query).count()
|
||||
if form.vars.update_check and form.vars.update_fields:
|
||||
db(query).update(**eval_in_global_env('dict(%s)'
|
||||
% form.vars.update_fields))
|
||||
response.flash = T('%s rows updated', nrows)
|
||||
elif form.vars.delete_check:
|
||||
db(query).delete()
|
||||
response.flash = T('%s rows deleted', nrows)
|
||||
nrows = db(query).count()
|
||||
if orderby:
|
||||
rows = db(query).select(limitby=(start, stop),
|
||||
orderby=eval_in_global_env(orderby))
|
||||
else:
|
||||
rows = db(query).select(limitby=(start, stop))
|
||||
except Exception, e:
|
||||
(rows, nrows) = ([], 0)
|
||||
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
||||
return dict(
|
||||
form=form,
|
||||
table=table,
|
||||
start=start,
|
||||
stop=stop,
|
||||
nrows=nrows,
|
||||
rows=rows,
|
||||
query=request.vars.query,
|
||||
)
|
||||
|
||||
|
||||
# ##########################################################
|
||||
# ## edit delete one record
|
||||
# ###########################################################
|
||||
|
||||
|
||||
def update():
|
||||
(db, table) = get_table(request)
|
||||
keyed = hasattr(db[table],'_primarykey')
|
||||
record = None
|
||||
if keyed:
|
||||
key = [f for f in request.vars if f in db[table]._primarykey]
|
||||
if key:
|
||||
record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
|
||||
else:
|
||||
record = db(db[table].id == request.args(2)).select().first()
|
||||
|
||||
if not record:
|
||||
qry = query_by_table_type(table, db)
|
||||
session.flash = T('record does not exist')
|
||||
redirect(URL('select', args=request.args[:1],
|
||||
vars=dict(query=qry)))
|
||||
|
||||
if keyed:
|
||||
for k in db[table]._primarykey:
|
||||
db[table][k].writable=False
|
||||
|
||||
form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
|
||||
ignore_rw=ignore_rw and not keyed,
|
||||
linkto=URL('select',
|
||||
args=request.args[:1]), upload=URL(r=request,
|
||||
f='download', args=request.args[:1]))
|
||||
|
||||
if form.accepts(request.vars, session):
|
||||
session.flash = T('done!')
|
||||
qry = query_by_table_type(table, db)
|
||||
redirect(URL('select', args=request.args[:1],
|
||||
vars=dict(query=qry)))
|
||||
return dict(form=form,table=db[table])
|
||||
|
||||
|
||||
# ##########################################################
|
||||
# ## get global variables
|
||||
# ###########################################################
|
||||
|
||||
|
||||
def state():
|
||||
return dict()
|
||||
|
||||
def ccache():
|
||||
form = FORM(
|
||||
P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
|
||||
P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
|
||||
P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
|
||||
)
|
||||
|
||||
if form.accepts(request.vars, session):
|
||||
clear_ram = False
|
||||
clear_disk = False
|
||||
session.flash = ""
|
||||
if request.vars.yes:
|
||||
clear_ram = clear_disk = True
|
||||
if request.vars.ram:
|
||||
clear_ram = True
|
||||
if request.vars.disk:
|
||||
clear_disk = True
|
||||
|
||||
if clear_ram:
|
||||
cache.ram.clear()
|
||||
session.flash += "Ram Cleared "
|
||||
if clear_disk:
|
||||
cache.disk.clear()
|
||||
session.flash += "Disk Cleared"
|
||||
|
||||
redirect(URL(r=request))
|
||||
|
||||
try:
|
||||
from guppy import hpy; hp=hpy()
|
||||
except ImportError:
|
||||
hp = False
|
||||
|
||||
import shelve, os, copy, time, math
|
||||
from gluon import portalocker
|
||||
|
||||
ram = {
|
||||
'entries': 0,
|
||||
'bytes': 0,
|
||||
'objects': 0,
|
||||
'hits': 0,
|
||||
'misses': 0,
|
||||
'ratio': 0,
|
||||
'oldest': time.time(),
|
||||
'keys': []
|
||||
}
|
||||
disk = copy.copy(ram)
|
||||
total = copy.copy(ram)
|
||||
disk['keys'] = []
|
||||
total['keys'] = []
|
||||
|
||||
def GetInHMS(seconds):
|
||||
hours = math.floor(seconds / 3600)
|
||||
seconds -= hours * 3600
|
||||
minutes = math.floor(seconds / 60)
|
||||
seconds -= minutes * 60
|
||||
seconds = math.floor(seconds)
|
||||
|
||||
return (hours, minutes, seconds)
|
||||
|
||||
for key, value in cache.ram.storage.items():
|
||||
if isinstance(value, dict):
|
||||
ram['hits'] = value['hit_total'] - value['misses']
|
||||
ram['misses'] = value['misses']
|
||||
try:
|
||||
ram['ratio'] = ram['hits'] * 100 / value['hit_total']
|
||||
except (KeyError, ZeroDivisionError):
|
||||
ram['ratio'] = 0
|
||||
else:
|
||||
if hp:
|
||||
ram['bytes'] += hp.iso(value[1]).size
|
||||
ram['objects'] += hp.iso(value[1]).count
|
||||
ram['entries'] += 1
|
||||
if value[0] < ram['oldest']:
|
||||
ram['oldest'] = value[0]
|
||||
ram['keys'].append((key, GetInHMS(time.time() - value[0])))
|
||||
|
||||
locker = open(os.path.join(request.folder,
|
||||
'cache/cache.lock'), 'a')
|
||||
portalocker.lock(locker, portalocker.LOCK_EX)
|
||||
disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
|
||||
try:
|
||||
for key, value in disk_storage.items():
|
||||
if isinstance(value, dict):
|
||||
disk['hits'] = value['hit_total'] - value['misses']
|
||||
disk['misses'] = value['misses']
|
||||
try:
|
||||
disk['ratio'] = disk['hits'] * 100 / value['hit_total']
|
||||
except (KeyError, ZeroDivisionError):
|
||||
disk['ratio'] = 0
|
||||
else:
|
||||
if hp:
|
||||
disk['bytes'] += hp.iso(value[1]).size
|
||||
disk['objects'] += hp.iso(value[1]).count
|
||||
disk['entries'] += 1
|
||||
if value[0] < disk['oldest']:
|
||||
disk['oldest'] = value[0]
|
||||
disk['keys'].append((key, GetInHMS(time.time() - value[0])))
|
||||
|
||||
finally:
|
||||
portalocker.unlock(locker)
|
||||
locker.close()
|
||||
disk_storage.close()
|
||||
|
||||
total['entries'] = ram['entries'] + disk['entries']
|
||||
total['bytes'] = ram['bytes'] + disk['bytes']
|
||||
total['objects'] = ram['objects'] + disk['objects']
|
||||
total['hits'] = ram['hits'] + disk['hits']
|
||||
total['misses'] = ram['misses'] + disk['misses']
|
||||
total['keys'] = ram['keys'] + disk['keys']
|
||||
try:
|
||||
total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
|
||||
except (KeyError, ZeroDivisionError):
|
||||
total['ratio'] = 0
|
||||
|
||||
if disk['oldest'] < ram['oldest']:
|
||||
total['oldest'] = disk['oldest']
|
||||
else:
|
||||
total['oldest'] = ram['oldest']
|
||||
|
||||
ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
|
||||
disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
|
||||
total['oldest'] = GetInHMS(time.time() - total['oldest'])
|
||||
|
||||
def key_table(keys):
|
||||
return TABLE(
|
||||
TR(TD(B('Key')), TD(B('Time in Cache (h:m:s)'))),
|
||||
*[TR(TD(k[0]), TD('%02d:%02d:%02d' % k[1])) for k in keys],
|
||||
**dict(_class='cache-keys',
|
||||
_style="border-collapse: separate; border-spacing: .5em;"))
|
||||
|
||||
ram['keys'] = key_table(ram['keys'])
|
||||
disk['keys'] = key_table(disk['keys'])
|
||||
total['keys'] = key_table(total['keys'])
|
||||
|
||||
return dict(form=form, total=total,
|
||||
ram=ram, disk=disk, object_stats=hp != False)
|
||||
|
||||
33
applications/admin/controllers/debug.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import sys
|
||||
import cStringIO
|
||||
import gluon.contrib.shell
|
||||
import code, thread
|
||||
from gluon.debug import communicate
|
||||
|
||||
|
||||
if DEMO_MODE or MULTI_USER_MODE:
|
||||
session.flash = T('disabled in demo mode')
|
||||
redirect(URL('default','site'))
|
||||
|
||||
FE=10**9
|
||||
|
||||
def index():
|
||||
app = request.args(0) or 'admin'
|
||||
reset()
|
||||
# read buffer
|
||||
data = communicate()
|
||||
return dict(app=app,data=data)
|
||||
|
||||
def callback():
|
||||
app = request.args[0]
|
||||
command = request.vars.statement
|
||||
session['debug_commands:'+app].append(command)
|
||||
output = communicate(command)
|
||||
k = len(session['debug_commands:'+app]) - 1
|
||||
return '[%i] %s%s\n' % (k + 1, command, output)
|
||||
|
||||
def reset():
|
||||
app = request.args(0) or 'admin'
|
||||
session['debug_commands:'+app] = []
|
||||
return 'done'
|
||||
|
||||
1329
applications/admin/controllers/default.py
Normal file
87
applications/admin/controllers/gae.py
Normal file
@@ -0,0 +1,87 @@
|
||||
### this works on linux only
|
||||
|
||||
import re
|
||||
try:
|
||||
import fcntl
|
||||
import subprocess
|
||||
import signal
|
||||
import os
|
||||
import shutil
|
||||
from gluon.fileutils import read_file, write_file
|
||||
except:
|
||||
session.flash='sorry, only on Unix systems'
|
||||
redirect(URL(request.application,'default','site'))
|
||||
|
||||
forever=10**8
|
||||
|
||||
def kill():
|
||||
p = cache.ram('gae_upload',lambda:None,forever)
|
||||
if not p or p.poll()!=None:
|
||||
return 'oops'
|
||||
os.kill(p.pid, signal.SIGKILL)
|
||||
cache.ram('gae_upload',lambda:None,-1)
|
||||
|
||||
class EXISTS(object):
|
||||
def __init__(self, error_message='file not found'):
|
||||
self.error_message = error_message
|
||||
def __call__(self, value):
|
||||
if os.path.exists(value):
|
||||
return (value,None)
|
||||
return (value,self.error_message)
|
||||
|
||||
def deploy():
|
||||
regex = re.compile('^\w+$')
|
||||
apps = sorted(file for file in os.listdir(apath(r=request)) if regex.match(file))
|
||||
form = SQLFORM.factory(
|
||||
Field('appcfg',default=GAE_APPCFG,label='Path to appcfg.py',
|
||||
requires=EXISTS(error_message=T('file not found'))),
|
||||
Field('google_application_id',requires=IS_ALPHANUMERIC()),
|
||||
Field('applications','list:string',
|
||||
requires=IS_IN_SET(apps,multiple=True),
|
||||
label=T('web2py apps to deploy')),
|
||||
Field('email',requires=IS_EMAIL(),label=T('GAE Email')),
|
||||
Field('password','password',requires=IS_NOT_EMPTY(),label=T('GAE Password')))
|
||||
cmd = output = errors= ""
|
||||
if form.accepts(request,session):
|
||||
try:
|
||||
kill()
|
||||
except:
|
||||
pass
|
||||
ignore_apps = [item for item in apps \
|
||||
if not item in form.vars.applications]
|
||||
regex = re.compile('\(applications/\(.*')
|
||||
yaml = apath('../app.yaml', r=request)
|
||||
if not os.path.exists(yaml):
|
||||
example = apath('../app.example.yaml', r=request)
|
||||
shutil.copyfile(example,yaml)
|
||||
data = read_file(yaml)
|
||||
data = re.sub('application:.*','application: %s' % form.vars.google_application_id,data)
|
||||
data = regex.sub('(applications/(%s)/.*)|' % '|'.join(ignore_apps),data)
|
||||
write_file(yaml, data)
|
||||
|
||||
path = request.env.applications_parent
|
||||
cmd = '%s --email=%s --passin update %s' % \
|
||||
(form.vars.appcfg, form.vars.email, path)
|
||||
p = cache.ram('gae_upload',
|
||||
lambda s=subprocess,c=cmd:s.Popen(c, shell=True,
|
||||
stdin=s.PIPE,
|
||||
stdout=s.PIPE,
|
||||
stderr=s.PIPE, close_fds=True),-1)
|
||||
p.stdin.write(form.vars.password+'\n')
|
||||
fcntl.fcntl(p.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
|
||||
fcntl.fcntl(p.stderr.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
|
||||
return dict(form=form,command=cmd)
|
||||
|
||||
def callback():
|
||||
p = cache.ram('gae_upload',lambda:None,forever)
|
||||
if not p or p.poll()!=None:
|
||||
return '<done/>'
|
||||
try:
|
||||
output = p.stdout.read()
|
||||
except:
|
||||
output=''
|
||||
try:
|
||||
errors = p.stderr.read()
|
||||
except:
|
||||
errors=''
|
||||
return (output+errors).replace('\n','<br/>')
|
||||
82
applications/admin/controllers/mercurial.py
Normal file
@@ -0,0 +1,82 @@
|
||||
from gluon.fileutils import read_file, write_file
|
||||
|
||||
if DEMO_MODE or MULTI_USER_MODE:
|
||||
session.flash = T('disabled in demo mode')
|
||||
redirect(URL('default','site'))
|
||||
if not have_mercurial:
|
||||
session.flash=T("Sorry, could not find mercurial installed")
|
||||
redirect(URL('default','design',args=request.args(0)))
|
||||
|
||||
_hgignore_content = """\
|
||||
syntax: glob
|
||||
*~
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.bak
|
||||
*.bak2
|
||||
cache/*
|
||||
private/*
|
||||
uploads/*
|
||||
databases/*
|
||||
sessions/*
|
||||
errors/*
|
||||
"""
|
||||
|
||||
def hg_repo(path):
|
||||
import os
|
||||
uio = ui.ui()
|
||||
uio.quiet = True
|
||||
if not os.environ.get('HGUSER') and not uio.config("ui", "username"):
|
||||
os.environ['HGUSER'] = 'web2py@localhost'
|
||||
try:
|
||||
repo = hg.repository(ui=uio, path=path)
|
||||
except:
|
||||
repo = hg.repository(ui=uio, path=path, create=True)
|
||||
hgignore = os.path.join(path, '.hgignore')
|
||||
if not os.path.exists(hgignore):
|
||||
write_file(hgignore, _hgignore_content)
|
||||
return repo
|
||||
|
||||
def commit():
|
||||
app = request.args(0)
|
||||
path = apath(app, r=request)
|
||||
repo = hg_repo(path)
|
||||
form = FORM('Comment:',INPUT(_name='comment',requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type='submit',_value='Commit'))
|
||||
if form.accepts(request.vars,session):
|
||||
oldid = repo[repo.lookup('.')]
|
||||
cmdutil.addremove(repo)
|
||||
repo.commit(text=form.vars.comment)
|
||||
if repo[repo.lookup('.')] == oldid:
|
||||
response.flash = 'no changes'
|
||||
try:
|
||||
files = TABLE(*[TR(file) for file in repo[repo.lookup('.')].files()])
|
||||
changes = TABLE(TR(TH('revision'),TH('description')))
|
||||
for change in repo.changelog:
|
||||
ctx=repo.changectx(change)
|
||||
revision, description = ctx.rev(), ctx.description()
|
||||
changes.append(TR(A(revision,_href=URL('revision',
|
||||
args=(app,revision))),
|
||||
description))
|
||||
except:
|
||||
files = []
|
||||
changes = []
|
||||
return dict(form=form,files=files,changes=changes,repo=repo)
|
||||
|
||||
def revision():
|
||||
app = request.args(0)
|
||||
path = apath(app, r=request)
|
||||
repo = hg_repo(path)
|
||||
revision = request.args(1)
|
||||
ctx=repo.changectx(revision)
|
||||
form=FORM(INPUT(_type='submit',_value='revert'))
|
||||
if form.accepts(request.vars):
|
||||
hg.update(repo, revision)
|
||||
session.flash = "reverted to revision %s" % ctx.rev()
|
||||
redirect(URL('default','design',args=app))
|
||||
return dict(
|
||||
files=ctx.files(),
|
||||
rev=str(ctx.rev()),
|
||||
desc=ctx.description(),
|
||||
form=form
|
||||
)
|
||||
45
applications/admin/controllers/shell.py
Normal file
@@ -0,0 +1,45 @@
|
||||
import sys
|
||||
import cStringIO
|
||||
import gluon.contrib.shell
|
||||
import code, thread
|
||||
from gluon.shell import env
|
||||
|
||||
if DEMO_MODE or MULTI_USER_MODE:
|
||||
session.flash = T('disabled in demo mode')
|
||||
redirect(URL('default','site'))
|
||||
|
||||
FE=10**9
|
||||
|
||||
def index():
|
||||
app = request.args(0) or 'admin'
|
||||
reset()
|
||||
return dict(app=app)
|
||||
|
||||
def callback():
|
||||
app = request.args[0]
|
||||
command = request.vars.statement
|
||||
escape = command[:1]!='!'
|
||||
history = session['history:'+app] = session.get('history:'+app,gluon.contrib.shell.History())
|
||||
if not escape:
|
||||
command = command[1:]
|
||||
if command == '%reset':
|
||||
reset()
|
||||
return '*** reset ***'
|
||||
elif command[0] == '%':
|
||||
try:
|
||||
command=session['commands:'+app][int(command[1:])]
|
||||
except ValueError:
|
||||
return ''
|
||||
session['commands:'+app].append(command)
|
||||
environ=env(app,True)
|
||||
output = gluon.contrib.shell.run(history,command,environ)
|
||||
k = len(session['commands:'+app]) - 1
|
||||
#output = PRE(output)
|
||||
#return TABLE(TR('In[%i]:'%k,PRE(command)),TR('Out[%i]:'%k,output))
|
||||
return 'In [%i] : %s%s\n' % (k + 1, command, output)
|
||||
|
||||
def reset():
|
||||
app = request.args(0) or 'admin'
|
||||
session['commands:'+app] = []
|
||||
session['history:'+app] = gluon.contrib.shell.History()
|
||||
return 'done'
|
||||
29
applications/admin/controllers/toolbar.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
from gluon.settings import global_settings, read_file
|
||||
#
|
||||
|
||||
def index():
|
||||
app = request.args(0)
|
||||
return dict(app=app)
|
||||
|
||||
def profiler():
|
||||
"""
|
||||
to use the profiler start web2py with -F profiler.log
|
||||
"""
|
||||
KEY = 'web2py_profiler_size'
|
||||
filename = global_settings.cmd_options.profiler_filename
|
||||
data = 'profiler disabled'
|
||||
if filename:
|
||||
if KEY in request.cookies:
|
||||
size = int(request.cookies[KEY].value)
|
||||
else:
|
||||
size = 0
|
||||
if os.path.exists(filename):
|
||||
data = read_file('profiler.log','rb')
|
||||
if size<len(data):
|
||||
data = data[size:]
|
||||
else:
|
||||
size=0
|
||||
size += len(data)
|
||||
response.cookies[KEY] = size
|
||||
return data
|
||||
551
applications/admin/controllers/wizard.py
Normal file
@@ -0,0 +1,551 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os, uuid, re, pickle, urllib, glob
|
||||
from gluon.admin import app_create, plugin_install
|
||||
from gluon.fileutils import abspath, read_file, write_file
|
||||
|
||||
def reset(session):
|
||||
session.app={
|
||||
'name':'',
|
||||
'params':[('title','My New App'),
|
||||
('subtitle','powered by web2py'),
|
||||
('author','you'),
|
||||
('author_email','you@example.com'),
|
||||
('keywords',''),
|
||||
('description',''),
|
||||
('layout_theme','Default'),
|
||||
('database_uri','sqlite://storage.sqlite'),
|
||||
('security_key',str(uuid.uuid4())),
|
||||
('email_server','localhost'),
|
||||
('email_sender','you@example.com'),
|
||||
('email_login',''),
|
||||
('login_method','local'),
|
||||
('login_config',''),
|
||||
('plugins',[])],
|
||||
'tables':['auth_user'],
|
||||
'table_auth_user':['username','first_name',
|
||||
'last_name','email','password'],
|
||||
'pages':['index','error'],
|
||||
'page_index':'# Welcome to my new app',
|
||||
'page_error':'# Error: the document does not exist',
|
||||
}
|
||||
|
||||
if not session.app: reset(session)
|
||||
|
||||
def listify(x):
|
||||
if not isinstance(x,(list,tuple)):
|
||||
return x and [x] or []
|
||||
return x
|
||||
|
||||
def clean(name):
|
||||
return re.sub('\W+','_',name.strip().lower())
|
||||
|
||||
def index():
|
||||
response.view='wizard/step.html'
|
||||
reset(session)
|
||||
apps=os.listdir(os.path.join(request.folder,'..'))
|
||||
form=SQLFORM.factory(Field('name',requires=[IS_NOT_EMPTY(),
|
||||
IS_ALPHANUMERIC()]))
|
||||
if form.accepts(request.vars):
|
||||
app = form.vars.name
|
||||
session.app['name'] = app
|
||||
if MULTI_USER_MODE and db(db.app.name==app)\
|
||||
(db.app.owner!=auth.user.id).count():
|
||||
session.flash = 'App belongs already to other user'
|
||||
elif app in apps:
|
||||
meta = os.path.normpath(\
|
||||
os.path.join(os.path.normpath(request.folder),
|
||||
'..',app,'wizard.metadata'))
|
||||
if os.path.exists(meta):
|
||||
try:
|
||||
metafile = open(meta,'rb')
|
||||
try:
|
||||
session.app = pickle.load(metafile)
|
||||
finally:
|
||||
metafile.close()
|
||||
session.flash = T("The app exists, was created by wizard, continue to overwrite!")
|
||||
except:
|
||||
session.flash = T("The app exists, was NOT created by wizard, continue to overwrite!")
|
||||
redirect(URL('step1'))
|
||||
return dict(step='Start',form=form)
|
||||
|
||||
|
||||
def step1():
|
||||
from gluon.contrib.simplejson import loads
|
||||
import urllib
|
||||
if not session.themes:
|
||||
url=LAYOUTS_APP+'/default/layouts.json'
|
||||
try:
|
||||
data = urllib.urlopen(url).read()
|
||||
session.themes = ['Default'] + loads(data)['layouts']
|
||||
except:
|
||||
session.themes = ['Default']
|
||||
themes = session.themes
|
||||
if not session.plugins:
|
||||
url = PLUGINS_APP+'/default/plugins.json'
|
||||
try:
|
||||
data = urllib.urlopen(url).read()
|
||||
session.plugins = loads(data)['plugins']
|
||||
except:
|
||||
session.plugins = []
|
||||
plugins = [x.split('.')[2] for x in session.plugins]
|
||||
response.view='wizard/step.html'
|
||||
params = dict(session.app['params'])
|
||||
form=SQLFORM.factory(
|
||||
Field('title',default=params.get('title',None),
|
||||
requires=IS_NOT_EMPTY()),
|
||||
Field('subtitle',default=params.get('subtitle',None)),
|
||||
Field('author',default=params.get('author',None)),
|
||||
Field('author_email',default=params.get('author_email',None)),
|
||||
Field('keywords',default=params.get('keywords',None)),
|
||||
Field('description','text',
|
||||
default=params.get('description',None)),
|
||||
Field('layout_theme',requires=IS_IN_SET(themes),
|
||||
default=params.get('layout_theme',themes[0])),
|
||||
Field('database_uri',default=params.get('database_uri',None)),
|
||||
Field('security_key',default=params.get('security_key',None)),
|
||||
Field('email_server',default=params.get('email_server',None)),
|
||||
Field('email_sender',default=params.get('email_sender',None)),
|
||||
Field('email_login',default=params.get('email_login',None)),
|
||||
Field('login_method',requires=IS_IN_SET(('local','janrain')),
|
||||
default=params.get('login_method','local')),
|
||||
Field('login_config',default=params.get('login_config',None)),
|
||||
Field('plugins','list:string',requires=IS_IN_SET(plugins,multiple=True)))
|
||||
|
||||
if form.accepts(request.vars):
|
||||
session.app['params']=[(key,form.vars.get(key,None))
|
||||
for key,value in session.app['params']]
|
||||
redirect(URL('step2'))
|
||||
return dict(step='1: Setting Parameters',form=form)
|
||||
|
||||
def step2():
|
||||
response.view='wizard/step.html'
|
||||
form=SQLFORM.factory(Field('table_names','list:string',
|
||||
default=session.app['tables']))
|
||||
if form.accepts(request.vars):
|
||||
table_names = [clean(t) for t in listify(form.vars.table_names) \
|
||||
if t.strip()]
|
||||
if [t for t in table_names if t.startswith('auth_') and \
|
||||
not t=='auth_user']:
|
||||
form.error.table_names = \
|
||||
T('invalid table names (auth_* tables already defined)')
|
||||
else:
|
||||
session.app['tables']=table_names
|
||||
for table in session.app['tables']:
|
||||
if not 'table_'+table in session.app:
|
||||
session.app['table_'+table]=['name']
|
||||
if not table=='auth_user':
|
||||
name = table+'_manage'
|
||||
if not name in session.app['pages']:
|
||||
session.app['pages'].append(name)
|
||||
session.app['page_'+name] = \
|
||||
'## Manage %s\n{{=form}}' % (table)
|
||||
if session.app['tables']:
|
||||
redirect(URL('step3',args=0))
|
||||
else:
|
||||
redirect(URL('step4'))
|
||||
return dict(step='2: Tables',form=form)
|
||||
|
||||
def step3():
|
||||
response.view='wizard/step.html'
|
||||
n=int(request.args(0) or 0)
|
||||
m=len(session.app['tables'])
|
||||
if n>=m: redirect(URL('step2'))
|
||||
table=session.app['tables'][n]
|
||||
form=SQLFORM.factory(Field('field_names','list:string',
|
||||
default=session.app.get('table_'+table,[])))
|
||||
if form.accepts(request.vars) and form.vars.field_names:
|
||||
fields=listify(form.vars.field_names)
|
||||
if table=='auth_user':
|
||||
for field in ['first_name','last_name','username','email','password']:
|
||||
if not field in fields:
|
||||
fields.append(field)
|
||||
session.app['table_'+table]=[t.strip().lower()
|
||||
for t in listify(form.vars.field_names)
|
||||
if t.strip()]
|
||||
try:
|
||||
tables=sort_tables(session.app['tables'])
|
||||
except RuntimeError:
|
||||
response.flash=T('invalid circual reference')
|
||||
else:
|
||||
if n<m-1:
|
||||
redirect(URL('step3',args=n+1))
|
||||
else:
|
||||
redirect(URL('step4'))
|
||||
return dict(step='3: Fields for table "%s" (%s of %s)' \
|
||||
% (table,n+1,m),table=table,form=form)
|
||||
|
||||
def step4():
|
||||
response.view='wizard/step.html'
|
||||
form=SQLFORM.factory(Field('pages','list:string',
|
||||
default=session.app['pages']))
|
||||
if form.accepts(request.vars):
|
||||
session.app['pages']=[clean(t)
|
||||
for t in listify(form.vars.pages)
|
||||
if t.strip()]
|
||||
if session.app['pages']:
|
||||
redirect(URL('step5',args=0))
|
||||
else:
|
||||
redirect(URL('step6'))
|
||||
return dict(step='4: Pages',form=form)
|
||||
|
||||
def step5():
|
||||
response.view='wizard/step.html'
|
||||
n=int(request.args(0) or 0)
|
||||
m=len(session.app['pages'])
|
||||
if n>=m: redirect(URL('step4'))
|
||||
page=session.app['pages'][n]
|
||||
markmin_url='http://web2py.com/examples/static/markmin.html'
|
||||
form=SQLFORM.factory(Field('content','text',
|
||||
default=session.app.get('page_'+page,[]),
|
||||
comment=A('use markmin',
|
||||
_href=markmin_url,_target='_blank')),
|
||||
formstyle='table2cols')
|
||||
if form.accepts(request.vars):
|
||||
session.app['page_'+page]=form.vars.content
|
||||
if n<m-1:
|
||||
redirect(URL('step5',args=n+1))
|
||||
else:
|
||||
redirect(URL('step6'))
|
||||
return dict(step='5: View for page "%s" (%s of %s)' % (page,n+1,m),form=form)
|
||||
|
||||
def step6():
|
||||
response.view='wizard/step.html'
|
||||
params = dict(session.app['params'])
|
||||
app = session.app['name']
|
||||
form=SQLFORM.factory(
|
||||
Field('generate_model','boolean',default=True),
|
||||
Field('generate_controller','boolean',default=True),
|
||||
Field('generate_views','boolean',default=True),
|
||||
Field('generate_menu','boolean',default=True),
|
||||
Field('apply_layout','boolean',default=True),
|
||||
Field('erase_database','boolean',default=True),
|
||||
Field('populate_database','boolean',default=True))
|
||||
if form.accepts(request.vars):
|
||||
if DEMO_MODE:
|
||||
session.flash = T('Application cannot be generated in demo mode')
|
||||
redirect(URL('index'))
|
||||
create(form.vars)
|
||||
session.flash = 'Application %s created' % app
|
||||
redirect(URL('generated'))
|
||||
return dict(step='6: Generate app "%s"' % app,form=form)
|
||||
|
||||
def generated():
|
||||
return dict(app=session.app['name'])
|
||||
|
||||
def sort_tables(tables):
|
||||
import re
|
||||
regex = re.compile('(%s)' % '|'.join(tables))
|
||||
is_auth_user = 'auth_user' in tables
|
||||
d={}
|
||||
for table in tables:
|
||||
d[table]=[]
|
||||
for field in session.app['table_%s' % table]:
|
||||
d[table]+=regex.findall(field)
|
||||
tables=[]
|
||||
if is_auth_user:
|
||||
tables.append('auth_user')
|
||||
def append(table,trail=[]):
|
||||
if table in trail:
|
||||
raise RuntimeError
|
||||
for t in d[table]: append(t,trail=trail+[table])
|
||||
if not table in tables: tables.append(table)
|
||||
for table in d: append(table)
|
||||
return tables
|
||||
|
||||
def make_table(table,fields):
|
||||
rawtable=table
|
||||
if table!='auth_user': table='t_'+table
|
||||
s=''
|
||||
s+='\n'+'#'*40+'\n'
|
||||
s+="db.define_table('%s',\n" % table
|
||||
first_field='id'
|
||||
for field in fields:
|
||||
items=[x.lower() for x in field.split()]
|
||||
has = {}
|
||||
keys = []
|
||||
for key in ['notnull','unique','integer','double','boolean','float',
|
||||
'boolean', 'date','time','datetime','text','wiki',
|
||||
'html','file','upload','image','true',
|
||||
'hidden','readonly','writeonly','multiple',
|
||||
'notempty','required']:
|
||||
if key in items[1:]:
|
||||
keys.append(key)
|
||||
has[key] = True
|
||||
tables = session.app['tables']
|
||||
refs = [t for t in tables if t in items]
|
||||
items = items[:1] + [x for x in items[1:] \
|
||||
if not x in keys and not x in tables]
|
||||
barename = name = '_'.join(items)
|
||||
if table[:2]=='t_': name='f_'+name
|
||||
if first_field=='id': first_field=name
|
||||
|
||||
### determine field type
|
||||
ftype='string'
|
||||
deftypes={'integer':'integer','double':'double','boolean':'boolean',
|
||||
'float':'double','bool':'boolean',
|
||||
'date':'date','time':'time','datetime':'datetime',
|
||||
'text':'text','file':'upload','image':'upload',
|
||||
'upload':'upload','wiki':'text', 'html':'text'}
|
||||
for key,t in deftypes.items():
|
||||
if key in has:
|
||||
ftype = t
|
||||
if refs:
|
||||
key = refs[0]
|
||||
if not key=='auth_user': key='t_'+key
|
||||
if 'multiple' in has:
|
||||
ftype='list:reference %s' % key
|
||||
else:
|
||||
ftype='reference %s' % key
|
||||
if ftype=='string' and 'multiple' in has:
|
||||
ftype='list:string'
|
||||
elif ftype=='integer' and 'multiple' in has:
|
||||
ftype='list:integer'
|
||||
elif name=='password':
|
||||
ftype='password'
|
||||
s+=" Field('%s', type='%s'" % (name, ftype)
|
||||
|
||||
### determine field attributes
|
||||
if 'notnull' in has or 'notempty' in has or 'required' in has:
|
||||
s+=', notnull=True'
|
||||
if 'unique' in has:
|
||||
s+=', unique=True'
|
||||
if ftype=='boolean' and 'true' in has:
|
||||
s+=",\n default=True"
|
||||
|
||||
### determine field representation
|
||||
elif 'wiki' in has:
|
||||
s+=",\n represent=lambda x, row: MARKMIN(x)"
|
||||
s+=",\n comment='WIKI (markmin)'"
|
||||
elif 'html' in has:
|
||||
s+=",\n represent=lambda x, row: XML(x,sanitize=True)"
|
||||
s+=",\n comment='HTML (sanitized)'"
|
||||
### determine field access
|
||||
if name=='password' or 'writeonly' in has:
|
||||
s+=",\n readable=False"
|
||||
elif 'hidden' in has:
|
||||
s+=",\n writable=False, readable=False"
|
||||
elif 'readonly' in has:
|
||||
s+=",\n writable=False"
|
||||
|
||||
### make up a label
|
||||
s+=",\n label=T('%s')),\n" % \
|
||||
' '.join(x.capitalize() for x in barename.split('_'))
|
||||
if table=='auth_user':
|
||||
s+=" Field('created_on','datetime',default=request.now,\n"
|
||||
s+=" label=T('Created On'),writable=False,readable=False),\n"
|
||||
s+=" Field('modified_on','datetime',default=request.now,\n"
|
||||
s+=" label=T('Modified On'),writable=False,readable=False,\n"
|
||||
s+=" update=request.now),\n"
|
||||
s+=" Field('registration_key',default='',\n"
|
||||
s+=" writable=False,readable=False),\n"
|
||||
s+=" Field('reset_password_key',default='',\n"
|
||||
s+=" writable=False,readable=False),\n"
|
||||
s+=" Field('registration_id',default='',\n"
|
||||
s+=" writable=False,readable=False),\n"
|
||||
elif 'auth_user' in session.app['tables']:
|
||||
s+=" auth.signature,\n"
|
||||
s+=" format='%("+first_field+")s',\n"
|
||||
s+=" migrate=settings.migrate)\n\n"
|
||||
if table=='auth_user':
|
||||
s+="""
|
||||
db.auth_user.first_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
|
||||
db.auth_user.last_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
|
||||
db.auth_user.password.requires = CRYPT(key=auth.settings.hmac_key)
|
||||
db.auth_user.username.requires = IS_NOT_IN_DB(db, db.auth_user.username)
|
||||
db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, db.auth_user.registration_id)
|
||||
db.auth_user.email.requires = (IS_EMAIL(error_message=auth.messages.invalid_email),
|
||||
IS_NOT_IN_DB(db, db.auth_user.email))
|
||||
"""
|
||||
else:
|
||||
s+="db.define_table('%s_archive',db.%s,Field('current_record','reference %s',readable=False,writable=False))\n" % (table,table,table)
|
||||
return s
|
||||
|
||||
def fix_db(filename):
|
||||
params = dict(session.app['params'])
|
||||
content = read_file(filename,'rb')
|
||||
if 'auth_user' in session.app['tables']:
|
||||
auth_user = make_table('auth_user',session.app['table_auth_user'])
|
||||
content = content.replace('sqlite://storage.sqlite',
|
||||
params['database_uri'])
|
||||
content = content.replace('auth.define_tables()',\
|
||||
auth_user+'auth.define_tables(migrate = settings.migrate)')
|
||||
content += """
|
||||
mail.settings.server = settings.email_server
|
||||
mail.settings.sender = settings.email_sender
|
||||
mail.settings.login = settings.email_login
|
||||
"""
|
||||
if params['login_method']=='janrain':
|
||||
content+="""
|
||||
from gluon.contrib.login_methods.rpx_account import RPXAccount
|
||||
auth.settings.actions_disabled=['register','change_password','request_reset_password']
|
||||
auth.settings.login_form = RPXAccount(request,
|
||||
api_key = settings.login_config.split(':')[-1],
|
||||
domain = settings.login_config.split(':')[0],
|
||||
url = "http://%s/%s/default/user/login" % (request.env.http_host,request.application))
|
||||
"""
|
||||
write_file(filename, content, 'wb')
|
||||
|
||||
def make_menu(pages):
|
||||
s=''
|
||||
s+='response.title = settings.title\n'
|
||||
s+='response.subtitle = settings.subtitle\n'
|
||||
s+="response.meta.author = '%(author)s <%(author_email)s>' % settings\n"
|
||||
s+='response.meta.keywords = settings.keywords\n'
|
||||
s+='response.meta.description = settings.description\n'
|
||||
s+='response.menu = [\n'
|
||||
for page in pages:
|
||||
if not page.startswith('error'):
|
||||
if page.endswith('_manage'):
|
||||
page_name = page[:-7]
|
||||
else:
|
||||
page_name = page
|
||||
page_name = ' '.join(x.capitalize() for x in page_name.split('_'))
|
||||
s+="(T('%s'),URL('default','%s')==URL(),URL('default','%s'),[]),\n" \
|
||||
% (page_name,page,page)
|
||||
s+=']'
|
||||
return s
|
||||
|
||||
def make_page(page,contents):
|
||||
if 'auth_user' in session.app['tables'] and not page in ('index','error'):
|
||||
s="@auth.requires_login()\ndef %s():\n" % page
|
||||
else:
|
||||
s="def %s():\n" % page
|
||||
items = page.rsplit('_',1)
|
||||
if items[0] in session.app['tables'] and len(items)==2 and items[1]=='manage':
|
||||
s+=" form = SQLFORM.smartgrid(db.t_%s,onupdate=auth.archive)\n" % items[0]
|
||||
s+=" return locals()\n\n"
|
||||
else:
|
||||
s+=" return dict()\n\n"
|
||||
return s
|
||||
|
||||
def make_view(page,contents):
|
||||
s="{{extend 'layout.html'}}\n\n"
|
||||
s+=str(MARKMIN(contents))
|
||||
return s
|
||||
|
||||
def populate(tables):
|
||||
s = 'from gluon.contrib.populate import populate\n'
|
||||
s+= 'if db(db.auth_user).isempty():\n'
|
||||
for table in sort_tables(tables):
|
||||
t=table=='auth_user' and 'auth_user' or 't_'+table
|
||||
s+=" populate(db.%s,10)\n" % t
|
||||
return s
|
||||
|
||||
def create(options):
|
||||
if DEMO_MODE:
|
||||
session.flash = T('disabled in demo mode')
|
||||
redirect(URL('step6'))
|
||||
params = dict(session.app['params'])
|
||||
app = session.app['name']
|
||||
if not app_create(app,request,force=True,key=params['security_key']):
|
||||
session.flash = 'Failure to create application'
|
||||
redirect(URL('step6'))
|
||||
|
||||
### save metadata in newapp/wizard.metadata
|
||||
try:
|
||||
meta = os.path.join(request.folder,'..',app,'wizard.metadata')
|
||||
file=open(meta,'wb')
|
||||
pickle.dump(session.app,file)
|
||||
file.close()
|
||||
except IOError:
|
||||
session.flash = 'Failure to write wizard metadata'
|
||||
redirect(URL('step6'))
|
||||
|
||||
### apply theme
|
||||
if options.apply_layout and params['layout_theme']!='Default':
|
||||
try:
|
||||
fn = 'web2py.plugin.layout_%s.w2p' % params['layout_theme']
|
||||
theme = urllib.urlopen(LAYOUTS_APP+'/static/plugin_layouts/plugins/'+fn)
|
||||
plugin_install(app, theme, request, fn)
|
||||
except:
|
||||
session.flash = T("unable to download layout")
|
||||
|
||||
### apply plugins
|
||||
for plugin in params['plugins']:
|
||||
try:
|
||||
plugin_name = 'web2py.plugin.'+plugin+'.w2p'
|
||||
stream = urllib.urlopen(PLUGINS_APP+'/static/'+plugin_name)
|
||||
plugin_install(app, stream, request, plugin_name)
|
||||
except Exception, e:
|
||||
session.flash = T("unable to download plugin: %s" % plugin)
|
||||
|
||||
### write configuration file into newapp/models/0.py
|
||||
model = os.path.join(request.folder,'..',app,'models','0.py')
|
||||
file = open(model, 'wb')
|
||||
try:
|
||||
file.write("from gluon.storage import Storage\n")
|
||||
file.write("settings = Storage()\n\n")
|
||||
file.write("settings.migrate = True\n")
|
||||
for key,value in session.app['params']:
|
||||
file.write("settings.%s = %s\n" % (key,repr(value)))
|
||||
finally:
|
||||
file.close()
|
||||
|
||||
### write configuration file into newapp/models/menu.py
|
||||
if options.generate_menu:
|
||||
model = os.path.join(request.folder,'..',app,'models','menu.py')
|
||||
file = open(model,'wb')
|
||||
try:
|
||||
file.write(make_menu(session.app['pages']))
|
||||
finally:
|
||||
file.close()
|
||||
|
||||
### customize the auth_user table
|
||||
model = os.path.join(request.folder,'..',app,'models','db.py')
|
||||
fix_db(model)
|
||||
|
||||
### create newapp/models/db_wizard.py
|
||||
if options.generate_model:
|
||||
model = os.path.join(request.folder,'..',app,'models','db_wizard.py')
|
||||
file = open(model,'wb')
|
||||
try:
|
||||
file.write('### we prepend t_ to tablenames and f_ to fieldnames for disambiguity\n\n')
|
||||
tables = sort_tables(session.app['tables'])
|
||||
for table in tables:
|
||||
if table=='auth_user': continue
|
||||
file.write(make_table(table,session.app['table_'+table]))
|
||||
finally:
|
||||
file.close()
|
||||
|
||||
model = os.path.join(request.folder,'..',app,
|
||||
'models','db_wizard_populate.py')
|
||||
if os.path.exists(model): os.unlink(model)
|
||||
if options.populate_database and session.app['tables']:
|
||||
file = open(model,'wb')
|
||||
try:
|
||||
file.write(populate(session.app['tables']))
|
||||
finally:
|
||||
file.close()
|
||||
|
||||
### create newapp/controllers/default.py
|
||||
if options.generate_controller:
|
||||
controller = os.path.join(request.folder,'..',app,'controllers','default.py')
|
||||
file = open(controller,'wb')
|
||||
try:
|
||||
file.write("""# -*- coding: utf-8 -*-
|
||||
### required - do no delete
|
||||
def user(): return dict(form=auth())
|
||||
def download(): return response.download(request,db)
|
||||
def call(): return service()
|
||||
### end requires
|
||||
""")
|
||||
for page in session.app['pages']:
|
||||
file.write(make_page(page,session.app.get('page_'+page,'')))
|
||||
finally:
|
||||
file.close()
|
||||
|
||||
### create newapp/views/default/*.html
|
||||
if options.generate_views:
|
||||
for page in session.app['pages']:
|
||||
view = os.path.join(request.folder,'..',app,'views','default',page+'.html')
|
||||
file = open(view,'wb')
|
||||
try:
|
||||
file.write(make_view(page,session.app.get('page_'+page,'')))
|
||||
finally:
|
||||
file.close()
|
||||
|
||||
if options.erase_database:
|
||||
path = os.path.join(request.folder,'..',app,'databases','*')
|
||||
for file in glob.glob(path):
|
||||
os.unlink(file)
|
||||
1
applications/admin/cron/crontab
Normal file
@@ -0,0 +1 @@
|
||||
10 * * * * root **applications/admin/cron/expire_sessions.py
|
||||
21
applications/admin/cron/expire_sessions.py
Normal file
@@ -0,0 +1,21 @@
|
||||
EXPIRATION_MINUTES=60
|
||||
DIGITS=('0','1','2','3','4','5','6','7','8','9')
|
||||
import os, time, stat, cPickle, logging
|
||||
path=os.path.join(request.folder,'sessions')
|
||||
if not os.path.exists(path):
|
||||
os.mkdir(path)
|
||||
now=time.time()
|
||||
for filename in os.listdir(path):
|
||||
fullpath=os.path.join(path,filename)
|
||||
if os.path.isfile(fullpath) and filename.startswith(DIGITS):
|
||||
try:
|
||||
filetime = os.stat(fullpath)[stat.ST_MTIME] # get it before our io
|
||||
try:
|
||||
session_data = cPickle.load(open(fullpath, 'rb+'))
|
||||
expiration = session_data['auth']['expiration']
|
||||
except:
|
||||
expiration = EXPIRATION_MINUTES * 60
|
||||
if (now - filetime) > expiration:
|
||||
os.unlink(fullpath)
|
||||
except:
|
||||
logging.exception('failure to check %s'%fullpath)
|
||||
87
applications/admin/languages/af.py
Normal file
@@ -0,0 +1,87 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'(requires internet access)': '(vereis internet toegang)',
|
||||
'(something like "it-it")': '(iets soos "it-it")',
|
||||
'About': 'Oor',
|
||||
'About application': 'Oor program',
|
||||
'Additional code for your application': 'Additionele kode vir u application',
|
||||
'Admin language': 'Admin taal',
|
||||
'Application name:': 'Program naam:',
|
||||
'Controllers': 'Beheerders',
|
||||
'Deploy on Google App Engine': 'Stuur na Google App Engine toe',
|
||||
'Edit application': 'Wysig program',
|
||||
'Installed applications': 'Geinstalleerde apps',
|
||||
'Languages': 'Tale',
|
||||
'License for': 'Lisensie vir',
|
||||
'Models': 'Modelle',
|
||||
'Modules': 'Modules',
|
||||
'New application wizard': 'Nuwe app wizard',
|
||||
'New simple application': 'Nuwe eenvoudige app',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Aangedryf deur',
|
||||
'Searching:': 'Soek:',
|
||||
'Static files': 'Static files',
|
||||
'Sure you want to delete this object?': 'Is jy seker jy will hierde object verwyder?',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no plugins': 'Daar is geen plugins',
|
||||
'These files are served without processing, your images go here': 'Hierdie lêre is sonder veranderinge geserved, jou images gaan hier',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Om ''n plugin te skep, noem ''n lêer/gids plugin_[name]',
|
||||
'Translation strings for the application': 'Vertaling woorde vir die program',
|
||||
'Upload & install packed application': 'Oplaai & install gepakte program',
|
||||
'Upload a package:': 'Oplaai ''n package:',
|
||||
'Use an url:': 'Gebruik n url:',
|
||||
'Views': 'Views',
|
||||
'About': 'oor',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it:': 'en verander die naam:',
|
||||
'Change admin password': 'verander admin wagwoord',
|
||||
'Check for upgrades': 'soek vir upgrades',
|
||||
'Clean': 'maak skoon',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'Compile': 'kompileer',
|
||||
'controllers': 'beheerders',
|
||||
'Create': 'skep',
|
||||
'create file with filename:': 'skep lêer met naam:',
|
||||
'created by': 'geskep deur',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'loop tans',
|
||||
'database administration': 'database administration',
|
||||
'Deploy': 'deploy',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'download layouts': 'aflaai layouts',
|
||||
'download plugins': 'aflaai plugins',
|
||||
'Edit': 'wysig',
|
||||
'Errors': 'foute',
|
||||
'exposes': 'exposes',
|
||||
'extends': 'extends',
|
||||
'files': 'lêre',
|
||||
'filter': 'filter',
|
||||
'Help': 'hulp',
|
||||
'includes': 'includes',
|
||||
'Install': 'installeer',
|
||||
'languages': 'tale',
|
||||
'loading...': 'laai...',
|
||||
'Logout': 'logout',
|
||||
'models': 'modelle',
|
||||
'modules': 'modules',
|
||||
'Overwrite installed app': 'skryf oor geinstalleerde program',
|
||||
'Pack all': 'pack alles',
|
||||
'plugins': 'plugins',
|
||||
'shell': 'shell',
|
||||
'Site': 'site',
|
||||
'Start wizard': 'start wizard',
|
||||
'static': 'static',
|
||||
'test': 'toets',
|
||||
'Uninstall': 'verwyder',
|
||||
'update all languages': 'update all languages',
|
||||
'upload': 'oplaai',
|
||||
'upload file:': 'oplaai lêer:',
|
||||
'upload plugin file:': 'upload plugin lêer:',
|
||||
'versioning': 'versioning',
|
||||
'views': 'views',
|
||||
'web2py Recent Tweets': 'web2py Onlangse Tweets',
|
||||
}
|
||||
277
applications/admin/languages/bg-bg.py
Normal file
@@ -0,0 +1,277 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': '%s записите бяха изтрити',
|
||||
'%s rows updated': '%s записите бяха обновени',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(something like "it-it")',
|
||||
'A new version of web2py is available': 'A new version of web2py is available',
|
||||
'A new version of web2py is available: %s': 'A new version of web2py is available: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.',
|
||||
'ATTENTION: you cannot edit the running application!': 'ATTENTION: you cannot edit the running application!',
|
||||
'About': 'About',
|
||||
'About application': 'About application',
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'Admin is disabled because insecure channel': 'Admin is disabled because insecure channel',
|
||||
'Admin is disabled because unsecure channel': 'Admin is disabled because unsecure channel',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': 'Administrator Password:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Are you sure you want to delete file "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': 'Are you sure you want to uninstall application "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Are you sure you want to uninstall application "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
|
||||
'Available databases and tables': 'Available databases and tables',
|
||||
'Cannot be empty': 'Cannot be empty',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Cannot compile: there are errors in your app. Debug it, correct errors and try again.',
|
||||
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
|
||||
'Check to delete': 'Check to delete',
|
||||
'Checking for upgrades...': 'Checking for upgrades...',
|
||||
'Controllers': 'Controllers',
|
||||
'Create new simple application': 'Create new simple application',
|
||||
'Current request': 'Current request',
|
||||
'Current response': 'Current response',
|
||||
'Current session': 'Current session',
|
||||
'DESIGN': 'DESIGN',
|
||||
'Date and Time': 'Date and Time',
|
||||
'Delete': 'Delete',
|
||||
'Delete:': 'Delete:',
|
||||
'Deploy on Google App Engine': 'Deploy on Google App Engine',
|
||||
'Design for': 'Design for',
|
||||
'EDIT': 'EDIT',
|
||||
'Edit application': 'Edit application',
|
||||
'Edit current record': 'Edit current record',
|
||||
'Editing Language file': 'Editing Language file',
|
||||
'Editing file': 'Editing file',
|
||||
'Editing file "%s"': 'Editing file "%s"',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Error logs for "%(app)s"',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Functions with no doctests will result in [passed] tests.',
|
||||
'Hello World': 'Здравей, свят',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
|
||||
'Import/Export': 'Import/Export',
|
||||
'Installed applications': 'Installed applications',
|
||||
'Internal State': 'Internal State',
|
||||
'Invalid Query': 'Невалидна заявка',
|
||||
'Invalid action': 'Invalid action',
|
||||
'Language files (static strings) updated': 'Language files (static strings) updated',
|
||||
'Languages': 'Languages',
|
||||
'Last saved on:': 'Last saved on:',
|
||||
'License for': 'License for',
|
||||
'Login': 'Login',
|
||||
'Login to the Administrative Interface': 'Login to the Administrative Interface',
|
||||
'Models': 'Models',
|
||||
'Modules': 'Modules',
|
||||
'NO': 'NO',
|
||||
'New Record': 'New Record',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'No databases in this application',
|
||||
'Original/Translation': 'Original/Translation',
|
||||
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
|
||||
'Peeking at file': 'Peeking at file',
|
||||
'Plugin "%s" in application': 'Plugin "%s" in application',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Powered by',
|
||||
'Query:': 'Query:',
|
||||
'Resolve Conflict file': 'Resolve Conflict file',
|
||||
'Rows in table': 'Rows in table',
|
||||
'Rows selected': 'Rows selected',
|
||||
'Saved file hash:': 'Saved file hash:',
|
||||
'Searching:': 'Searching:',
|
||||
'Static files': 'Static files',
|
||||
'Sure you want to delete this object?': 'Сигурен ли си, че искаш да изтриеш този обект?',
|
||||
'TM': 'TM',
|
||||
'Testing application': 'Testing application',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no controllers': 'There are no controllers',
|
||||
'There are no models': 'There are no models',
|
||||
'There are no modules': 'There are no modules',
|
||||
'There are no plugins': 'There are no plugins',
|
||||
'There are no static files': 'There are no static files',
|
||||
'There are no translators, only default language is supported': 'There are no translators, only default language is supported',
|
||||
'There are no views': 'There are no views',
|
||||
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
|
||||
'This is the %(filename)s template': 'This is the %(filename)s template',
|
||||
'Ticket': 'Ticket',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
|
||||
'Translation strings for the application': 'Translation strings for the application',
|
||||
'Unable to check for upgrades': 'Unable to check for upgrades',
|
||||
'Unable to download': 'Unable to download',
|
||||
'Unable to download app because:': 'Unable to download app because:',
|
||||
'Unable to download because': 'Unable to download because',
|
||||
'Update:': 'Update:',
|
||||
'Upload & install packed application': 'Upload & install packed application',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload existing application': 'Upload existing application',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'Version',
|
||||
'Views': 'Views',
|
||||
'Welcome to web2py': 'Добре дошъл в web2py',
|
||||
'YES': 'YES',
|
||||
'About': 'about',
|
||||
'additional code for your application': 'additional code for your application',
|
||||
'admin disabled because no admin password': 'admin disabled because no admin password',
|
||||
'admin disabled because not supported on google app engine': 'admin disabled because not supported on google apps engine',
|
||||
'admin disabled because unable to access password file': 'admin disabled because unable to access password file',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'and rename it (required):',
|
||||
'and rename it:': 'and rename it:',
|
||||
'appadmin': 'appadmin',
|
||||
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
|
||||
'application "%s" uninstalled': 'application "%s" uninstalled',
|
||||
'application compiled': 'application compiled',
|
||||
'application is compiled and cannot be designed': 'application is compiled and cannot be designed',
|
||||
'arguments': 'arguments',
|
||||
'back': 'back',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'cache, errors and sessions cleaned',
|
||||
'cannot create file': 'cannot create file',
|
||||
'cannot upload file "%(filename)s"': 'cannot upload file "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'check all': 'check all',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'clean',
|
||||
'click here for online examples': 'щракни тук за онлайн примери',
|
||||
'click here for the administrative interface': 'щракни тук за административния интерфейс',
|
||||
'click to check for upgrades': 'click to check for upgrades',
|
||||
'code': 'code',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'Compile': 'compile',
|
||||
'compiled application removed': 'compiled application removed',
|
||||
'controllers': 'controllers',
|
||||
'Create': 'create',
|
||||
'create file with filename:': 'create file with filename:',
|
||||
'create new application:': 'create new application:',
|
||||
'created by': 'created by',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'currently saved or',
|
||||
'data uploaded': 'данните бяха качени',
|
||||
'database': 'database',
|
||||
'database %s select': 'database %s select',
|
||||
'database administration': 'database administration',
|
||||
'db': 'дб',
|
||||
'defines tables': 'defines tables',
|
||||
'delete': 'delete',
|
||||
'delete all checked': 'delete all checked',
|
||||
'delete plugin': 'delete plugin',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'дизайн',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': 'готово!',
|
||||
'download layouts': 'download layouts',
|
||||
'download plugins': 'download plugins',
|
||||
'Edit': 'edit',
|
||||
'edit controller': 'edit controller',
|
||||
'edit views:': 'edit views:',
|
||||
'Errors': 'errors',
|
||||
'export as csv file': 'export as csv file',
|
||||
'exposes': 'exposes',
|
||||
'extends': 'extends',
|
||||
'failed to reload module': 'failed to reload module',
|
||||
'failed to reload module because:': 'failed to reload module because:',
|
||||
'file "%(filename)s" created': 'file "%(filename)s" created',
|
||||
'file "%(filename)s" deleted': 'file "%(filename)s" deleted',
|
||||
'file "%(filename)s" uploaded': 'file "%(filename)s" uploaded',
|
||||
'file "%(filename)s" was not deleted': 'file "%(filename)s" was not deleted',
|
||||
'file "%s" of %s restored': 'file "%s" of %s restored',
|
||||
'file changed on disk': 'file changed on disk',
|
||||
'file does not exist': 'file does not exist',
|
||||
'file saved on %(time)s': 'file saved on %(time)s',
|
||||
'file saved on %s': 'file saved on %s',
|
||||
'files': 'files',
|
||||
'filter': 'filter',
|
||||
'Help': 'help',
|
||||
'htmledit': 'htmledit',
|
||||
'includes': 'includes',
|
||||
'insert new': 'insert new',
|
||||
'insert new %s': 'insert new %s',
|
||||
'Install': 'install',
|
||||
'internal error': 'internal error',
|
||||
'invalid password': 'invalid password',
|
||||
'invalid request': 'невалидна заявка',
|
||||
'invalid ticket': 'invalid ticket',
|
||||
'language file "%(filename)s" created/updated': 'language file "%(filename)s" created/updated',
|
||||
'languages': 'languages',
|
||||
'languages updated': 'languages updated',
|
||||
'loading...': 'loading...',
|
||||
'login': 'login',
|
||||
'Logout': 'logout',
|
||||
'merge': 'merge',
|
||||
'models': 'models',
|
||||
'modules': 'modules',
|
||||
'new application "%s" created': 'new application "%s" created',
|
||||
'new plugin installed': 'new plugin installed',
|
||||
'new record inserted': 'новият запис беше добавен',
|
||||
'next 100 rows': 'next 100 rows',
|
||||
'no match': 'no match',
|
||||
'or import from csv file': 'or import from csv file',
|
||||
'or provide app url:': 'or provide app url:',
|
||||
'or provide application url:': 'or provide application url:',
|
||||
'Overwrite installed app': 'overwrite installed app',
|
||||
'Pack all': 'pack all',
|
||||
'Pack compiled': 'pack compiled',
|
||||
'pack plugin': 'pack plugin',
|
||||
'password changed': 'password changed',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
|
||||
'plugins': 'plugins',
|
||||
'previous 100 rows': 'previous 100 rows',
|
||||
'record': 'record',
|
||||
'record does not exist': 'записът не съществува',
|
||||
'record id': 'record id',
|
||||
'Remove compiled': 'remove compiled',
|
||||
'restore': 'restore',
|
||||
'revert': 'revert',
|
||||
'save': 'save',
|
||||
'selected': 'selected',
|
||||
'session expired': 'session expired',
|
||||
'shell': 'shell',
|
||||
'Site': 'site',
|
||||
'some files could not be removed': 'some files could not be removed',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'състояние',
|
||||
'static': 'static',
|
||||
'submit': 'submit',
|
||||
'table': 'table',
|
||||
'test': 'test',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'the application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'the data representation, define database tables and sets': 'the data representation, define database tables and sets',
|
||||
'the presentations layer, views are also known as templates': 'the presentations layer, views are also known as templates',
|
||||
'these files are served without processing, your images go here': 'these files are served without processing, your images go here',
|
||||
'to previous version.': 'to previous version.',
|
||||
'translation strings for the application': 'translation strings for the application',
|
||||
'try': 'try',
|
||||
'try something like': 'try something like',
|
||||
'unable to create application "%s"': 'unable to create application "%s"',
|
||||
'unable to delete file "%(filename)s"': 'unable to delete file "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
|
||||
'unable to parse csv file': 'не е възможна обработката на csv файла',
|
||||
'unable to uninstall "%s"': 'unable to uninstall "%s"',
|
||||
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
|
||||
'uncheck all': 'uncheck all',
|
||||
'Uninstall': 'uninstall',
|
||||
'update': 'update',
|
||||
'update all languages': 'update all languages',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload': 'upload',
|
||||
'upload application:': 'upload application:',
|
||||
'upload file:': 'upload file:',
|
||||
'upload plugin file:': 'upload plugin file:',
|
||||
'variables': 'variables',
|
||||
'versioning': 'versioning',
|
||||
'view': 'view',
|
||||
'views': 'views',
|
||||
'web2py Recent Tweets': 'web2py Recent Tweets',
|
||||
'web2py is up to date': 'web2py is up to date',
|
||||
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
|
||||
}
|
||||
341
applications/admin/languages/de-de.py
Normal file
@@ -0,0 +1,341 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': '%s Zeilen gelöscht',
|
||||
'%s rows updated': '%s Zeilen aktualisiert',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(so etwas wie "it-it")',
|
||||
'A new version of web2py is available': 'Eine neue Version von web2py ist verfügbar',
|
||||
'A new version of web2py is available: %s': 'Eine neue Version von web2py ist verfügbar: %s',
|
||||
'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\n': 'Eine neue Version von web2py ist verfügbar: Version 1.85.3 (2010-09-18 07:07:46)\n',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ACHTUNG: Die Einwahl benötigt eine sichere (HTTPS) Verbindung. Es sei denn sie läuft Lokal(localhost).',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ACHTUNG: Testen ist nicht threadsicher. Führen sie also nicht mehrere Tests gleichzeitig aus.',
|
||||
'ATTENTION: This is an experimental feature and it needs more testing.': 'ACHTUNG: Dies ist eine experimentelle Funktion und benötigt noch weitere Tests.',
|
||||
'ATTENTION: you cannot edit the running application!': 'ACHTUNG: Eine laufende Anwendung kann nicht editiert werden!',
|
||||
'Abort': 'Abbrechen',
|
||||
'About': 'Über',
|
||||
'About application': 'Über die Anwendung',
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'Admin is disabled because insecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
|
||||
'Admin is disabled because unsecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': 'Administrator Passwort:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Sind Sie sich sicher, dass Sie diese Datei löschen wollen "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': 'Sind Sie sich sicher, dass Sie diese Anwendung deinstallieren wollen "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Sind Sie sich sicher, dass Sie diese Anwendung deinstallieren wollen "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Sind Sie sich sicher, dass Sie web2py jetzt upgraden möchten?',
|
||||
'Authentication': 'Authentifizierung',
|
||||
'Available databases and tables': 'Verfügbare Datenbanken und Tabellen',
|
||||
'Cannot be empty': 'Darf nicht leer sein',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Nicht Kompilierbar:Es sind Fehler in der Anwendung. Beseitigen Sie die Fehler und versuchen Sie es erneut.',
|
||||
'Change Password': 'Passwort ändern',
|
||||
'Check to delete': 'Markiere zum löschen',
|
||||
'Checking for upgrades...': 'Auf Updates überprüfen...',
|
||||
'Client IP': 'Client IP',
|
||||
'Controller': 'Controller',
|
||||
'Controllers': 'Controller',
|
||||
'Copyright': 'Urheberrecht',
|
||||
'Create new simple application': 'Erzeuge neue Anwendung',
|
||||
'Current request': 'Aktuelle Anfrage (request)',
|
||||
'Current response': 'Aktuelle Antwort (response)',
|
||||
'Current session': 'Aktuelle Sitzung (session)',
|
||||
'DB Model': 'DB Modell',
|
||||
'DESIGN': 'design',
|
||||
'Database': 'Datenbank',
|
||||
'Date and Time': 'Datum und Uhrzeit',
|
||||
'Delete': 'Löschen',
|
||||
'Delete:': 'Löschen:',
|
||||
'Deploy on Google App Engine': 'Auf Google App Engine installieren',
|
||||
'Description': 'Beschreibung',
|
||||
'Design for': 'Design für',
|
||||
'E-mail': 'E-mail',
|
||||
'EDIT': 'BEARBEITEN',
|
||||
'Edit': 'Bearbeiten',
|
||||
'Edit Profile': 'Bearbeite Profil',
|
||||
'Edit This App': 'Bearbeite diese Anwendung',
|
||||
'Edit application': 'Bearbeite Anwendung',
|
||||
'Edit current record': 'Bearbeite aktuellen Datensatz',
|
||||
'Editing Language file': 'Sprachdatei bearbeiten',
|
||||
'Editing file': 'Bearbeite Datei',
|
||||
'Editing file "%s"': 'Bearbeite Datei "%s"',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Fehlerprotokoll für "%(app)s"',
|
||||
'Exception instance attributes': 'Atribute der Ausnahmeinstanz',
|
||||
'Expand Abbreviation': 'Kürzel erweitern',
|
||||
'First name': 'Vorname',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Funktionen ohne doctests erzeugen [passed] in Tests',
|
||||
'Go to Matching Pair': 'gehe zum übereinstimmenden Paar',
|
||||
'Group ID': 'Gruppen ID',
|
||||
'Hello World': 'Hallo Welt',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Falls der obere Test eine Fehler-Ticketnummer enthält deutet das auf einen Fehler in der Ausführung des Controllers hin, noch bevor der Doctest ausgeführt werden konnte. Gewöhnlich führen fehlerhafte Einrückungen oder fehlerhafter Code ausserhalb der Funktion zu solchen Fehlern. Ein grüner Titel deutet darauf hin, dass alle Test(wenn sie vorhanden sind) erfolgreich durchlaufen wurden. In diesem Fall werden die Testresultate nicht angezeigt.',
|
||||
'If you answer "yes", be patient, it may take a while to download': '',
|
||||
'If you answer yes, be patient, it may take a while to download': 'If you answer yes, be patient, it may take a while to download',
|
||||
'Import/Export': 'Importieren/Exportieren',
|
||||
'Index': 'Index',
|
||||
'Installed applications': 'Installierte Anwendungen',
|
||||
'Internal State': 'interner Status',
|
||||
'Invalid Query': 'Ungültige Abfrage',
|
||||
'Invalid action': 'Ungültige Aktion',
|
||||
'Invalid email': 'Ungültige Email',
|
||||
'Key bindings': 'Tastenbelegungen',
|
||||
'Key bindings for ZenConding Plugin': 'Tastenbelegungen für das ZenConding Plugin',
|
||||
'Language files (static strings) updated': 'Sprachdatei (statisch Strings) aktualisiert',
|
||||
'Languages': 'Sprachen',
|
||||
'Last name': 'Nachname',
|
||||
'Last saved on:': 'Zuletzt gespeichert am:',
|
||||
'Layout': 'Layout',
|
||||
'License for': 'Lizenz für',
|
||||
'Login': 'Anmelden',
|
||||
'Login to the Administrative Interface': 'An das Administrations-Interface anmelden',
|
||||
'Logout': 'Abmeldung',
|
||||
'Lost Password': 'Passwort vergessen',
|
||||
'Main Menu': 'Menú principal',
|
||||
'Match Pair': 'Paare finden',
|
||||
'Menu Model': 'Menü Modell',
|
||||
'Merge Lines': 'Zeilen zusammenfügen',
|
||||
'Models': 'Modelle',
|
||||
'Modules': 'Module',
|
||||
'NO': 'NEIN',
|
||||
'Name': 'Name',
|
||||
'New Record': 'Neuer Datensatz',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'Next Edit Point': 'nächster Bearbeitungsschritt',
|
||||
'No databases in this application': 'Keine Datenbank in dieser Anwendung',
|
||||
'Origin': 'Herkunft',
|
||||
'Original/Translation': 'Original/Übersetzung',
|
||||
'Password': 'Passwort',
|
||||
'Peeking at file': 'Dateiansicht',
|
||||
'Plugin "%s" in application': 'Plugin "%s" in Anwendung',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Unterstützt von',
|
||||
'Previous Edit Point': 'vorheriger Bearbeitungsschritt',
|
||||
'Query:': 'Abfrage:',
|
||||
'Record ID': 'Datensatz ID',
|
||||
'Register': 'registrieren',
|
||||
'Registration key': 'Registrierungsschlüssel',
|
||||
'Reset Password key': 'Passwortschlüssel zurücksetzen',
|
||||
'Resolve Conflict file': 'bereinige Konflikt-Datei',
|
||||
'Role': 'Rolle',
|
||||
'Rows in table': 'Zeilen in Tabelle',
|
||||
'Rows selected': 'Zeilen ausgewählt',
|
||||
'Save via Ajax': 'via Ajax sichern',
|
||||
'Saved file hash:': 'Gespeicherter Datei-Hash:',
|
||||
'Searching:': 'Searching:',
|
||||
'Static files': 'statische Dateien',
|
||||
'Stylesheet': 'Stylesheet',
|
||||
'Sure you want to delete this object?': 'Wollen Sie das Objekt wirklich löschen?',
|
||||
'TM': 'TM',
|
||||
'Table name': 'Tabellen Name',
|
||||
'Testing application': 'Teste die Anwendung',
|
||||
'Testing controller': 'teste Controller',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'Die "query" ist eine Bedingung wie "db.table1.field1 == \'Wert\'". Etwas wie "db.table1.field1 db.table2.field2 ==" führt zu einem SQL JOIN.',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The output of the file is a dictionary that was rendered by the view': 'The output of the file is a dictionary that was rendered by the view',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no controllers': 'Keine Controller vorhanden',
|
||||
'There are no models': 'Keine Modelle vorhanden',
|
||||
'There are no modules': 'Keine Module vorhanden',
|
||||
'There are no plugins': 'There are no plugins',
|
||||
'There are no static files': 'Keine statischen Dateien vorhanden',
|
||||
'There are no translators, only default language is supported': 'Keine Übersetzungen vorhanden, nur die voreingestellte Sprache wird unterstützt',
|
||||
'There are no views': 'Keine Views vorhanden',
|
||||
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
|
||||
'This is a copy of the scaffolding application': 'Dies ist eine Kopie einer Grundgerüst-Anwendung',
|
||||
'This is the %(filename)s template': 'Dies ist das Template %(filename)s',
|
||||
'Ticket': 'Ticket',
|
||||
'Timestamp': 'Timestamp',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Um ein Plugin zu erstellen benennen Sie eine(n) Datei/Ordner plugin_[Name]',
|
||||
'Translation strings for the application': 'Translation strings for the application',
|
||||
'Unable to check for upgrades': 'überprüfen von Upgrades nicht möglich',
|
||||
'Unable to download': 'herunterladen nicht möglich',
|
||||
'Unable to download app': 'herunterladen der Anwendung nicht möglich',
|
||||
'Update:': 'Aktualisiere:',
|
||||
'Upload & install packed application': 'Verpackte Anwendung hochladen und installieren',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload existing application': 'lade existierende Anwendung hoch',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Benutze (...)&(...) für AND, (...)|(...) für OR, und ~(...) für NOT, um komplexe Abfragen zu erstellen.',
|
||||
'Use an url:': 'Use an url:',
|
||||
'User ID': 'Benutzer ID',
|
||||
'Version': 'Version',
|
||||
'View': 'View',
|
||||
'Views': 'Views',
|
||||
'Welcome %s': 'Willkommen %s',
|
||||
'Welcome to web2py': 'Willkommen zu web2py',
|
||||
'Which called the function': 'Which called the function',
|
||||
'Wrap with Abbreviation': 'mit Kürzel einhüllen',
|
||||
'YES': 'JA',
|
||||
'You are successfully running web2py': 'web2by wird erfolgreich ausgeführt',
|
||||
'You can modify this application and adapt it to your needs': 'Sie können diese Anwendung verändern und Ihren Bedürfnissen anpassen',
|
||||
'You visited the url': 'Sie besuchten die URL',
|
||||
'About': 'Über',
|
||||
'additional code for your application': 'zusätzlicher Code für Ihre Anwendung',
|
||||
'admin disabled because no admin password': ' admin ist deaktiviert, weil kein Admin-Passwort gesetzt ist',
|
||||
'admin disabled because not supported on google apps engine': 'admin ist deaktiviert, es existiert dafür keine Unterstützung auf der google apps engine',
|
||||
'admin disabled because unable to access password file': 'admin ist deaktiviert, weil kein Zugriff auf die Passwortdatei besteht',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'und benenne sie um (erforderlich):',
|
||||
'and rename it:': ' und benenne sie um:',
|
||||
'appadmin': 'appadmin',
|
||||
'appadmin is disabled because insecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
|
||||
'application "%s" uninstalled': 'Anwendung "%s" deinstalliert',
|
||||
'application compiled': 'Anwendung kompiliert',
|
||||
'application is compiled and cannot be designed': 'Die Anwendung ist kompiliert kann deswegen nicht mehr geändert werden',
|
||||
'arguments': 'arguments',
|
||||
'back': 'zurück',
|
||||
'beautify': 'beautify',
|
||||
'cache': 'Cache',
|
||||
'cache, errors and sessions cleaned': 'Zwischenspeicher (cache), Fehler und Sitzungen (sessions) gelöscht',
|
||||
'call': 'call',
|
||||
'cannot create file': 'Kann Datei nicht erstellen',
|
||||
'cannot upload file "%(filename)s"': 'Kann Datei nicht Hochladen "%(filename)s"',
|
||||
'Change admin password': 'Administrator-Passwort ändern',
|
||||
'change password': 'Passwort ändern',
|
||||
'check all': 'alles auswählen',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'löschen',
|
||||
'click here for online examples': 'hier klicken für online Beispiele',
|
||||
'click here for the administrative interface': 'hier klicken für die Administrationsoberfläche ',
|
||||
'click to check for upgrades': 'hier klicken um nach Upgrades zu suchen',
|
||||
'code': 'code',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'Compile': 'kompilieren',
|
||||
'compiled application removed': 'kompilierte Anwendung gelöscht',
|
||||
'controllers': 'Controllers',
|
||||
'Create': 'erstellen',
|
||||
'create file with filename:': 'erzeuge Datei mit Dateinamen:',
|
||||
'create new application:': 'erzeuge neue Anwendung:',
|
||||
'created by': 'created by',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'des derzeit gespeicherten oder',
|
||||
'customize me!': 'pass mich an!',
|
||||
'data uploaded': 'Daten hochgeladen',
|
||||
'database': 'Datenbank',
|
||||
'database %s select': 'Datenbank %s ausgewählt',
|
||||
'database administration': 'Datenbankadministration',
|
||||
'db': 'db',
|
||||
'defines tables': 'definiere Tabellen',
|
||||
'delete': 'löschen',
|
||||
'delete all checked': 'lösche alle markierten',
|
||||
'delete plugin': 'Plugin löschen',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'design',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'documentation': 'Dokumentation',
|
||||
'done!': 'fertig!',
|
||||
'download layouts': 'download layouts',
|
||||
'download plugins': 'download plugins',
|
||||
'Edit': 'bearbeiten',
|
||||
'edit controller': 'Bearbeite Controller',
|
||||
'edit profile': 'bearbeite Profil',
|
||||
'edit views:': 'Views bearbeiten:',
|
||||
'Errors': 'Fehler',
|
||||
'escape': 'escape',
|
||||
'export as csv file': 'Exportieren als CSV-Datei',
|
||||
'exposes': 'stellt zur Verfügung',
|
||||
'extends': 'erweitert',
|
||||
'failed to reload module': 'neu laden des Moduls fehlgeschlagen',
|
||||
'file "%(filename)s" created': 'Datei "%(filename)s" erstellt',
|
||||
'file "%(filename)s" deleted': 'Datei "%(filename)s" gelöscht',
|
||||
'file "%(filename)s" uploaded': 'Datei "%(filename)s" hochgeladen',
|
||||
'file "%(filename)s" was not deleted': 'Datei "%(filename)s" wurde nicht gelöscht',
|
||||
'file "%s" of %s restored': 'Datei "%s" von %s wiederhergestellt',
|
||||
'file changed on disk': 'Datei auf Festplatte geändert',
|
||||
'file does not exist': 'Datei existiert nicht',
|
||||
'file saved on %(time)s': 'Datei gespeichert am %(time)s',
|
||||
'file saved on %s': 'Datei gespeichert auf %s',
|
||||
'files': 'files',
|
||||
'filter': 'filter',
|
||||
'Help': 'Hilfe',
|
||||
'htmledit': 'htmledit',
|
||||
'includes': 'Einfügen',
|
||||
'index': 'index',
|
||||
'insert new': 'neu einfügen',
|
||||
'insert new %s': 'neu einfügen %s',
|
||||
'Install': 'installieren',
|
||||
'internal error': 'interner Fehler',
|
||||
'invalid password': 'Ungültiges Passwort',
|
||||
'invalid request': 'ungültige Anfrage',
|
||||
'invalid ticket': 'ungültiges Ticket',
|
||||
'language file "%(filename)s" created/updated': 'Sprachdatei "%(filename)s" erstellt/aktualisiert',
|
||||
'languages': 'Sprachen',
|
||||
'languages updated': 'Sprachen aktualisiert',
|
||||
'loading...': 'lade...',
|
||||
'located in the file': 'located in Datei',
|
||||
'login': 'anmelden',
|
||||
'Logout': 'abmelden',
|
||||
'lost password?': 'Passwort vergessen?',
|
||||
'merge': 'verbinden',
|
||||
'models': 'Modelle',
|
||||
'modules': 'Module',
|
||||
'new application "%s" created': 'neue Anwendung "%s" erzeugt',
|
||||
'new record inserted': 'neuer Datensatz eingefügt',
|
||||
'next 100 rows': 'nächsten 100 Zeilen',
|
||||
'or import from csv file': 'oder importieren von cvs Datei',
|
||||
'or provide app url:': 'oder geben Sie eine Anwendungs-URL an:',
|
||||
'or provide application url:': 'oder geben Sie eine Anwendungs-URL an:',
|
||||
'Overwrite installed app': 'installierte Anwendungen überschreiben',
|
||||
'Pack all': 'verpacke alles',
|
||||
'Pack compiled': 'Verpacke kompiliert',
|
||||
'pack plugin': 'Plugin verpacken',
|
||||
'please wait!': 'bitte warten!',
|
||||
'plugins': 'plugins',
|
||||
'previous 100 rows': 'vorherige 100 zeilen',
|
||||
'record': 'Datensatz',
|
||||
'record does not exist': 'Datensatz existiert nicht',
|
||||
'record id': 'Datensatz id',
|
||||
'register': 'Registrierung',
|
||||
'Remove compiled': 'kompilat gelöscht',
|
||||
'restore': 'wiederherstellen',
|
||||
'revert': 'zurückkehren',
|
||||
'save': 'sichern',
|
||||
'selected': 'ausgewählt(e)',
|
||||
'session expired': 'Sitzung Abgelaufen',
|
||||
'shell': 'shell',
|
||||
'Site': 'Seite',
|
||||
'some files could not be removed': 'einige Dateien konnten nicht gelöscht werden',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'Status',
|
||||
'static': 'statische Dateien',
|
||||
'submit': 'Absenden',
|
||||
'table': 'Tabelle',
|
||||
'test': 'Test',
|
||||
'test_def': 'test_def',
|
||||
'test_for': 'test_for',
|
||||
'test_if': 'test_if',
|
||||
'test_try': 'test_try',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'Die Logik der Anwendung, jeder URL-Pfad wird auf eine Funktion abgebildet die der Controller zur Verfügung stellt',
|
||||
'the data representation, define database tables and sets': 'Die Datenrepräsentation definiert Mengen von Tabellen und Datenbanken ',
|
||||
'the presentations layer, views are also known as templates': 'Die Präsentationsschicht, Views sind auch bekannt als Vorlagen/Templates',
|
||||
'these files are served without processing, your images go here': 'Diese Dateien werden ohne Verarbeitung ausgeliefert. Beispielsweise Bilder kommen hier hin.',
|
||||
'to previous version.': 'zu einer früheren Version.',
|
||||
'translation strings for the application': 'Übersetzungs-Strings für die Anwendung',
|
||||
'try': 'versuche',
|
||||
'try something like': 'versuche so etwas wie',
|
||||
'unable to create application "%s"': 'erzeugen von Anwendung "%s" nicht möglich',
|
||||
'unable to delete file "%(filename)s"': 'löschen von Datein "%(filename)s" nicht möglich',
|
||||
'unable to parse csv file': 'analysieren der cvs Datei nicht möglich',
|
||||
'unable to uninstall "%s"': 'deinstallieren von "%s" nicht möglich',
|
||||
'uncheck all': 'alles demarkieren',
|
||||
'Uninstall': 'deinstallieren',
|
||||
'update': 'aktualisieren',
|
||||
'update all languages': 'aktualisiere alle Sprachen',
|
||||
'upgrade web2py now': 'jetzt web2py upgraden',
|
||||
'upload': 'upload',
|
||||
'upload application:': 'lade Anwendung hoch:',
|
||||
'upload file:': 'lade Datei hoch:',
|
||||
'upload plugin file:': 'Plugin-Datei hochladen:',
|
||||
'user': 'user',
|
||||
'variables': 'variables',
|
||||
'versioning': 'Versionierung',
|
||||
'view': 'View',
|
||||
'views': 'Views',
|
||||
'web2py Recent Tweets': 'neuste Tweets von web2py',
|
||||
'web2py is up to date': 'web2py ist auf dem neuesten Stand',
|
||||
'xml': 'xml',
|
||||
}
|
||||
282
applications/admin/languages/es-es.py
Normal file
@@ -0,0 +1,282 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': '%s filas eliminadas',
|
||||
'%s rows updated': '%s filas actualizadas',
|
||||
'(something like "it-it")': '(algo como "it-it")',
|
||||
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
|
||||
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENCION: Inicio de sesión requiere una conexión segura (HTTPS) o localhost.',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENCION: NO EJECUTE VARIAS PRUEBAS SIMULTANEAMENTE, NO SON THREAD SAFE.',
|
||||
'ATTENTION: you cannot edit the running application!': 'ATENCION: no puede modificar la aplicación que se ejecuta!',
|
||||
'About': 'Acerca de',
|
||||
'About application': 'Acerca de la aplicación',
|
||||
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
|
||||
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
|
||||
'Administrator Password:': 'Contraseña del Administrador:',
|
||||
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': '¿Está seguro que quiere eliminar el plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': '¿Está seguro que desea actualizar web2py ahora?',
|
||||
'Available databases and tables': 'Bases de datos y tablas disponibles',
|
||||
'Cannot be empty': 'No puede estar vacío',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
|
||||
'Cannot compile: there are errors in your app:': 'No se puede compilar: hay errores en su aplicación:',
|
||||
'Change Password': 'Cambie Contraseña',
|
||||
'Check to delete': 'Marque para eliminar',
|
||||
'Checking for upgrades...': 'Buscando actulizaciones...',
|
||||
'Click row to expand traceback': 'Click row to expand traceback',
|
||||
'Client IP': 'IP del Cliente',
|
||||
'Controllers': 'Controladores',
|
||||
'Count': 'Count',
|
||||
'Create new application using the Wizard': 'Create new application using the Wizard',
|
||||
'Create new simple application': 'Cree una nueva aplicación',
|
||||
'Current request': 'Solicitud en curso',
|
||||
'Current response': 'Respuesta en curso',
|
||||
'Current session': 'Sesión en curso',
|
||||
'DESIGN': 'DISEÑO',
|
||||
'Date and Time': 'Fecha y Hora',
|
||||
'Delete': 'Elimine',
|
||||
'Delete:': 'Elimine:',
|
||||
'Deploy on Google App Engine': 'Instale en Google App Engine',
|
||||
'Description': 'Descripción',
|
||||
'Design for': 'Diseño para',
|
||||
'E-mail': 'Correo electrónico',
|
||||
'EDIT': 'EDITAR',
|
||||
'Edit Profile': 'Editar Perfil',
|
||||
'Edit application': 'Editar aplicación',
|
||||
'Edit current record': 'Edite el registro actual',
|
||||
'Editing Language file': 'Editando archivo de lenguaje',
|
||||
'Editing file': 'Editando archivo',
|
||||
'Editing file "%s"': 'Editando archivo "%s"',
|
||||
'Enterprise Web Framework': 'Armazón Empresarial para Internet',
|
||||
'Error': 'Error',
|
||||
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
|
||||
'Exception instance attributes': 'Atributos de la instancia de Excepción',
|
||||
'File': 'File',
|
||||
'First name': 'Nombre',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
|
||||
'Group ID': 'ID de Grupo',
|
||||
'Hello World': 'Hola Mundo',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Si el reporte anterior contiene un número de tiquete este indica un falla en la ejecución del controlador, antes de cualquier intento de ejecutat doctests. Esto generalmente se debe a un error en la indentación o un error por fuera del código de la función.\r\nUn titulo verde indica que todas las pruebas pasaron (si existen). En dicho caso los resultados no se muestran.',
|
||||
'Import/Export': 'Importar/Exportar',
|
||||
'Installed applications': 'Aplicaciones instaladas',
|
||||
'Internal State': 'Estado Interno',
|
||||
'Invalid Query': 'Consulta inválida',
|
||||
'Invalid action': 'Acción inválida',
|
||||
'Invalid email': 'Correo inválido',
|
||||
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
|
||||
'Languages': 'Lenguajes',
|
||||
'Last name': 'Apellido',
|
||||
'Last saved on:': 'Guardado en:',
|
||||
'License for': 'Licencia para',
|
||||
'Login': 'Inicio de sesión',
|
||||
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
|
||||
'Logout': 'Fin de sesión',
|
||||
'Lost Password': 'Contraseña perdida',
|
||||
'Models': 'Modelos',
|
||||
'Modules': 'Módulos',
|
||||
'NO': 'NO',
|
||||
'Name': 'Nombre',
|
||||
'New Record': 'Registro nuevo',
|
||||
'No databases in this application': 'No hay bases de datos en esta aplicación',
|
||||
'Origin': 'Origen',
|
||||
'Original/Translation': 'Original/Traducción',
|
||||
'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, no puede cambiar la contraseña aquí',
|
||||
'Password': 'Contraseña',
|
||||
'Peeking at file': 'Visualizando archivo',
|
||||
'Plugin "%s" in application': 'Plugin "%s" en aplicación',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Este sitio usa',
|
||||
'Query:': 'Consulta:',
|
||||
'Record ID': 'ID de Registro',
|
||||
'Register': 'Registrese',
|
||||
'Registration key': 'Contraseña de Registro',
|
||||
'Resolve Conflict file': 'archivo Resolución de Conflicto',
|
||||
'Role': 'Rol',
|
||||
'Rows in table': 'Filas en la tabla',
|
||||
'Rows selected': 'Filas seleccionadas',
|
||||
'Saved file hash:': 'Hash del archivo guardado:',
|
||||
'Static files': 'Archivos estáticos',
|
||||
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
|
||||
'TM': 'MR',
|
||||
'Table name': 'Nombre de la tabla',
|
||||
'Testing application': 'Probando aplicación',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
|
||||
'There are no controllers': 'No hay controladores',
|
||||
'There are no models': 'No hay modelos',
|
||||
'There are no modules': 'No hay módulos',
|
||||
'There are no static files': 'No hay archivos estáticos',
|
||||
'There are no translators, only default language is supported': 'No hay traductores, sólo el lenguaje por defecto es soportado',
|
||||
'There are no views': 'No hay vistas',
|
||||
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
|
||||
'Ticket': 'Tiquete',
|
||||
'Timestamp': 'Timestamp',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Para crear un plugin, nombre un archivo/carpeta plugin_[nombre]',
|
||||
'Unable to check for upgrades': 'No es posible verificar la existencia de actualizaciones',
|
||||
'Unable to download': 'No es posible la descarga',
|
||||
'Unable to download app': 'No es posible descargar la aplicación',
|
||||
'Unable to download app because:': 'No es posible descargar la aplicación porque:',
|
||||
'Unable to download because': 'No es posible descargar porque',
|
||||
'Update:': 'Actualice:',
|
||||
'Upload & install packed application': 'Suba e instale aplicación empaquetada',
|
||||
'Upload existing application': 'Suba esta aplicación',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
|
||||
'User ID': 'ID de Usuario',
|
||||
'Version': 'Versión',
|
||||
'Views': 'Vistas',
|
||||
'Welcome to web2py': 'Bienvenido a web2py',
|
||||
'YES': 'SI',
|
||||
'About': 'acerca de',
|
||||
'additional code for your application': 'código adicional para su aplicación',
|
||||
'admin disabled because no admin password': ' por falta de contraseña',
|
||||
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
|
||||
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
|
||||
'and rename it (required):': 'y renombrela (requerido):',
|
||||
'and rename it:': ' y renombrelo:',
|
||||
'appadmin': 'appadmin',
|
||||
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
|
||||
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
|
||||
'application compiled': 'aplicación compilada',
|
||||
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
|
||||
'arguments': 'argumentos',
|
||||
'back': 'atrás',
|
||||
'browse': 'buscar',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
|
||||
'cannot create file': 'no es posible crear archivo',
|
||||
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
|
||||
'Change admin password': 'cambie contraseña admin',
|
||||
'check all': 'marcar todos',
|
||||
'Clean': 'limpiar',
|
||||
'click here for online examples': 'haga clic aquí para ver ejemplos en línea',
|
||||
'click here for the administrative interface': 'haga clic aquí para usar la interfaz administrativa',
|
||||
'click to check for upgrades': 'haga clic para buscar actualizaciones',
|
||||
'click to open': 'click to open',
|
||||
'code': 'código',
|
||||
'commit (mercurial)': 'commit (mercurial)',
|
||||
'Compile': 'compilar',
|
||||
'compiled application removed': 'aplicación compilada removida',
|
||||
'controllers': 'controladores',
|
||||
'Create': 'crear',
|
||||
'create file with filename:': 'cree archivo con nombre:',
|
||||
'create new application:': 'nombre de la nueva aplicación:',
|
||||
'created by': 'creado por',
|
||||
'crontab': 'crontab',
|
||||
'currently saved or': 'actualmente guardado o',
|
||||
'customize me!': 'Adaptame!',
|
||||
'data uploaded': 'datos subidos',
|
||||
'database': 'base de datos',
|
||||
'database %s select': 'selección en base de datos %s',
|
||||
'database administration': 'administración base de datos',
|
||||
'db': 'db',
|
||||
'defines tables': 'define tablas',
|
||||
'delete': 'eliminar',
|
||||
'delete all checked': 'eliminar marcados',
|
||||
'delete plugin': 'eliminar plugin',
|
||||
'design': 'modificar',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': 'listo!',
|
||||
'Edit': 'editar',
|
||||
'edit controller': 'editar controlador',
|
||||
'edit views:': 'editar vistas:',
|
||||
'Errors': 'errores',
|
||||
'export as csv file': 'exportar como archivo CSV',
|
||||
'exposes': 'expone',
|
||||
'extends': 'extiende',
|
||||
'failed to reload module': 'recarga del módulo ha fallado',
|
||||
'failed to reload module because:': 'no es posible recargar el módulo por:',
|
||||
'file "%(filename)s" created': 'archivo "%(filename)s" creado',
|
||||
'file "%(filename)s" deleted': 'archivo "%(filename)s" eliminado',
|
||||
'file "%(filename)s" uploaded': 'archivo "%(filename)s" subido',
|
||||
'file "%(filename)s" was not deleted': 'archivo "%(filename)s" no fué eliminado',
|
||||
'file "%s" of %s restored': 'archivo "%s" de %s restaurado',
|
||||
'file changed on disk': 'archivo modificado en el disco',
|
||||
'file does not exist': 'archivo no existe',
|
||||
'file saved on %(time)s': 'archivo guardado %(time)s',
|
||||
'file saved on %s': 'archivo guardado %s',
|
||||
'Help': 'ayuda',
|
||||
'htmledit': 'htmledit',
|
||||
'includes': 'incluye',
|
||||
'insert new': 'inserte nuevo',
|
||||
'insert new %s': 'inserte nuevo %s',
|
||||
'Install': 'instalar',
|
||||
'internal error': 'error interno',
|
||||
'invalid password': 'contraseña inválida',
|
||||
'invalid request': 'solicitud inválida',
|
||||
'invalid ticket': 'tiquete inválido',
|
||||
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
|
||||
'languages': 'lenguajes',
|
||||
'languages updated': 'lenguajes actualizados',
|
||||
'loading...': 'cargando...',
|
||||
'login': 'inicio de sesión',
|
||||
'Logout': 'fin de sesión',
|
||||
'manage': 'manage',
|
||||
'merge': 'combinar',
|
||||
'models': 'modelos',
|
||||
'modules': 'módulos',
|
||||
'new application "%s" created': 'nueva aplicación "%s" creada',
|
||||
'new plugin installed': 'nuevo plugin instalado',
|
||||
'new record inserted': 'nuevo registro insertado',
|
||||
'next 100 rows': '100 filas siguientes',
|
||||
'no match': 'no encontrado',
|
||||
'or import from csv file': 'o importar desde archivo CSV',
|
||||
'or provide app url:': 'o provea URL de la aplicación:',
|
||||
'or provide application url:': 'o provea URL de la aplicación:',
|
||||
'Overwrite installed app': 'sobreescriba aplicación instalada',
|
||||
'Pack all': 'empaquetar todo',
|
||||
'Pack compiled': 'empaquete compiladas',
|
||||
'pack plugin': 'empaquetar plugin',
|
||||
'password changed': 'contraseña cambiada',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
|
||||
'previous 100 rows': '100 filas anteriores',
|
||||
'record': 'registro',
|
||||
'record does not exist': 'el registro no existe',
|
||||
'record id': 'id de registro',
|
||||
'Remove compiled': 'eliminar compiladas',
|
||||
'restore': 'restaurar',
|
||||
'revert': 'revertir',
|
||||
'save': 'guardar',
|
||||
'selected': 'seleccionado(s)',
|
||||
'session expired': 'sesión expirada',
|
||||
'shell': 'shell',
|
||||
'Site': 'sitio',
|
||||
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
|
||||
'state': 'estado',
|
||||
'static': 'estáticos',
|
||||
'submit': 'enviar',
|
||||
'table': 'tabla',
|
||||
'test': 'probar',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
|
||||
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
|
||||
'the presentations layer, views are also known as templates': 'la capa de presentación, las vistas también son llamadas plantillas',
|
||||
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
|
||||
'to previous version.': 'a la versión previa.',
|
||||
'translation strings for the application': 'cadenas de caracteres de traducción para la aplicación',
|
||||
'try': 'intente',
|
||||
'try something like': 'intente algo como',
|
||||
'unable to create application "%s"': 'no es posible crear la aplicación "%s"',
|
||||
'unable to delete file "%(filename)s"': 'no es posible eliminar el archivo "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'no es posible eliminar plugin "%(plugin)s"',
|
||||
'unable to parse csv file': 'no es posible analizar el archivo CSV',
|
||||
'unable to uninstall "%s"': 'no es posible instalar "%s"',
|
||||
'unable to upgrade because "%s"': 'no es posible actualizar porque "%s"',
|
||||
'uncheck all': 'desmarcar todos',
|
||||
'Uninstall': 'desinstalar',
|
||||
'update': 'actualizar',
|
||||
'update all languages': 'actualizar todos los lenguajes',
|
||||
'upgrade web2py now': 'actualize web2py ahora',
|
||||
'upload application:': 'subir aplicación:',
|
||||
'upload file:': 'suba archivo:',
|
||||
'upload plugin file:': 'suba archivo de plugin:',
|
||||
'variables': 'variables',
|
||||
'versioning': 'versiones',
|
||||
'view': 'vista',
|
||||
'views': 'vistas',
|
||||
'web2py Recent Tweets': 'Tweets Recientes de web2py',
|
||||
'web2py is up to date': 'web2py está actualizado',
|
||||
'web2py upgraded; please restart it': 'web2py actualizado; favor reiniciar',
|
||||
}
|
||||
279
applications/admin/languages/fr-fr.py
Normal file
@@ -0,0 +1,279 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression en option tels que "field1 = \'newvalue\'". Vous ne pouvez pas mettre à jour ou supprimer les résultats d\'une jointure "a JOIN"',
|
||||
'%Y-%m-%d': '%d-%m-%Y',
|
||||
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
|
||||
'%s rows deleted': 'lignes %s supprimé',
|
||||
'%s rows updated': 'lignes %s mis à jour',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(quelque chose comme "it-it") ',
|
||||
'A new version of web2py is available: %s': 'Une nouvelle version de web2py est disponible: %s ',
|
||||
'A new version of web2py is available: Version 1.68.2 (2009-10-21 09:59:29)\n': 'Une nouvelle version de web2py est disponible: Version 1.68.2 (2009-10-21 09:59:29)\r\n',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATTENTION: nécessite une connexion sécurisée (HTTPS) ou être en localhost. ',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: les tests ne sont pas thread-safe DONC NE PAS EFFECTUER DES TESTS MULTIPLES SIMULTANÉMENT.',
|
||||
'ATTENTION: you cannot edit the running application!': "ATTENTION: vous ne pouvez pas modifier l'application qui tourne!",
|
||||
'About': 'À propos',
|
||||
'About application': "A propos de l'application",
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'Admin is disabled because insecure channel': 'Admin est désactivé parce que canal non sécurisé',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': 'Mot de passe Administrateur:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Etes-vous sûr de vouloir supprimer le fichier «%s»?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Etes-vous sûr de vouloir effacer le plugin "%s"?',
|
||||
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
|
||||
'Are you sure you want to uninstall application "%s"?': "Êtes-vous sûr de vouloir désinstaller l'application «%s»?",
|
||||
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
|
||||
'Available databases and tables': 'Bases de données et tables disponible',
|
||||
'Cannot be empty': 'Ne peut pas être vide',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Ne peut pas compiler: il y a des erreurs dans votre application. corriger les erreurs et essayez à nouveau.',
|
||||
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
|
||||
'Check to delete': 'Cocher pour supprimer',
|
||||
'Checking for upgrades...': 'Vérification des mises à jour ... ',
|
||||
'Controllers': 'Contrôleurs',
|
||||
'Create new simple application': 'Créer une nouvelle application',
|
||||
'Current request': 'Requête actuel',
|
||||
'Current response': 'Réponse actuelle',
|
||||
'Current session': 'Session en cours',
|
||||
'Date and Time': 'Date et heure',
|
||||
'Delete': 'Supprimer',
|
||||
'Delete this file (you will be asked to confirm deletion)': 'Delete this file (you will be asked to confirm deletion)',
|
||||
'Delete:': 'Supprimer:',
|
||||
'Deploy on Google App Engine': 'Déployer sur Google App Engine',
|
||||
'EDIT': 'MODIFIER',
|
||||
'Edit application': "Modifier l'application",
|
||||
'Edit current record': 'Modifier cet entrée',
|
||||
'Editing Language file': 'Modifier le fichier de langue',
|
||||
'Editing file': 'Modifier le fichier',
|
||||
'Editing file "%s"': 'Modifier le fichier "% s" ',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Journal d\'erreurs pour "%(app)s"',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Des fonctions sans doctests entraînera tests [passed] .',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': "Si le rapport ci-dessus contient un numéro de ticket, cela indique une défaillance dans l'exécution du contrôleur, avant toute tentative d'exécuter les doctests. Cela est généralement dû à une erreur d'indentation ou une erreur à l'extérieur du code de la fonction.\r\nUn titre verte indique que tous les tests (si définie) passed. Dans ce cas, les résultats des essais ne sont pas affichées.",
|
||||
'Import/Export': 'Importer/Exporter',
|
||||
'Installed applications': 'Les applications installées',
|
||||
'Internal State': 'État Interne',
|
||||
'Invalid Query': 'Requête non valide',
|
||||
'Invalid action': 'Action non valide',
|
||||
'Language files (static strings) updated': 'Fichiers de langue (static strings) Mise à jour ',
|
||||
'Languages': 'Langues',
|
||||
'Last saved on:': 'Dernière sauvegarde le:',
|
||||
'License for': 'Licence pour',
|
||||
'Login': 'Connexion',
|
||||
'Login to the Administrative Interface': "Se connecter à l'interface d'administration",
|
||||
'Models': 'Modèles',
|
||||
'Modules': 'Modules',
|
||||
'NO': 'NON',
|
||||
'New Record': 'Nouvel Entrée',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'Aucune base de données dans cette application',
|
||||
'Original/Translation': 'Original / Traduction',
|
||||
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
|
||||
'Peeking at file': 'Jeter un oeil au fichier',
|
||||
'Plugin "%s" in application': 'Plugin "%s" dans l\'application',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Propulsé par',
|
||||
'Query:': 'Requête: ',
|
||||
'Resolve Conflict file': 'Résoudre les conflits de fichiers',
|
||||
'Rows in table': 'Lignes de la table',
|
||||
'Rows selected': 'Lignes sélectionnées',
|
||||
"Run tests in this file (to run all files, you may also use the button labelled 'test')": "Run tests in this file (to run all files, you may also use the button labelled 'test')",
|
||||
'Save': 'Save',
|
||||
'Saved file hash:': 'Hash du Fichier enregistré:',
|
||||
'Searching:': 'Searching:',
|
||||
'Static files': 'Fichiers statiques',
|
||||
'Sure you want to delete this object?': 'Vous êtes sûr de vouloir supprimer cet objet? ',
|
||||
'TM': 'MD',
|
||||
'Testing application': "Test de l'application",
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "requête" est une condition comme "db.table1.field1==\'value\'". Quelque chose comme "db.table1.field1==db.table2.field2" aboutit à un JOIN SQL.',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no controllers': "Il n'existe pas de contrôleurs",
|
||||
'There are no models': "Il n'existe pas de modèles",
|
||||
'There are no modules': "Il n'existe pas de modules",
|
||||
'There are no plugins': 'There are no plugins',
|
||||
'There are no static files': "Il n'existe pas de fichiers statiques",
|
||||
'There are no translators, only default language is supported': "Il n'y a pas de traducteurs, est prise en charge uniquement la langue par défaut",
|
||||
'There are no views': "Il n'existe pas de vues",
|
||||
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
|
||||
'This is the %(filename)s template': 'Ceci est le modèle %(filename)s ',
|
||||
'Ticket': 'Ticket',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Pour créer un plugin, créer un fichier /dossier plugin_[nom]',
|
||||
'Translation strings for the application': 'Translation strings for the application',
|
||||
'Unable to check for upgrades': 'Impossible de vérifier les mises à niveau',
|
||||
'Unable to download': 'Impossible de télécharger',
|
||||
'Unable to download app': 'Impossible de télécharger app',
|
||||
'Unable to download app because:': 'Unable to download app because:',
|
||||
'Unable to download because': 'Unable to download because',
|
||||
'Update:': 'Mise à jour:',
|
||||
'Upload & install packed application': 'Upload & install packed application',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload existing application': 'charger une application existante',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Utilisez (...)&(...) pour AND, (...)|(...) pour OR, et ~(...) pour NOT et construire des requêtes plus complexes. ',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'Version',
|
||||
'Views': 'Vues',
|
||||
'Web Framework': 'Web Framework',
|
||||
'YES': 'OUI',
|
||||
'About': 'à propos',
|
||||
'additional code for your application': 'code supplémentaire pour votre application',
|
||||
'admin disabled because no admin password': 'admin désactivé car aucun mot de passe admin',
|
||||
'admin disabled because not supported on google app engine': 'admin désactivé car non pris en charge sur Google Apps engine',
|
||||
'admin disabled because unable to access password file': "admin désactivé car incapable d'accéder au fichier mot de passe",
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'et renommez-la (obligatoire):',
|
||||
'and rename it:': 'et renommez-le:',
|
||||
'appadmin': 'appadmin',
|
||||
'appadmin is disabled because insecure channel': 'appadmin est désactivé parce que canal non sécurisé',
|
||||
'application "%s" uninstalled': 'application "%s" désinstallé',
|
||||
'application %(appname)s installed with md5sum: %(digest)s': 'application %(appname)s installed with md5sum: %(digest)s',
|
||||
'application compiled': 'application compilée',
|
||||
'application is compiled and cannot be designed': "l'application est compilée et ne peut être désigné",
|
||||
'arguments': 'arguments',
|
||||
'back': 'retour',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'cache, erreurs et sessions nettoyé',
|
||||
'cannot create file': 'ne peu pas créer de fichier',
|
||||
'cannot upload file "%(filename)s"': 'ne peu pas charger le fichier "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'check all': 'tous vérifier ',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'nettoyer',
|
||||
'click to check for upgrades': 'Cliquez pour vérifier les mises à niveau',
|
||||
'code': 'code',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'Compile': 'compiler',
|
||||
'compiled application removed': 'application compilée enlevé',
|
||||
'controllers': 'contrôleurs',
|
||||
'Create': 'create',
|
||||
'create file with filename:': 'créer un fichier avec nom de fichier:',
|
||||
'create new application:': 'créer une nouvelle application:',
|
||||
'created by': 'créé par',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'actuellement enregistrés ou',
|
||||
'data uploaded': 'données chargées',
|
||||
'database': 'base de données',
|
||||
'database %s select': 'base de données %s sélectionner',
|
||||
'database administration': 'administration base de données',
|
||||
'db': 'db',
|
||||
'defines tables': 'définit les tables',
|
||||
'delete': 'supprimer',
|
||||
'delete all checked': 'supprimer tout ce qui est cocher',
|
||||
'delete plugin': ' supprimer plugin',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'conception',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'docs': 'docs',
|
||||
'done!': 'fait!',
|
||||
'download layouts': 'download layouts',
|
||||
'download plugins': 'download plugins',
|
||||
'Edit': 'modifier',
|
||||
'edit controller': 'modifier contrôleur',
|
||||
'edit views:': 'edit views:',
|
||||
'Errors': 'erreurs',
|
||||
'export as csv file': 'exportation au format CSV',
|
||||
'exposes': 'expose',
|
||||
'exposes:': 'exposes:',
|
||||
'extends': 'étend',
|
||||
'failed to reload module': 'impossible de recharger le module',
|
||||
'failed to reload module because:': 'failed to reload module because:',
|
||||
'file "%(filename)s" created': 'fichier "%(filename)s" créé',
|
||||
'file "%(filename)s" deleted': 'fichier "%(filename)s" supprimé',
|
||||
'file "%(filename)s" uploaded': 'fichier "%(filename)s" chargé',
|
||||
'file "%s" of %s restored': 'fichier "%s" de %s restauré',
|
||||
'file changed on disk': 'fichier modifié sur le disque',
|
||||
'file does not exist': "fichier n'existe pas",
|
||||
'file saved on %(time)s': 'fichier enregistré le %(time)s',
|
||||
'file saved on %s': 'fichier enregistré le %s',
|
||||
'files': 'files',
|
||||
'filter': 'filter',
|
||||
'Help': 'aide',
|
||||
'htmledit': 'edition html',
|
||||
'includes': 'inclus',
|
||||
'index': 'index',
|
||||
'insert new': 'insérer nouveau',
|
||||
'insert new %s': 'insérer nouveau %s',
|
||||
'Install': 'install',
|
||||
'internal error': 'erreur interne',
|
||||
'invalid password': 'mot de passe invalide',
|
||||
'invalid request': 'Demande incorrecte',
|
||||
'invalid ticket': 'ticket non valide',
|
||||
'language file "%(filename)s" created/updated': 'fichier de langue "%(filename)s" créé/mis à jour',
|
||||
'languages': 'langues',
|
||||
'loading...': 'Chargement ...',
|
||||
'login': 'connexion',
|
||||
'Logout': 'déconnexion',
|
||||
'merge': 'fusionner',
|
||||
'models': 'modèles',
|
||||
'modules': 'modules',
|
||||
'new application "%s" created': 'nouvelle application "%s" créée',
|
||||
'new plugin installed': 'nouveau plugin installé',
|
||||
'new record inserted': 'nouvelle entrée inséré',
|
||||
'next 100 rows': '100 lignes suivantes',
|
||||
'no match': 'no match',
|
||||
'or import from csv file': 'ou importer depuis un fichier CSV ',
|
||||
'or provide app url:': 'or provide app url:',
|
||||
'or provide application url:': "ou fournir l'URL de l'application:",
|
||||
'Overwrite installed app': 'overwrite installed app',
|
||||
'Pack all': 'tout empaqueter',
|
||||
'Pack compiled': 'paquet compilé',
|
||||
'pack plugin': 'paquet plugin',
|
||||
'password changed': 'password changed',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" supprimé',
|
||||
'plugins': 'plugins',
|
||||
'previous 100 rows': '100 lignes précédentes',
|
||||
'record': 'entrée',
|
||||
'record does not exist': "l'entrée n'existe pas",
|
||||
'record id': 'id entrée',
|
||||
'Remove compiled': 'retirer compilé',
|
||||
'restore': 'restaurer',
|
||||
'revert': 'revenir',
|
||||
'save': 'sauver',
|
||||
'selected': 'sélectionnés',
|
||||
'session expired': 'la session a expiré ',
|
||||
'shell': 'shell',
|
||||
'Site': 'site',
|
||||
'some files could not be removed': 'certains fichiers ne peuvent pas être supprimés',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'état',
|
||||
'static': 'statiques',
|
||||
'submit': 'envoyer',
|
||||
'table': 'table',
|
||||
'test': 'tester',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': "la logique de l'application, chaque route URL est mappé dans une fonction exposée dans le contrôleur",
|
||||
'the data representation, define database tables and sets': 'la représentation des données, défini les tables de bases de données et sets',
|
||||
'the presentations layer, views are also known as templates': 'la couche des présentations, les vues sont également connus en tant que modèles',
|
||||
'these files are served without processing, your images go here': 'ces fichiers sont servis sans transformation, vos images vont ici',
|
||||
'to previous version.': 'à la version précédente.',
|
||||
'translation strings for the application': "chaînes de traduction de l'application",
|
||||
'try': 'essayer',
|
||||
'try something like': 'essayez quelque chose comme',
|
||||
'unable to create application "%s"': 'impossible de créer l\'application "%s"',
|
||||
'unable to delete file "%(filename)s"': 'impossible de supprimer le fichier "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'impossible de supprimer le plugin "%(plugin)s"',
|
||||
'unable to parse csv file': "impossible d'analyser les fichiers CSV",
|
||||
'unable to uninstall "%s"': 'impossible de désinstaller "%s"',
|
||||
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
|
||||
'uncheck all': 'tout décocher',
|
||||
'Uninstall': 'désinstaller',
|
||||
'update': 'mettre à jour',
|
||||
'update all languages': 'mettre à jour toutes les langues',
|
||||
'upgrade now': 'upgrade now',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload': 'upload',
|
||||
'upload application:': "charger l'application:",
|
||||
'upload file:': 'charger le fichier:',
|
||||
'upload plugin file:': 'charger fichier plugin:',
|
||||
'user': 'user',
|
||||
'variables': 'variables',
|
||||
'versioning': 'versioning',
|
||||
'view': 'vue',
|
||||
'views': 'vues',
|
||||
'web2py Recent Tweets': 'web2py Tweets récentes',
|
||||
'web2py is up to date': 'web2py est à jour',
|
||||
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
|
||||
}
|
||||
270
applications/admin/languages/he.py
Normal file
@@ -0,0 +1,270 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"עדכן" הוא ביטוי אופציונאלי, כגון "field1=newvalue". אינך יוכל להשתמש בjoin, בעת שימוש ב"עדכן" או "מחק".',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': '%s רשומות נמחקו',
|
||||
'%s rows updated': '%s רשומות עודכנו',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(למשל "it-it")',
|
||||
'A new version of web2py is available: %s': 'גירסא חדשה של web2py זמינה: %s',
|
||||
'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\n': 'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\r\n',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'לתשומת ליבך: ניתן להתחבר רק בערוץ מאובטח (HTTPS) או מlocalhost',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'לתשומת ליבך: אין לערוך מספר בדיקות במקביל, שכן הן עשויות להפריע זו לזו',
|
||||
'ATTENTION: you cannot edit the running application!': 'לתשומת ליבך: לא ניתן לערוך אפליקציה בזמן הרצתה',
|
||||
'About': 'אודות',
|
||||
'About application': 'אודות אפליקציה',
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'Admin is disabled because insecure channel': 'ממשק האדמין נוטרל בשל גישה לא מאובטחת',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': 'סיסמת מנהל',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'האם אתה בטוח שברצונך למחוק את הקובץ "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'האם אתה בטוח שברצונך למחוק את התוסף "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"?': 'האם אתה בטוח שברצונך להסיר את האפליקציה "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'האם אתה בטוח שאתה רוצה לשדרג את web2py עכשיו?',
|
||||
'Available databases and tables': 'מסדי נתונים וטבלאות זמינים',
|
||||
'Cannot be empty': 'אינו יכול להישאר ריק',
|
||||
'Cannot compile: there are errors in your app:': 'לא ניתן לקמפל: ישנן שגיאות באפליקציה שלך:',
|
||||
'Check to delete': 'סמן כדי למחוק',
|
||||
'Checking for upgrades...': 'מחפש עדכונים',
|
||||
'Controllers': 'בקרים',
|
||||
'Create new simple application': 'צור אפליקציה חדשה',
|
||||
'Current request': 'בקשה נוכחית',
|
||||
'Current response': 'מענה נוכחי',
|
||||
'Current session': 'סשן זה',
|
||||
'Date and Time': 'תאריך ושעה',
|
||||
'Delete': 'מחק',
|
||||
'Delete:': 'מחק:',
|
||||
'Deploy on Google App Engine': 'העלה ל Google App Engine',
|
||||
'Detailed traceback description': 'Detailed traceback description',
|
||||
'EDIT': 'ערוך!',
|
||||
'Edit application': 'ערוך אפליקציה',
|
||||
'Edit current record': 'ערוך רשומה נוכחית',
|
||||
'Editing Language file': 'עורך את קובץ השפה',
|
||||
'Editing file "%s"': 'עורך את הקובץ "%s"',
|
||||
'Enterprise Web Framework': 'סביבת הפיתוח לרשת',
|
||||
'Error logs for "%(app)s"': 'דו"ח שגיאות עבור אפליקציה "%(app)s"',
|
||||
'Error snapshot': 'Error snapshot',
|
||||
'Error ticket': 'Error ticket',
|
||||
'Exception instance attributes': 'נתוני החריגה',
|
||||
'Frames': 'Frames',
|
||||
'Functions with no doctests will result in [passed] tests.': 'פונקציות שלא הוגדר להן doctest ירשמו כבדיקות ש[עברו בהצלחה].',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'אם בדו"ח לעיל מופיע מספר דו"ח שגיאה, זה מצביע על שגיאה בבקר, עוד לפני שניתן היה להריץ את הdoctest. לרוב מדובר בשגיאת הזחה, או שגיאה שאינה בקוד של הפונקציה.\r\nכותרת ירוקה מצביע על כך שכל הבדיקות (אם הוגדרו) עברו בהצלחה, במידה ותוצאות הבדיקה אינן מופיעות.',
|
||||
'Import/Export': 'יבא\יצא',
|
||||
'Installed applications': 'אפליקציות מותקנות',
|
||||
'Internal State': 'מצב מובנה',
|
||||
'Invalid Query': 'שאילתה לא תקינה',
|
||||
'Invalid action': 'הוראה לא קיימת',
|
||||
'Language files (static strings) updated': 'קובץ השפה (מחרוזות סטאטיות) עודכן',
|
||||
'Languages': 'שפות',
|
||||
'Last saved on:': 'לאחרונה נשמר בתאריך:',
|
||||
'License for': 'רשיון עבור',
|
||||
'Login': 'התחבר',
|
||||
'Login to the Administrative Interface': 'התחבר לממשק המנהל',
|
||||
'Models': 'מבני נתונים',
|
||||
'Modules': 'מודולים',
|
||||
'NO': 'לא',
|
||||
'New Record': 'רשומה חדשה',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'אין מסדי נתונים לאפליקציה זו',
|
||||
'Original/Translation': 'מקור\תרגום',
|
||||
'PAM authenticated user, cannot change password here': 'שינוי סיסמא באמצעות PAM אינו יכול להתבצע כאן',
|
||||
'Peeking at file': 'מעיין בקובץ',
|
||||
'Plugin "%s" in application': 'פלאגין "%s" של אפליקציה',
|
||||
'Plugins': 'תוספים',
|
||||
'Powered by': 'מופעל ע"י',
|
||||
'Query:': 'שאילתה:',
|
||||
'Resolve Conflict file': 'הסר קובץ היוצר קונפליקט',
|
||||
'Rows in table': 'רשומות בטבלה',
|
||||
'Rows selected': 'רשומות נבחרו',
|
||||
'Saved file hash:': 'גיבוב הקובץ השמור:',
|
||||
'Static files': 'קבצים סטאטיים',
|
||||
'Sure you want to delete this object?': 'האם אתה בטוח שברצונך למחוק אובייקט זה?',
|
||||
'TM': 'סימן רשום',
|
||||
'Testing application': 'בודק את האפליקציה',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"שאליתה" היא תנאי כגון "db1.table1.filed1=\'value\'" ביטוי כמו db.table1.field1=db.table2.field1 יחולל join',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no controllers': 'אין בקרים',
|
||||
'There are no models': 'אין מבני נתונים',
|
||||
'There are no modules': 'אין מודולים',
|
||||
'There are no plugins': 'There are no plugins',
|
||||
'There are no static files': 'אין קבצים סטאטיים',
|
||||
'There are no translators, only default language is supported': 'אין תרגומים. רק שפת ברירת המחדל נתמכת',
|
||||
'There are no views': 'אין קבצי תצוגה',
|
||||
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
|
||||
'This is the %(filename)s template': 'זוהי תבנית הקובץ %(filename)s ',
|
||||
'Ticket': 'דו"ח שגיאה',
|
||||
'Ticket ID': 'Ticket ID',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'כדי ליצור תוסף, קרא לקובץ או סיפריה בשם לפי התבנית plugin_[name]',
|
||||
'Traceback': 'Traceback',
|
||||
'Translation strings for the application': 'Translation strings for the application',
|
||||
'Unable to check for upgrades': 'לא ניתן היה לבדוק אם יש שדרוגים',
|
||||
'Unable to download app because:': 'לא ניתן היה להוריד את האפליקציה כי:',
|
||||
'Unable to download because': 'לא הצלחתי להוריד כי',
|
||||
'Update:': 'עדכן:',
|
||||
'Upload & install packed application': 'העלה והתקן אפליקציה ארוזה',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'השתמש ב (...)&(...) עבור תנאי AND, (...)|(...) עבור תנאי OR ו~(...) עבור תנאי NOT ליצירת שאילתות מורכבות',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'גירסא',
|
||||
'Views': 'מראה',
|
||||
'YES': 'כן',
|
||||
'About': 'אודות',
|
||||
'additional code for your application': 'קוד נוסף עבור האפליקציה שלך',
|
||||
'admin disabled because no admin password': 'ממשק המנהל מנוטרל כי לא הוגדרה סיסמת מנהל',
|
||||
'admin disabled because not supported on google app engine': 'ממשק המנהל נוטרל, כי אין תמיכה בGoogle app engine',
|
||||
'admin disabled because unable to access password file': 'ממשק מנהל נוטרל, כי לא ניתן לגשת לקובץ הסיסמאות',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'ושנה את שמו (חובה):',
|
||||
'and rename it:': 'ושנה את שמו:',
|
||||
'appadmin': 'מנהל מסד הנתונים',
|
||||
'appadmin is disabled because insecure channel': 'מנהל מסד הנתונים נוטרל בשל ערוץ לא מאובטח',
|
||||
'application "%s" uninstalled': 'אפליקציה "%s" הוסרה',
|
||||
'application compiled': 'אפליקציה קומפלה',
|
||||
'application is compiled and cannot be designed': 'לא ניתן לערוך אפליקציה מקומפלת',
|
||||
'arguments': 'פרמטרים',
|
||||
'back': 'אחורה',
|
||||
'cache': 'מטמון',
|
||||
'cache, errors and sessions cleaned': 'מטמון, שגיאות וסשן נוקו',
|
||||
'cannot create file': 'לא מצליח ליצור קובץ',
|
||||
'cannot upload file "%(filename)s"': 'לא הצלחתי להעלות את הקובץ "%(filename)s"',
|
||||
'Change admin password': 'סיסמת מנהל שונתה',
|
||||
'check all': 'סמן הכל',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'נקה',
|
||||
'click to check for upgrades': 'לחץ כדי לחפש עדכונים',
|
||||
'code': 'קוד',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'Compile': 'קמפל',
|
||||
'compiled application removed': 'אפליקציה מקומפלת הוסרה',
|
||||
'controllers': 'בקרים',
|
||||
'Create': 'צור',
|
||||
'create file with filename:': 'צור קובץ בשם:',
|
||||
'create new application:': 'צור אפליקציה חדשה:',
|
||||
'created by': 'נוצר ע"י',
|
||||
'crontab': 'משימות מתוזמנות',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'נשמר כעת או',
|
||||
'data uploaded': 'המידע הועלה',
|
||||
'database': 'מסד נתונים',
|
||||
'database %s select': 'מסד הנתונים %s נבחר',
|
||||
'database administration': 'ניהול מסד נתונים',
|
||||
'db': 'מסד נתונים',
|
||||
'defines tables': 'הגדר טבלאות',
|
||||
'delete': 'מחק',
|
||||
'delete all checked': 'סמן הכל למחיקה',
|
||||
'delete plugin': 'מחק תוסף',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'עיצוב',
|
||||
'direction: ltr': 'direction: rtl',
|
||||
'done!': 'הסתיים!',
|
||||
'download layouts': 'download layouts',
|
||||
'download plugins': 'download plugins',
|
||||
'Edit': 'ערוך',
|
||||
'edit controller': 'ערוך בקר',
|
||||
'edit views:': 'ערוך קיבצי תצוגה:',
|
||||
'Errors': 'שגיאות',
|
||||
'export as csv file': 'יצא לקובץ csv',
|
||||
'exposes': 'חושף את',
|
||||
'extends': 'הרחבה של',
|
||||
'failed to reload module because:': 'נכשל בטעינה חוזרת של מודול בגלל:',
|
||||
'file "%(filename)s" created': 'הקובץ "%(filename)s" נוצר',
|
||||
'file "%(filename)s" deleted': 'הקובץ "%(filename)s" נמחק',
|
||||
'file "%(filename)s" uploaded': 'הקובץ "%(filename)s" הועלה',
|
||||
'file "%s" of %s restored': 'הקובץ "%s" of %s שוחזר',
|
||||
'file changed on disk': 'קובץ שונה על גבי הדיסק',
|
||||
'file does not exist': 'קובץ לא נמצא',
|
||||
'file saved on %(time)s': 'הקובץ נשמר בשעה %(time)s',
|
||||
'file saved on %s': 'הקובץ נשמר ב%s',
|
||||
'filter': 'filter',
|
||||
'Help': 'עזרה',
|
||||
'htmledit': 'עורך ויזואלי',
|
||||
'includes': 'מכיל',
|
||||
'insert new': 'הכנס נוסף',
|
||||
'insert new %s': 'הכנס %s נוסף',
|
||||
'inspect attributes': 'inspect attributes',
|
||||
'Install': 'התקן',
|
||||
'internal error': 'שגיאה מובנית',
|
||||
'invalid password': 'סיסמא שגויה',
|
||||
'invalid request': 'בקשה לא תקינה',
|
||||
'invalid ticket': 'דו"ח שגיאה לא קיים',
|
||||
'language file "%(filename)s" created/updated': 'קובץ השפה "%(filename)s" נוצר\עודכן',
|
||||
'languages': 'שפות',
|
||||
'loading...': 'טוען...',
|
||||
'locals': 'locals',
|
||||
'login': 'התחבר',
|
||||
'Logout': 'התנתק',
|
||||
'merge': 'מזג',
|
||||
'models': 'מבני נתונים',
|
||||
'modules': 'מודולים',
|
||||
'new application "%s" created': 'האפליקציה "%s" נוצרה',
|
||||
'new plugin installed': 'פלאגין חדש הותקן',
|
||||
'new record inserted': 'הרשומה נוספה',
|
||||
'next 100 rows': '100 הרשומות הבאות',
|
||||
'no match': 'לא נמצאה התאמה',
|
||||
'or import from csv file': 'או יבא מקובץ csv',
|
||||
'or provide app url:': 'או ספק כתובת url של אפליקציה',
|
||||
'Overwrite installed app': 'התקן על גבי אפלקציה מותקנת',
|
||||
'Pack all': 'ארוז הכל',
|
||||
'Pack compiled': 'ארוז מקומפל',
|
||||
'pack plugin': 'ארוז תוסף',
|
||||
'password changed': 'סיסמא שונתה',
|
||||
'plugin "%(plugin)s" deleted': 'תוסף "%(plugin)s" נמחק',
|
||||
'plugins': 'plugins',
|
||||
'previous 100 rows': '100 הרשומות הקודמות',
|
||||
'record': 'רשומה',
|
||||
'record does not exist': 'הרשומה אינה קיימת',
|
||||
'record id': 'מזהה רשומה',
|
||||
'Remove compiled': 'הסר מקומפל',
|
||||
'request': 'request',
|
||||
'response': 'response',
|
||||
'restore': 'שחזר',
|
||||
'revert': 'חזור לגירסא קודמת',
|
||||
'selected': 'נבחרו',
|
||||
'session': 'session',
|
||||
'session expired': 'תם הסשן',
|
||||
'shell': 'שורת פקודה',
|
||||
'Site': 'אתר',
|
||||
'some files could not be removed': 'לא ניתן היה להסיר חלק מהקבצים',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'מצב',
|
||||
'static': 'קבצים סטאטיים',
|
||||
'submit': 'שלח',
|
||||
'table': 'טבלה',
|
||||
'test': 'בדיקות',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'הלוגיקה של האפליקציה, כל url ממופה לפונקציה חשופה בבקר',
|
||||
'the data representation, define database tables and sets': 'ייצוג המידע, בו מוגדרים טבלאות ומבנים',
|
||||
'the presentations layer, views are also known as templates': 'שכבת התצוגה, המכונה גם template',
|
||||
'these files are served without processing, your images go here': 'אלו הם קבצים הנשלחים מהשרת ללא עיבוד. הכנס את התמונות כאן',
|
||||
'to previous version.': 'אין גירסא קודמת',
|
||||
'translation strings for the application': 'מחרוזות תרגום עבור האפליקציה',
|
||||
'try': 'נסה',
|
||||
'try something like': 'נסה משהו כמו',
|
||||
'unable to create application "%s"': 'נכשל ביצירת האפליקציה "%s"',
|
||||
'unable to delete file "%(filename)s"': 'נכשל במחיקת הקובץ "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'נכשל במחיקת התוסף "%(plugin)s"',
|
||||
'unable to parse csv file': 'לא הצלחתי לנתח את הקלט של קובץ csv',
|
||||
'unable to uninstall "%s"': 'לא ניתן להסיר את "%s"',
|
||||
'unable to upgrade because "%s"': 'לא ניתן היה לשדרג כי "%s"',
|
||||
'uncheck all': 'הסר סימון מהכל',
|
||||
'Uninstall': 'הסר התקנה',
|
||||
'update': 'עדכן',
|
||||
'update all languages': 'עדכן את כלל קיבצי השפה',
|
||||
'upgrade now': 'upgrade now',
|
||||
'upgrade web2py now': 'שדרג את web2py עכשיו',
|
||||
'upload': 'upload',
|
||||
'upload application:': 'העלה אפליקציה:',
|
||||
'upload file:': 'העלה קובץ:',
|
||||
'upload plugin file:': 'העלה קובץ תוסף:',
|
||||
'variables': 'משתנים',
|
||||
'versioning': 'מנגנון גירסאות',
|
||||
'view': 'הצג',
|
||||
'views': 'מראה',
|
||||
'web2py Recent Tweets': 'ציוצים אחרונים של web2py',
|
||||
'web2py is up to date': 'web2py מותקנת בגירסתה האחרונה',
|
||||
'web2py upgraded; please restart it': 'web2py שודרגה; נא אתחל אותה',
|
||||
}
|
||||
264
applications/admin/languages/it-it.py
Normal file
@@ -0,0 +1,264 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
|
||||
'%Y-%m-%d': '%d/%m/%Y',
|
||||
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
|
||||
'%s rows deleted': '%s righe ("record") cancellate',
|
||||
'%s rows updated': '%s righe ("record") modificate',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(qualcosa simile a "it-it")',
|
||||
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': "ATTENZIONE: L'accesso richiede una connessione sicura (HTTPS) o l'esecuzione di web2py in locale (connessione su localhost)",
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTZIONE: NON ESEGUIRE PIÙ TEST IN PARALLELO (I TEST NON SONO "THREAD SAFE")',
|
||||
'ATTENTION: you cannot edit the running application!': "ATTENZIONE: non puoi modificare l'applicazione correntemente in uso ",
|
||||
'About': 'Informazioni',
|
||||
'About application': "Informazioni sull'applicazione",
|
||||
'Admin is disabled because insecure channel': 'amministrazione disabilitata: comunicazione non sicura',
|
||||
'Administrator Password:': 'Password Amministratore:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Confermi di voler cancellare il file "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Confermi di voler cancellare il plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Confermi di voler disinstallare l\'applicazione "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Confermi di voler aggiornare web2py ora?',
|
||||
'Available databases and tables': 'Database e tabelle disponibili',
|
||||
'Cannot be empty': 'Non può essere vuoto',
|
||||
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
|
||||
'Check to delete': 'Seleziona per cancellare',
|
||||
'Checking for upgrades...': 'Controllo aggiornamenti in corso...',
|
||||
'Controller': 'Controller',
|
||||
'Controllers': 'Controllers',
|
||||
'Copyright': 'Copyright',
|
||||
'Create new simple application': 'Crea nuova applicazione',
|
||||
'Current request': 'Richiesta (request) corrente',
|
||||
'Current response': 'Risposta (response) corrente',
|
||||
'Current session': 'Sessione (session) corrente',
|
||||
'DB Model': 'Modello di DB',
|
||||
'Database': 'Database',
|
||||
'Date and Time': 'Data and Ora',
|
||||
'Delete': 'Cancella',
|
||||
'Delete:': 'Cancella:',
|
||||
'Deploy on Google App Engine': 'Installa su Google App Engine',
|
||||
'EDIT': 'MODIFICA',
|
||||
'Edit': 'Modifica',
|
||||
'Edit This App': 'Modifica questa applicazione',
|
||||
'Edit application': 'Modifica applicazione',
|
||||
'Edit current record': 'Modifica record corrente',
|
||||
'Editing Language file': 'Modifica file linguaggio',
|
||||
'Editing file "%s"': 'Modifica del file "%s"',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Log degli errori per "%(app)s"',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
|
||||
'Hello World': 'Salve Mondo',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
|
||||
'Import/Export': 'Importa/Esporta',
|
||||
'Index': 'Indice',
|
||||
'Installed applications': 'Applicazioni installate',
|
||||
'Internal State': 'Stato interno',
|
||||
'Invalid Query': 'Richiesta (query) non valida',
|
||||
'Invalid action': 'Azione non valida',
|
||||
'Language files (static strings) updated': 'Linguaggi (documenti con stringhe statiche) aggiornati',
|
||||
'Languages': 'Linguaggi',
|
||||
'Last saved on:': 'Ultimo salvataggio:',
|
||||
'Layout': 'Layout',
|
||||
'License for': 'Licenza relativa a',
|
||||
'Login': 'Accesso',
|
||||
'Login to the Administrative Interface': "Accesso all'interfaccia amministrativa",
|
||||
'Main Menu': 'Menu principale',
|
||||
'Menu Model': 'Menu Modelli',
|
||||
'Models': 'Modelli',
|
||||
'Modules': 'Moduli',
|
||||
'NO': 'NO',
|
||||
'New Record': 'Nuovo elemento (record)',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'Nessun database presente in questa applicazione',
|
||||
'Original/Translation': 'Originale/Traduzione',
|
||||
'PAM authenticated user, cannot change password here': 'utente autenticato tramite PAM, impossibile modificare password qui',
|
||||
'Peeking at file': 'Uno sguardo al file',
|
||||
'Plugin "%s" in application': 'Plugin "%s" nell\'applicazione',
|
||||
'Plugins': 'I Plugins',
|
||||
'Powered by': 'Powered by',
|
||||
'Query:': 'Richiesta (query):',
|
||||
'Resolve Conflict file': 'File di risoluzione conflitto',
|
||||
'Rows in table': 'Righe nella tabella',
|
||||
'Rows selected': 'Righe selezionate',
|
||||
'Saved file hash:': 'Hash del file salvato:',
|
||||
'Static files': 'Files statici',
|
||||
'Stylesheet': 'Foglio di stile (stylesheet)',
|
||||
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
|
||||
'TM': 'TM',
|
||||
'Testing application': 'Test applicazione in corsg',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
|
||||
'There are no controllers': 'Non ci sono controller',
|
||||
'There are no models': 'Non ci sono modelli',
|
||||
'There are no modules': 'Non ci sono moduli',
|
||||
'There are no static files': 'Non ci sono file statici',
|
||||
'There are no translators, only default language is supported': 'Non ci sono traduzioni, viene solo supportato il linguaggio di base',
|
||||
'There are no views': 'Non ci sono viste ("view")',
|
||||
'This is the %(filename)s template': 'Questo è il template %(filename)s',
|
||||
'Ticket': 'Ticket',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]',
|
||||
'Unable to check for upgrades': 'Impossibile controllare presenza di aggiornamenti',
|
||||
'Unable to download app because:': 'Impossibile scaricare applicazione perché',
|
||||
'Unable to download because': 'Impossibile scaricare perché',
|
||||
'Update:': 'Aggiorna:',
|
||||
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'Versione',
|
||||
'View': 'Vista',
|
||||
'Views': 'viste',
|
||||
'Welcome %s': 'Benvenuto %s',
|
||||
'Welcome to web2py': 'Benvenuto su web2py',
|
||||
'YES': 'SI',
|
||||
'About': 'informazioni',
|
||||
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
|
||||
'admin disabled because no admin password': 'amministrazione disabilitata per mancanza di password amministrativa',
|
||||
'admin disabled because not supported on google app engine': 'amministrazione non supportata da Google Apps Engine',
|
||||
'admin disabled because unable to access password file': 'amministrazione disabilitata per impossibilità di leggere il file delle password',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'e rinominala (obbligatorio):',
|
||||
'and rename it:': 'e rinominala:',
|
||||
'appadmin': 'appadmin ',
|
||||
'appadmin is disabled because insecure channel': 'amministrazione app (appadmin) disabilitata: comunicazione non sicura',
|
||||
'application "%s" uninstalled': 'applicazione "%s" disinstallata',
|
||||
'application compiled': 'applicazione compilata',
|
||||
'application is compiled and cannot be designed': "l'applicazione è compilata e non si può modificare",
|
||||
'arguments': 'arguments',
|
||||
'back': 'indietro',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
|
||||
'cannot create file': 'impossibile creare il file',
|
||||
'cannot upload file "%(filename)s"': 'impossibile caricare il file "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'change password': 'cambia password',
|
||||
'check all': 'controlla tutto',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'pulisci',
|
||||
'click here for online examples': 'clicca per vedere gli esempi',
|
||||
'click here for the administrative interface': "clicca per l'interfaccia amministrativa",
|
||||
'click to check for upgrades': 'clicca per controllare presenza di aggiornamenti',
|
||||
'code': 'code',
|
||||
'Compile': 'compila',
|
||||
'compiled application removed': "rimosso il codice compilato dell'applicazione",
|
||||
'controllers': 'controllers',
|
||||
'Create': 'crea',
|
||||
'create file with filename:': 'crea un file col nome:',
|
||||
'create new application:': 'create new application:',
|
||||
'created by': 'creato da',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'attualmente salvato o',
|
||||
'customize me!': 'Personalizzami!',
|
||||
'data uploaded': 'dati caricati',
|
||||
'database': 'database',
|
||||
'database %s select': 'database %s select',
|
||||
'database administration': 'amministrazione database',
|
||||
'db': 'db',
|
||||
'defines tables': 'defininisce le tabelle',
|
||||
'delete': 'Cancella',
|
||||
'delete all checked': 'cancella tutti i selezionati',
|
||||
'delete plugin': 'cancella plugin',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'progetta',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': 'fatto!',
|
||||
'Edit': 'modifica',
|
||||
'edit controller': 'modifica controller',
|
||||
'edit profile': 'modifica profilo',
|
||||
'edit views:': 'modifica viste (view):',
|
||||
'Errors': 'errori',
|
||||
'export as csv file': 'esporta come file CSV',
|
||||
'exposes': 'espone',
|
||||
'extends': 'estende',
|
||||
'failed to reload module because:': 'ricaricamento modulo fallito perché:',
|
||||
'file "%(filename)s" created': 'creato il file "%(filename)s"',
|
||||
'file "%(filename)s" deleted': 'cancellato il file "%(filename)s"',
|
||||
'file "%(filename)s" uploaded': 'caricato il file "%(filename)s"',
|
||||
'file "%s" of %s restored': 'ripristinato "%(filename)s"',
|
||||
'file changed on disk': 'il file ha subito una modifica su disco',
|
||||
'file does not exist': 'file inesistente',
|
||||
'file saved on %(time)s': "file salvato nell'istante %(time)s",
|
||||
'file saved on %s': 'file salvato: %s',
|
||||
'Help': 'aiuto',
|
||||
'htmledit': 'modifica come html',
|
||||
'includes': 'include',
|
||||
'insert new': 'inserisci nuovo',
|
||||
'insert new %s': 'inserisci nuovo %s',
|
||||
'Install': 'installa',
|
||||
'internal error': 'errore interno',
|
||||
'invalid password': 'password non valida',
|
||||
'invalid request': 'richiesta non valida',
|
||||
'invalid ticket': 'ticket non valido',
|
||||
'language file "%(filename)s" created/updated': 'file linguaggio "%(filename)s" creato/aggiornato',
|
||||
'languages': 'linguaggi',
|
||||
'loading...': 'caricamento...',
|
||||
'login': 'accesso',
|
||||
'Logout': 'uscita',
|
||||
'merge': 'unisci',
|
||||
'models': 'modelli',
|
||||
'modules': 'moduli',
|
||||
'new application "%s" created': 'creata la nuova applicazione "%s"',
|
||||
'new plugin installed': 'installato nuovo plugin',
|
||||
'new record inserted': 'nuovo record inserito',
|
||||
'next 100 rows': 'prossime 100 righe',
|
||||
'no match': 'nessuna corrispondenza',
|
||||
'or import from csv file': 'oppure importa da file CSV',
|
||||
'or provide app url:': "oppure fornisci url dell'applicazione:",
|
||||
'Overwrite installed app': 'sovrascrivi applicazione installata',
|
||||
'Pack all': 'crea pacchetto',
|
||||
'Pack compiled': 'crea pacchetto del codice compilato',
|
||||
'pack plugin': 'crea pacchetto del plugin',
|
||||
'password changed': 'password modificata',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" cancellato',
|
||||
'previous 100 rows': '100 righe precedenti',
|
||||
'record': 'record',
|
||||
'record does not exist': 'il record non esiste',
|
||||
'record id': 'ID del record',
|
||||
'register': 'registrazione',
|
||||
'Remove compiled': 'rimozione codice compilato',
|
||||
'restore': 'ripristino',
|
||||
'revert': 'versione precedente',
|
||||
'selected': 'selezionato',
|
||||
'session expired': 'sessions scaduta',
|
||||
'shell': 'shell',
|
||||
'Site': 'sito',
|
||||
'some files could not be removed': 'non è stato possibile rimuovere alcuni files',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'stato',
|
||||
'static': 'statico',
|
||||
'submit': 'invia',
|
||||
'table': 'tabella',
|
||||
'test': 'test',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'logica dell\'applicazione, ogni percorso "URL" corrisponde ad una funzione esposta da un controller',
|
||||
'the data representation, define database tables and sets': 'rappresentazione dei dati, definizione di tabelle di database e di "set" ',
|
||||
'the presentations layer, views are also known as templates': 'Presentazione dell\'applicazione, viste (views, chiamate anche "templates")',
|
||||
'these files are served without processing, your images go here': 'questi files vengono serviti così come sono, le immagini vanno qui',
|
||||
'to previous version.': 'torna a versione precedente',
|
||||
'translation strings for the application': "stringhe di traduzioni per l'applicazione",
|
||||
'try': 'prova',
|
||||
'try something like': 'prova qualcosa come',
|
||||
'unable to create application "%s"': 'impossibile creare applicazione "%s"',
|
||||
'unable to delete file "%(filename)s"': 'impossibile rimuovere file "%(plugin)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'impossibile rimuovere file di plugin "%(plugin)s"',
|
||||
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
|
||||
'unable to uninstall "%s"': 'impossibile disinstallare "%s"',
|
||||
'unable to upgrade because "%s"': 'impossibile aggiornare perché "%s"',
|
||||
'uncheck all': 'smarca tutti',
|
||||
'Uninstall': 'disinstalla',
|
||||
'update': 'aggiorna',
|
||||
'update all languages': 'aggiorna tutti i linguaggi',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload application:': 'carica applicazione:',
|
||||
'upload file:': 'carica file:',
|
||||
'upload plugin file:': 'carica file di plugin:',
|
||||
'variables': 'variables',
|
||||
'versioning': 'sistema di versioni',
|
||||
'view': 'vista',
|
||||
'views': 'viste',
|
||||
'web2py Recent Tweets': 'Tweets recenti per web2py',
|
||||
'web2py is up to date': 'web2py è aggiornato',
|
||||
'web2py upgraded; please restart it': 'web2py aggiornato; prego riavviarlo',
|
||||
}
|
||||
266
applications/admin/languages/it.py
Normal file
@@ -0,0 +1,266 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
|
||||
'%Y-%m-%d': '%d/%m/%Y',
|
||||
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
|
||||
'%s rows deleted': '%s righe ("record") cancellate',
|
||||
'%s rows updated': '%s righe ("record") modificate',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(qualcosa simile a "it-it")',
|
||||
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': "ATTENZIONE: L'accesso richiede una connessione sicura (HTTPS) o l'esecuzione di web2py in locale (connessione su localhost)",
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTZIONE: NON ESEGUIRE PIÙ TEST IN PARALLELO (I TEST NON SONO "THREAD SAFE")',
|
||||
'ATTENTION: you cannot edit the running application!': "ATTENZIONE: non puoi modificare l'applicazione correntemente in uso ",
|
||||
'About': 'Informazioni',
|
||||
'About application': "Informazioni sull'applicazione",
|
||||
'Admin is disabled because insecure channel': 'amministrazione disabilitata: comunicazione non sicura',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': 'Password Amministratore:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Confermi di voler cancellare il file "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Confermi di voler cancellare il plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Confermi di voler disinstallare l\'applicazione "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Confermi di voler aggiornare web2py ora?',
|
||||
'Available databases and tables': 'Database e tabelle disponibili',
|
||||
'Cannot be empty': 'Non può essere vuoto',
|
||||
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
|
||||
'Check to delete': 'Seleziona per cancellare',
|
||||
'Checking for upgrades...': 'Controllo aggiornamenti in corso...',
|
||||
'Controller': 'Controller',
|
||||
'Controllers': 'Controllers',
|
||||
'Copyright': 'Copyright',
|
||||
'Create new simple application': 'Crea nuova applicazione',
|
||||
'Current request': 'Richiesta (request) corrente',
|
||||
'Current response': 'Risposta (response) corrente',
|
||||
'Current session': 'Sessione (session) corrente',
|
||||
'DB Model': 'Modello di DB',
|
||||
'Database': 'Database',
|
||||
'Date and Time': 'Data and Ora',
|
||||
'Delete': 'Cancella',
|
||||
'Delete:': 'Cancella:',
|
||||
'Deploy on Google App Engine': 'Installa su Google App Engine',
|
||||
'EDIT': 'MODIFICA',
|
||||
'Edit': 'Modifica',
|
||||
'Edit This App': 'Modifica questa applicazione',
|
||||
'Edit application': 'Modifica applicazione',
|
||||
'Edit current record': 'Modifica record corrente',
|
||||
'Editing Language file': 'Modifica file linguaggio',
|
||||
'Editing file "%s"': 'Modifica del file "%s"',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Log degli errori per "%(app)s"',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
|
||||
'Hello World': 'Salve Mondo',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
|
||||
'Import/Export': 'Importa/Esporta',
|
||||
'Index': 'Indice',
|
||||
'Installed applications': 'Applicazioni installate',
|
||||
'Internal State': 'Stato interno',
|
||||
'Invalid Query': 'Richiesta (query) non valida',
|
||||
'Invalid action': 'Azione non valida',
|
||||
'Language files (static strings) updated': 'Linguaggi (documenti con stringhe statiche) aggiornati',
|
||||
'Languages': 'Linguaggi',
|
||||
'Last saved on:': 'Ultimo salvataggio:',
|
||||
'Layout': 'Layout',
|
||||
'License for': 'Licenza relativa a',
|
||||
'Login': 'Accesso',
|
||||
'Login to the Administrative Interface': "Accesso all'interfaccia amministrativa",
|
||||
'Main Menu': 'Menu principale',
|
||||
'Menu Model': 'Menu Modelli',
|
||||
'Models': 'Modelli',
|
||||
'Modules': 'Moduli',
|
||||
'NO': 'NO',
|
||||
'New Record': 'Nuovo elemento (record)',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'Nessun database presente in questa applicazione',
|
||||
'Original/Translation': 'Originale/Traduzione',
|
||||
'PAM authenticated user, cannot change password here': 'utente autenticato tramite PAM, impossibile modificare password qui',
|
||||
'Peeking at file': 'Uno sguardo al file',
|
||||
'Plugin "%s" in application': 'Plugin "%s" nell\'applicazione',
|
||||
'Plugins': 'I Plugins',
|
||||
'Powered by': 'Powered by',
|
||||
'Query:': 'Richiesta (query):',
|
||||
'Resolve Conflict file': 'File di risoluzione conflitto',
|
||||
'Rows in table': 'Righe nella tabella',
|
||||
'Rows selected': 'Righe selezionate',
|
||||
'Saved file hash:': 'Hash del file salvato:',
|
||||
'Static files': 'Files statici',
|
||||
'Stylesheet': 'Foglio di stile (stylesheet)',
|
||||
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
|
||||
'TM': 'TM',
|
||||
'Testing application': 'Test applicazione in corsg',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
|
||||
'There are no controllers': 'Non ci sono controller',
|
||||
'There are no models': 'Non ci sono modelli',
|
||||
'There are no modules': 'Non ci sono moduli',
|
||||
'There are no static files': 'Non ci sono file statici',
|
||||
'There are no translators, only default language is supported': 'Non ci sono traduzioni, viene solo supportato il linguaggio di base',
|
||||
'There are no views': 'Non ci sono viste ("view")',
|
||||
'This is the %(filename)s template': 'Questo è il template %(filename)s',
|
||||
'Ticket': 'Ticket',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]',
|
||||
'Unable to check for upgrades': 'Impossibile controllare presenza di aggiornamenti',
|
||||
'Unable to download app because:': 'Impossibile scaricare applicazione perché',
|
||||
'Unable to download because': 'Impossibile scaricare perché',
|
||||
'Unable to download because:': 'Unable to download because:',
|
||||
'Update:': 'Aggiorna:',
|
||||
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'Versione',
|
||||
'View': 'Vista',
|
||||
'Views': 'viste',
|
||||
'Welcome %s': 'Benvenuto %s',
|
||||
'Welcome to web2py': 'Benvenuto su web2py',
|
||||
'YES': 'SI',
|
||||
'About': 'informazioni',
|
||||
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
|
||||
'admin disabled because no admin password': 'amministrazione disabilitata per mancanza di password amministrativa',
|
||||
'admin disabled because not supported on google app engine': 'amministrazione non supportata da Google Apps Engine',
|
||||
'admin disabled because unable to access password file': 'amministrazione disabilitata per impossibilità di leggere il file delle password',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'e rinominala (obbligatorio):',
|
||||
'and rename it:': 'e rinominala:',
|
||||
'appadmin': 'appadmin ',
|
||||
'appadmin is disabled because insecure channel': 'amministrazione app (appadmin) disabilitata: comunicazione non sicura',
|
||||
'application "%s" uninstalled': 'applicazione "%s" disinstallata',
|
||||
'application compiled': 'applicazione compilata',
|
||||
'application is compiled and cannot be designed': "l'applicazione è compilata e non si può modificare",
|
||||
'arguments': 'arguments',
|
||||
'back': 'indietro',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
|
||||
'cannot create file': 'impossibile creare il file',
|
||||
'cannot upload file "%(filename)s"': 'impossibile caricare il file "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'change password': 'cambia password',
|
||||
'check all': 'controlla tutto',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'pulisci',
|
||||
'click here for online examples': 'clicca per vedere gli esempi',
|
||||
'click here for the administrative interface': "clicca per l'interfaccia amministrativa",
|
||||
'click to check for upgrades': 'clicca per controllare presenza di aggiornamenti',
|
||||
'code': 'code',
|
||||
'Compile': 'compila',
|
||||
'compiled application removed': "rimosso il codice compilato dell'applicazione",
|
||||
'controllers': 'controllers',
|
||||
'Create': 'crea',
|
||||
'create file with filename:': 'crea un file col nome:',
|
||||
'create new application:': 'create new application:',
|
||||
'created by': 'creato da',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'attualmente salvato o',
|
||||
'customize me!': 'Personalizzami!',
|
||||
'data uploaded': 'dati caricati',
|
||||
'database': 'database',
|
||||
'database %s select': 'database %s select',
|
||||
'database administration': 'amministrazione database',
|
||||
'db': 'db',
|
||||
'defines tables': 'defininisce le tabelle',
|
||||
'delete': 'Cancella',
|
||||
'delete all checked': 'cancella tutti i selezionati',
|
||||
'delete plugin': 'cancella plugin',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'progetta',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': 'fatto!',
|
||||
'Edit': 'modifica',
|
||||
'edit controller': 'modifica controller',
|
||||
'edit profile': 'modifica profilo',
|
||||
'edit views:': 'modifica viste (view):',
|
||||
'Errors': 'errori',
|
||||
'export as csv file': 'esporta come file CSV',
|
||||
'exposes': 'espone',
|
||||
'extends': 'estende',
|
||||
'failed to reload module because:': 'ricaricamento modulo fallito perché:',
|
||||
'file "%(filename)s" created': 'creato il file "%(filename)s"',
|
||||
'file "%(filename)s" deleted': 'cancellato il file "%(filename)s"',
|
||||
'file "%(filename)s" uploaded': 'caricato il file "%(filename)s"',
|
||||
'file "%s" of %s restored': 'ripristinato "%(filename)s"',
|
||||
'file changed on disk': 'il file ha subito una modifica su disco',
|
||||
'file does not exist': 'file inesistente',
|
||||
'file saved on %(time)s': "file salvato nell'istante %(time)s",
|
||||
'file saved on %s': 'file salvato: %s',
|
||||
'Help': 'aiuto',
|
||||
'htmledit': 'modifica come html',
|
||||
'includes': 'include',
|
||||
'insert new': 'inserisci nuovo',
|
||||
'insert new %s': 'inserisci nuovo %s',
|
||||
'Install': 'installa',
|
||||
'internal error': 'errore interno',
|
||||
'invalid password': 'password non valida',
|
||||
'invalid request': 'richiesta non valida',
|
||||
'invalid ticket': 'ticket non valido',
|
||||
'language file "%(filename)s" created/updated': 'file linguaggio "%(filename)s" creato/aggiornato',
|
||||
'languages': 'linguaggi',
|
||||
'loading...': 'caricamento...',
|
||||
'login': 'accesso',
|
||||
'Logout': 'uscita',
|
||||
'merge': 'unisci',
|
||||
'models': 'modelli',
|
||||
'modules': 'moduli',
|
||||
'new application "%s" created': 'creata la nuova applicazione "%s"',
|
||||
'new plugin installed': 'installato nuovo plugin',
|
||||
'new record inserted': 'nuovo record inserito',
|
||||
'next 100 rows': 'prossime 100 righe',
|
||||
'no match': 'nessuna corrispondenza',
|
||||
'or import from csv file': 'oppure importa da file CSV',
|
||||
'or provide app url:': "oppure fornisci url dell'applicazione:",
|
||||
'Overwrite installed app': 'sovrascrivi applicazione installata',
|
||||
'Pack all': 'crea pacchetto',
|
||||
'Pack compiled': 'crea pacchetto del codice compilato',
|
||||
'pack plugin': 'crea pacchetto del plugin',
|
||||
'password changed': 'password modificata',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" cancellato',
|
||||
'previous 100 rows': '100 righe precedenti',
|
||||
'record': 'record',
|
||||
'record does not exist': 'il record non esiste',
|
||||
'record id': 'ID del record',
|
||||
'register': 'registrazione',
|
||||
'Remove compiled': 'rimozione codice compilato',
|
||||
'restore': 'ripristino',
|
||||
'revert': 'versione precedente',
|
||||
'selected': 'selezionato',
|
||||
'session expired': 'sessions scaduta',
|
||||
'shell': 'shell',
|
||||
'Site': 'sito',
|
||||
'some files could not be removed': 'non è stato possibile rimuovere alcuni files',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'stato',
|
||||
'static': 'statico',
|
||||
'submit': 'invia',
|
||||
'table': 'tabella',
|
||||
'test': 'test',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'logica dell\'applicazione, ogni percorso "URL" corrisponde ad una funzione esposta da un controller',
|
||||
'the data representation, define database tables and sets': 'rappresentazione dei dati, definizione di tabelle di database e di "set" ',
|
||||
'the presentations layer, views are also known as templates': 'Presentazione dell\'applicazione, viste (views, chiamate anche "templates")',
|
||||
'these files are served without processing, your images go here': 'questi files vengono serviti così come sono, le immagini vanno qui',
|
||||
'to previous version.': 'torna a versione precedente',
|
||||
'translation strings for the application': "stringhe di traduzioni per l'applicazione",
|
||||
'try': 'prova',
|
||||
'try something like': 'prova qualcosa come',
|
||||
'unable to create application "%s"': 'impossibile creare applicazione "%s"',
|
||||
'unable to delete file "%(filename)s"': 'impossibile rimuovere file "%(plugin)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'impossibile rimuovere file di plugin "%(plugin)s"',
|
||||
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
|
||||
'unable to uninstall "%s"': 'impossibile disinstallare "%s"',
|
||||
'unable to upgrade because "%s"': 'impossibile aggiornare perché "%s"',
|
||||
'uncheck all': 'smarca tutti',
|
||||
'Uninstall': 'disinstalla',
|
||||
'update': 'aggiorna',
|
||||
'update all languages': 'aggiorna tutti i linguaggi',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload application:': 'carica applicazione:',
|
||||
'upload file:': 'carica file:',
|
||||
'upload plugin file:': 'carica file di plugin:',
|
||||
'variables': 'variables',
|
||||
'versioning': 'sistema di versioni',
|
||||
'view': 'vista',
|
||||
'views': 'viste',
|
||||
'web2py Recent Tweets': 'Tweets recenti per web2py',
|
||||
'web2py is up to date': 'web2py è aggiornato',
|
||||
'web2py upgraded; please restart it': 'web2py aggiornato; prego riavviarlo',
|
||||
}
|
||||
262
applications/admin/languages/pl-pl.py
Normal file
@@ -0,0 +1,262 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': 'Wierszy usuniętych: %s',
|
||||
'%s rows updated': 'Wierszy uaktualnionych: %s',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(coś podobnego do "it-it")',
|
||||
'A new version of web2py is available': 'Nowa wersja web2py jest dostępna',
|
||||
'A new version of web2py is available: %s': 'A new version of web2py is available: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'UWAGA: Wymagane jest bezpieczne (HTTPS) połączenie lub połączenia z lokalnego adresu.',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.',
|
||||
'ATTENTION: you cannot edit the running application!': 'UWAGA: nie można edytować uruchomionych aplikacji!',
|
||||
'About': 'Informacje o',
|
||||
'About application': 'Informacje o aplikacji',
|
||||
'Admin is disabled because insecure channel': 'Admin is disabled because insecure channel',
|
||||
'Admin is disabled because unsecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': 'Hasło administratora:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Czy na pewno chcesz usunąć plik "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': 'Czy na pewno chcesz usunąć aplikację "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Czy na pewno chcesz usunąć aplikację "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
|
||||
'Available databases and tables': 'Dostępne bazy danych i tabele',
|
||||
'Cannot be empty': 'Nie może być puste',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Nie można skompilować: w Twojej aplikacji są błędy . Znajdź je, popraw a następnie spróbój ponownie.',
|
||||
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
|
||||
'Check to delete': 'Zaznacz aby usunąć',
|
||||
'Checking for upgrades...': 'Checking for upgrades...',
|
||||
'Controllers': 'Kontrolery',
|
||||
'Create new simple application': 'Utwórz nową aplikację',
|
||||
'Current request': 'Aktualne żądanie',
|
||||
'Current response': 'Aktualna odpowiedź',
|
||||
'Current session': 'Aktualna sesja',
|
||||
'DESIGN': 'PROJEKTUJ',
|
||||
'Date and Time': 'Data i godzina',
|
||||
'Delete': 'Usuń',
|
||||
'Delete:': 'Usuń:',
|
||||
'Deploy on Google App Engine': 'Umieść na Google App Engine',
|
||||
'Design for': 'Projekt dla',
|
||||
'EDIT': 'EDYTUJ',
|
||||
'Edit application': 'Edycja aplikacji',
|
||||
'Edit current record': 'Edytuj aktualny rekord',
|
||||
'Editing Language file': 'Editing Language file',
|
||||
'Editing file': 'Edycja pliku',
|
||||
'Editing file "%s"': 'Edycja pliku "%s"',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Wpisy błędów dla "%(app)s"',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Functions with no doctests will result in [passed] tests.',
|
||||
'Hello World': 'Witaj Świecie',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
|
||||
'Import/Export': 'Importuj/eksportuj',
|
||||
'Installed applications': 'Zainstalowane aplikacje',
|
||||
'Internal State': 'Stan wewnętrzny',
|
||||
'Invalid Query': 'Błędne zapytanie',
|
||||
'Invalid action': 'Błędna akcja',
|
||||
'Language files (static strings) updated': 'Language files (static strings) updated',
|
||||
'Languages': 'Tłumaczenia',
|
||||
'Last saved on:': 'Ostatnio zapisany:',
|
||||
'License for': 'Licencja dla',
|
||||
'Login': 'Zaloguj',
|
||||
'Login to the Administrative Interface': 'Logowanie do panelu administracyjnego',
|
||||
'Models': 'Modele',
|
||||
'Modules': 'Moduły',
|
||||
'NO': 'NIE',
|
||||
'New Record': 'Nowy rekord',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'Brak baz danych w tej aplikacji',
|
||||
'Original/Translation': 'Oryginał/tłumaczenie',
|
||||
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
|
||||
'Peeking at file': 'Podgląd pliku',
|
||||
'Plugin "%s" in application': 'Plugin "%s" in application',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Powered by',
|
||||
'Query:': 'Zapytanie:',
|
||||
'Resolve Conflict file': 'Resolve Conflict file',
|
||||
'Rows in table': 'Wiersze w tabeli',
|
||||
'Rows selected': 'Wierszy wybranych',
|
||||
'Saved file hash:': 'Suma kontrolna zapisanego pliku:',
|
||||
'Static files': 'Pliki statyczne',
|
||||
'Sure you want to delete this object?': 'Czy na pewno chcesz usunąć ten obiekt?',
|
||||
'TM': 'TM',
|
||||
'Testing application': 'Testing application',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'wartość\'". Takie coś jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
|
||||
'There are no controllers': 'Brak kontrolerów',
|
||||
'There are no models': 'Brak modeli',
|
||||
'There are no modules': 'Brak modułów',
|
||||
'There are no static files': 'Brak plików statycznych',
|
||||
'There are no translators, only default language is supported': 'Brak plików tłumaczeń, wspierany jest tylko domyślny język',
|
||||
'There are no views': 'Brak widoków',
|
||||
'This is the %(filename)s template': 'To jest szablon %(filename)s',
|
||||
'Ticket': 'Bilet',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
|
||||
'Unable to check for upgrades': 'Nie można sprawdzić aktualizacji',
|
||||
'Unable to download': 'Nie można ściągnąć',
|
||||
'Unable to download app because:': 'Unable to download app because:',
|
||||
'Unable to download because': 'Unable to download because',
|
||||
'Update:': 'Uaktualnij:',
|
||||
'Upload & install packed application': 'Upload & install packed application',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload existing application': 'Wyślij istniejącą aplikację',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Użyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...) jako NOT do tworzenia bardziej skomplikowanych zapytań.',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'Version',
|
||||
'Views': 'Widoki',
|
||||
'Welcome to web2py': 'Witaj w web2py',
|
||||
'YES': 'TAK',
|
||||
'About': 'informacje',
|
||||
'additional code for your application': 'dodatkowy kod Twojej aplikacji',
|
||||
'admin disabled because no admin password': 'panel administracyjny wyłączony z powodu braku hasła administracyjnego',
|
||||
'admin disabled because not supported on google app engine': 'admin disabled because not supported on google apps engine',
|
||||
'admin disabled because unable to access password file': 'panel administracyjny wyłączony z powodu braku dostępu do pliku z hasłem',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'i nadaj jej nową nazwę (wymagane):',
|
||||
'and rename it:': 'i nadaj mu nową nazwę:',
|
||||
'appadmin': 'administracja aplikacji',
|
||||
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
|
||||
'application "%s" uninstalled': 'aplikacja "%s" została odinstalowana',
|
||||
'application compiled': 'aplikacja została skompilowana',
|
||||
'application is compiled and cannot be designed': 'aplikacja jest skompilowana i nie może być projektowana',
|
||||
'arguments': 'arguments',
|
||||
'back': 'back',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'pamięć podręczna, bilety błędów oraz pliki sesji zostały wyczyszczone',
|
||||
'cannot create file': 'nie można utworzyć pliku',
|
||||
'cannot upload file "%(filename)s"': 'nie można wysłać pliku "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'check all': 'zaznacz wszystko',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'oczyść',
|
||||
'click here for online examples': 'kliknij aby przejść do interaktywnych przykładów',
|
||||
'click here for the administrative interface': 'kliknij aby przejść do panelu administracyjnego',
|
||||
'click to check for upgrades': 'kliknij aby sprawdzić aktualizacje',
|
||||
'code': 'code',
|
||||
'Compile': 'skompiluj',
|
||||
'compiled application removed': 'skompilowana aplikacja została usunięta',
|
||||
'controllers': 'kontrolery',
|
||||
'Create': 'create',
|
||||
'create file with filename:': 'utwórz plik o nazwie:',
|
||||
'create new application:': 'utwórz nową aplikację:',
|
||||
'created by': 'created by',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'aktualnie zapisany lub',
|
||||
'data uploaded': 'dane wysłane',
|
||||
'database': 'baza danych',
|
||||
'database %s select': 'wybór z bazy danych %s',
|
||||
'database administration': 'administracja bazy danych',
|
||||
'db': 'baza danych',
|
||||
'defines tables': 'zdefiniuj tabele',
|
||||
'delete': 'usuń',
|
||||
'delete all checked': 'usuń wszystkie zaznaczone',
|
||||
'delete plugin': 'delete plugin',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'projektuj',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': 'zrobione!',
|
||||
'Edit': 'edytuj',
|
||||
'edit controller': 'edytuj kontroler',
|
||||
'edit views:': 'edit views:',
|
||||
'Errors': 'błędy',
|
||||
'export as csv file': 'eksportuj jako plik csv',
|
||||
'exposes': 'eksponuje',
|
||||
'extends': 'rozszerza',
|
||||
'failed to reload module': 'nie udało się przeładować modułu',
|
||||
'failed to reload module because:': 'failed to reload module because:',
|
||||
'file "%(filename)s" created': 'plik "%(filename)s" został utworzony',
|
||||
'file "%(filename)s" deleted': 'plik "%(filename)s" został usunięty',
|
||||
'file "%(filename)s" uploaded': 'plik "%(filename)s" został wysłany',
|
||||
'file "%(filename)s" was not deleted': 'plik "%(filename)s" nie został usunięty',
|
||||
'file "%s" of %s restored': 'plik "%s" z %s został odtworzony',
|
||||
'file changed on disk': 'plik na dysku został zmieniony',
|
||||
'file does not exist': 'plik nie istnieje',
|
||||
'file saved on %(time)s': 'plik zapisany o %(time)s',
|
||||
'file saved on %s': 'plik zapisany o %s',
|
||||
'Help': 'pomoc',
|
||||
'htmledit': 'edytuj HTML',
|
||||
'includes': 'zawiera',
|
||||
'insert new': 'wstaw nowy rekord tabeli',
|
||||
'insert new %s': 'wstaw nowy rekord do tabeli %s',
|
||||
'Install': 'install',
|
||||
'internal error': 'wewnętrzny błąd',
|
||||
'invalid password': 'błędne hasło',
|
||||
'invalid request': 'błędne zapytanie',
|
||||
'invalid ticket': 'błędny bilet',
|
||||
'language file "%(filename)s" created/updated': 'plik tłumaczeń "%(filename)s" został utworzony/uaktualniony',
|
||||
'languages': 'pliki tłumaczeń',
|
||||
'languages updated': 'pliki tłumaczeń zostały uaktualnione',
|
||||
'loading...': 'wczytywanie...',
|
||||
'login': 'zaloguj',
|
||||
'Logout': 'wyloguj',
|
||||
'merge': 'merge',
|
||||
'models': 'modele',
|
||||
'modules': 'moduły',
|
||||
'new application "%s" created': 'nowa aplikacja "%s" została utworzona',
|
||||
'new plugin installed': 'new plugin installed',
|
||||
'new record inserted': 'nowy rekord został wstawiony',
|
||||
'next 100 rows': 'następne 100 wierszy',
|
||||
'no match': 'no match',
|
||||
'or import from csv file': 'lub zaimportuj z pliku csv',
|
||||
'or provide app url:': 'or provide app url:',
|
||||
'or provide application url:': 'lub podaj url aplikacji:',
|
||||
'Overwrite installed app': 'overwrite installed app',
|
||||
'Pack all': 'spakuj wszystko',
|
||||
'Pack compiled': 'spakuj skompilowane',
|
||||
'pack plugin': 'pack plugin',
|
||||
'password changed': 'password changed',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
|
||||
'previous 100 rows': 'poprzednie 100 wierszy',
|
||||
'record': 'record',
|
||||
'record does not exist': 'rekord nie istnieje',
|
||||
'record id': 'id rekordu',
|
||||
'Remove compiled': 'usuń skompilowane',
|
||||
'restore': 'odtwórz',
|
||||
'revert': 'przywróć',
|
||||
'save': 'zapisz',
|
||||
'selected': 'zaznaczone',
|
||||
'session expired': 'sesja wygasła',
|
||||
'shell': 'powłoka',
|
||||
'Site': 'strona główna',
|
||||
'some files could not be removed': 'niektóre pliki nie mogły zostać usunięte',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'stan',
|
||||
'static': 'pliki statyczne',
|
||||
'submit': 'submit',
|
||||
'table': 'tabela',
|
||||
'test': 'testuj',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'logika aplikacji, każda ścieżka URL jest mapowana na jedną z funkcji eksponowanych w kontrolerze',
|
||||
'the data representation, define database tables and sets': 'reprezentacja danych, definicje zbiorów i tabel bazy danych',
|
||||
'the presentations layer, views are also known as templates': 'warstwa prezentacji, widoki zwane są również szablonami',
|
||||
'these files are served without processing, your images go here': 'pliki obsługiwane bez interpretacji, to jest miejsce na Twoje obrazy',
|
||||
'to previous version.': 'do poprzedniej wersji.',
|
||||
'translation strings for the application': 'ciągi tłumaczeń dla aplikacji',
|
||||
'try': 'spróbój',
|
||||
'try something like': 'spróbój czegos takiego jak',
|
||||
'unable to create application "%s"': 'nie można utworzyć aplikacji "%s"',
|
||||
'unable to delete file "%(filename)s"': 'nie można usunąć pliku "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
|
||||
'unable to parse csv file': 'nie można sparsować pliku csv',
|
||||
'unable to uninstall "%s"': 'nie można odinstalować "%s"',
|
||||
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
|
||||
'uncheck all': 'odznacz wszystko',
|
||||
'Uninstall': 'odinstaluj',
|
||||
'update': 'uaktualnij',
|
||||
'update all languages': 'uaktualnij wszystkie pliki tłumaczeń',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload application:': 'wyślij plik aplikacji:',
|
||||
'upload file:': 'wyślij plik:',
|
||||
'upload plugin file:': 'upload plugin file:',
|
||||
'variables': 'variables',
|
||||
'versioning': 'versioning',
|
||||
'view': 'widok',
|
||||
'views': 'widoki',
|
||||
'web2py Recent Tweets': 'najnowsze tweety web2py',
|
||||
'web2py is up to date': 'web2py jest aktualne',
|
||||
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
|
||||
}
|
||||
277
applications/admin/languages/pl.py
Normal file
@@ -0,0 +1,277 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': 'Wierszy usuniętych: %s',
|
||||
'%s rows updated': 'Wierszy uaktualnionych: %s',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(coś podobnego do "it-it")',
|
||||
'A new version of web2py is available': 'Nowa wersja web2py jest dostępna',
|
||||
'A new version of web2py is available: %s': 'Nowa wersja web2py jest dostępna: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'UWAGA: Wymagane jest bezpieczne (HTTPS) połączenie lub połączenie z lokalnego adresu.',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'UWAGA: TESTOWANIE NIE JEST BEZPIECZNE W ŚRODOWISKU WIELOWĄTKOWYM, TAK WIĘC NIE URUCHAMIAJ WIELU TESTÓW JEDNOCZEŚNIE.',
|
||||
'ATTENTION: you cannot edit the running application!': 'UWAGA: nie można edytować uruchomionych aplikacji!',
|
||||
'About': 'Informacje o',
|
||||
'About application': 'Informacje o aplikacji',
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'Admin is disabled because insecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
|
||||
'Admin is disabled because unsecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
|
||||
'Administrator Password:': 'Hasło administratora:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': 'Czy na pewno chcesz usunąć plik "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Czy na pewno chcesz usunąć wtyczkę "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': 'Czy na pewno chcesz usunąć aplikację "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Czy na pewno chcesz usunąć aplikację "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
|
||||
'Available databases and tables': 'Dostępne bazy danych i tabele',
|
||||
'Cannot be empty': 'Nie może być puste',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Nie można skompilować: w Twojej aplikacji są błędy . Znajdź je, popraw a następnie spróbój ponownie.',
|
||||
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
|
||||
'Check to delete': 'Zaznacz aby usunąć',
|
||||
'Checking for upgrades...': 'Sprawdzanie aktualizacji...',
|
||||
'Controllers': 'Kontrolery',
|
||||
'Create new simple application': 'Utwórz nową aplikację',
|
||||
'Current request': 'Aktualne żądanie',
|
||||
'Current response': 'Aktualna odpowiedź',
|
||||
'Current session': 'Aktualna sesja',
|
||||
'DESIGN': 'PROJEKTUJ',
|
||||
'Date and Time': 'Data i godzina',
|
||||
'Delete': 'Usuń',
|
||||
'Delete:': 'Usuń:',
|
||||
'Deploy on Google App Engine': 'Umieść na Google App Engine',
|
||||
'Design for': 'Projekt dla',
|
||||
'EDIT': 'EDYTUJ',
|
||||
'Edit application': 'Edycja aplikacji',
|
||||
'Edit current record': 'Edytuj aktualny rekord',
|
||||
'Editing Language file': 'Edytuj plik tłumaczeń',
|
||||
'Editing file': 'Edycja pliku',
|
||||
'Editing file "%s"': 'Edycja pliku "%s"',
|
||||
'Enterprise Web Framework': 'Enterprise Web Framework',
|
||||
'Error logs for "%(app)s"': 'Wpisy błędów dla "%(app)s"',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Funkcje bez doctestów będą dołączone do [zaliczonych] testów.',
|
||||
'Hello World': 'Witaj Świecie',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Jeżeli powyższy raport zawiera numer biletu błędu, oznacza to błąd podczas wykonywania kontrolera przez próbą uruchomienia doctestów. Zazwyczaj jest to spowodowane nieprawidłowymi wcięciami linii kodu lub błędami w module poza ciałem funkcji.\nTytuł w kolorze zielonym oznacza, ze wszystkie (zdefiniowane) testy zakończyły się sukcesem. W tej sytuacji ich wyniki nie są pokazane.',
|
||||
'Import/Export': 'Importuj/eksportuj',
|
||||
'Installed applications': 'Zainstalowane aplikacje',
|
||||
'Internal State': 'Stan wewnętrzny',
|
||||
'Invalid Query': 'Błędne zapytanie',
|
||||
'Invalid action': 'Błędna akcja',
|
||||
'Language files (static strings) updated': 'Pliki tłumaczeń (ciągi statyczne) zostały uaktualnione',
|
||||
'Languages': 'Tłumaczenia',
|
||||
'Last saved on:': 'Ostatnio zapisany:',
|
||||
'License for': 'Licencja dla',
|
||||
'Login': 'Zaloguj',
|
||||
'Login to the Administrative Interface': 'Logowanie do panelu administracyjnego',
|
||||
'Models': 'Modele',
|
||||
'Modules': 'Moduły',
|
||||
'NO': 'NIE',
|
||||
'New Record': 'Nowy rekord',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': 'Brak baz danych w tej aplikacji',
|
||||
'Original/Translation': 'Oryginał/tłumaczenie',
|
||||
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
|
||||
'Peeking at file': 'Podgląd pliku',
|
||||
'Plugin "%s" in application': 'Wtyczka "%s" w aplikacji',
|
||||
'Plugins': 'Wtyczki',
|
||||
'Powered by': 'Zasilane przez',
|
||||
'Query:': 'Zapytanie:',
|
||||
'Resolve Conflict file': 'Rozwiąż konflikt plików',
|
||||
'Rows in table': 'Wiersze w tabeli',
|
||||
'Rows selected': 'Wierszy wybranych',
|
||||
'Saved file hash:': 'Suma kontrolna zapisanego pliku:',
|
||||
'Searching:': 'Searching:',
|
||||
'Static files': 'Pliki statyczne',
|
||||
'Sure you want to delete this object?': 'Czy na pewno chcesz usunąć ten obiekt?',
|
||||
'TM': 'TM',
|
||||
'Testing application': 'Testowanie aplikacji',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'wartość\'". Takie coś jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no controllers': 'Brak kontrolerów',
|
||||
'There are no models': 'Brak modeli',
|
||||
'There are no modules': 'Brak modułów',
|
||||
'There are no plugins': 'There are no plugins',
|
||||
'There are no static files': 'Brak plików statycznych',
|
||||
'There are no translators, only default language is supported': 'Brak plików tłumaczeń, wspierany jest tylko domyślny język',
|
||||
'There are no views': 'Brak widoków',
|
||||
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
|
||||
'This is the %(filename)s template': 'To jest szablon %(filename)s',
|
||||
'Ticket': 'Bilet',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Aby utworzyć wtyczkę, nazwij plik/katalog plugin_[nazwa]',
|
||||
'Translation strings for the application': 'Translation strings for the application',
|
||||
'Unable to check for upgrades': 'Nie można sprawdzić aktualizacji',
|
||||
'Unable to download': 'Nie można ściągnąć',
|
||||
'Unable to download app': 'Nie można ściągnąć aplikacji',
|
||||
'Unable to download app because:': 'Unable to download app because:',
|
||||
'Unable to download because': 'Unable to download because',
|
||||
'Update:': 'Uaktualnij:',
|
||||
'Upload & install packed application': 'Upload & install packed application',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload existing application': 'Wyślij istniejącą aplikację',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Użyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...) jako NOT do tworzenia bardziej skomplikowanych zapytań.',
|
||||
'Use an url:': 'Use an url:',
|
||||
'Version': 'Wersja',
|
||||
'Views': 'Widoki',
|
||||
'Welcome to web2py': 'Witaj w web2py',
|
||||
'YES': 'TAK',
|
||||
'About': 'informacje',
|
||||
'additional code for your application': 'dodatkowy kod Twojej aplikacji',
|
||||
'admin disabled because no admin password': 'panel administracyjny wyłączony z powodu braku hasła administracyjnego',
|
||||
'admin disabled because not supported on google app engine': 'panel administracyjny wyłączony z powodu braku wsparcia na google apps engine',
|
||||
'admin disabled because unable to access password file': 'panel administracyjny wyłączony z powodu braku dostępu do pliku z hasłem',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': 'i nadaj jej nową nazwę (wymagane):',
|
||||
'and rename it:': 'i nadaj mu nową nazwę:',
|
||||
'appadmin': 'administracja aplikacji',
|
||||
'appadmin is disabled because insecure channel': 'administracja aplikacji wyłączona z powodu braku bezpiecznego połączenia',
|
||||
'application "%s" uninstalled': 'aplikacja "%s" została odinstalowana',
|
||||
'application compiled': 'aplikacja została skompilowana',
|
||||
'application is compiled and cannot be designed': 'aplikacja jest skompilowana i nie może być projektowana',
|
||||
'arguments': 'arguments',
|
||||
'back': 'wstecz',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'pamięć podręczna, bilety błędów oraz pliki sesji zostały wyczyszczone',
|
||||
'cannot create file': 'nie można utworzyć pliku',
|
||||
'cannot upload file "%(filename)s"': 'nie można wysłać pliku "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'check all': 'zaznacz wszystko',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': 'oczyść',
|
||||
'click here for online examples': 'kliknij aby przejść do interaktywnych przykładów',
|
||||
'click here for the administrative interface': 'kliknij aby przejść do panelu administracyjnego',
|
||||
'click to check for upgrades': 'kliknij aby sprawdzić aktualizacje',
|
||||
'code': 'code',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'Compile': 'skompiluj',
|
||||
'compiled application removed': 'skompilowana aplikacja została usunięta',
|
||||
'controllers': 'kontrolery',
|
||||
'Create': 'create',
|
||||
'create file with filename:': 'utwórz plik o nazwie:',
|
||||
'create new application:': 'utwórz nową aplikację:',
|
||||
'created by': 'utworzone przez',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': 'aktualnie zapisany lub',
|
||||
'data uploaded': 'dane wysłane',
|
||||
'database': 'baza danych',
|
||||
'database %s select': 'wybór z bazy danych %s',
|
||||
'database administration': 'administracja bazy danych',
|
||||
'db': 'baza danych',
|
||||
'defines tables': 'zdefiniuj tabele',
|
||||
'delete': 'usuń',
|
||||
'delete all checked': 'usuń wszystkie zaznaczone',
|
||||
'delete plugin': 'usuń wtyczkę',
|
||||
'Deploy': 'deploy',
|
||||
'design': 'projektuj',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': 'zrobione!',
|
||||
'download layouts': 'download layouts',
|
||||
'download plugins': 'download plugins',
|
||||
'Edit': 'edytuj',
|
||||
'edit controller': 'edytuj kontroler',
|
||||
'edit views:': 'edit views:',
|
||||
'Errors': 'błędy',
|
||||
'export as csv file': 'eksportuj jako plik csv',
|
||||
'exposes': 'eksponuje',
|
||||
'extends': 'rozszerza',
|
||||
'failed to reload module': 'nie udało się przeładować modułu',
|
||||
'failed to reload module because:': 'failed to reload module because:',
|
||||
'file "%(filename)s" created': 'plik "%(filename)s" został utworzony',
|
||||
'file "%(filename)s" deleted': 'plik "%(filename)s" został usunięty',
|
||||
'file "%(filename)s" uploaded': 'plik "%(filename)s" został wysłany',
|
||||
'file "%(filename)s" was not deleted': 'plik "%(filename)s" nie został usunięty',
|
||||
'file "%s" of %s restored': 'plik "%s" z %s został odtworzony',
|
||||
'file changed on disk': 'plik na dysku został zmieniony',
|
||||
'file does not exist': 'plik nie istnieje',
|
||||
'file saved on %(time)s': 'plik zapisany o %(time)s',
|
||||
'file saved on %s': 'plik zapisany o %s',
|
||||
'files': 'files',
|
||||
'filter': 'filter',
|
||||
'Help': 'pomoc',
|
||||
'htmledit': 'edytuj HTML',
|
||||
'includes': 'zawiera',
|
||||
'insert new': 'wstaw nowy rekord tabeli',
|
||||
'insert new %s': 'wstaw nowy rekord do tabeli %s',
|
||||
'Install': 'install',
|
||||
'internal error': 'wewnętrzny błąd',
|
||||
'invalid password': 'błędne hasło',
|
||||
'invalid request': 'błędne zapytanie',
|
||||
'invalid ticket': 'błędny bilet',
|
||||
'language file "%(filename)s" created/updated': 'plik tłumaczeń "%(filename)s" został utworzony/uaktualniony',
|
||||
'languages': 'pliki tłumaczeń',
|
||||
'languages updated': 'pliki tłumaczeń zostały uaktualnione',
|
||||
'loading...': 'wczytywanie...',
|
||||
'login': 'zaloguj',
|
||||
'Logout': 'wyloguj',
|
||||
'merge': 'zespól',
|
||||
'models': 'modele',
|
||||
'modules': 'moduły',
|
||||
'new application "%s" created': 'nowa aplikacja "%s" została utworzona',
|
||||
'new plugin installed': 'nowa wtyczka została zainstalowana',
|
||||
'new record inserted': 'nowy rekord został wstawiony',
|
||||
'next 100 rows': 'następne 100 wierszy',
|
||||
'no match': 'no match',
|
||||
'or import from csv file': 'lub zaimportuj z pliku csv',
|
||||
'or provide app url:': 'or provide app url:',
|
||||
'or provide application url:': 'lub podaj url aplikacji:',
|
||||
'Overwrite installed app': 'overwrite installed app',
|
||||
'Pack all': 'spakuj wszystko',
|
||||
'Pack compiled': 'spakuj skompilowane',
|
||||
'pack plugin': 'spakuj wtyczkę',
|
||||
'password changed': 'password changed',
|
||||
'plugin "%(plugin)s" deleted': 'wtyczka "%(plugin)s" została usunięta',
|
||||
'plugins': 'plugins',
|
||||
'previous 100 rows': 'poprzednie 100 wierszy',
|
||||
'record': 'rekord',
|
||||
'record does not exist': 'rekord nie istnieje',
|
||||
'record id': 'ID rekordu',
|
||||
'Remove compiled': 'usuń skompilowane',
|
||||
'restore': 'odtwórz',
|
||||
'revert': 'przywróć',
|
||||
'save': 'zapisz',
|
||||
'selected': 'zaznaczone',
|
||||
'session expired': 'sesja wygasła',
|
||||
'shell': 'powłoka',
|
||||
'Site': 'strona główna',
|
||||
'some files could not be removed': 'niektóre pliki nie mogły zostać usunięte',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': 'stan',
|
||||
'static': 'pliki statyczne',
|
||||
'submit': 'wyślij',
|
||||
'table': 'tabela',
|
||||
'test': 'testuj',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'logika aplikacji, każda ścieżka URL jest mapowana na jedną z funkcji eksponowanych w kontrolerze',
|
||||
'the data representation, define database tables and sets': 'reprezentacja danych, definicje zbiorów i tabel bazy danych',
|
||||
'the presentations layer, views are also known as templates': 'warstwa prezentacji, widoki zwane są również szablonami',
|
||||
'these files are served without processing, your images go here': 'pliki obsługiwane bez interpretacji, to jest miejsce na Twoje obrazy',
|
||||
'to previous version.': 'do poprzedniej wersji.',
|
||||
'translation strings for the application': 'ciągi tłumaczeń dla aplikacji',
|
||||
'try': 'spróbój',
|
||||
'try something like': 'spróbój czegos takiego jak',
|
||||
'unable to create application "%s"': 'nie można utworzyć aplikacji "%s"',
|
||||
'unable to delete file "%(filename)s"': 'nie można usunąć pliku "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'nie można usunąc pliku wtyczki "%(plugin)s"',
|
||||
'unable to parse csv file': 'nie można sparsować pliku csv',
|
||||
'unable to uninstall "%s"': 'nie można odinstalować "%s"',
|
||||
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
|
||||
'uncheck all': 'odznacz wszystko',
|
||||
'Uninstall': 'odinstaluj',
|
||||
'update': 'uaktualnij',
|
||||
'update all languages': 'uaktualnij wszystkie pliki tłumaczeń',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload': 'upload',
|
||||
'upload application:': 'wyślij plik aplikacji:',
|
||||
'upload file:': 'wyślij plik:',
|
||||
'upload plugin file:': 'wyślij plik wtyczki:',
|
||||
'variables': 'variables',
|
||||
'versioning': 'versioning',
|
||||
'view': 'widok',
|
||||
'views': 'widoki',
|
||||
'web2py Recent Tweets': 'najnowsze tweety web2py',
|
||||
'web2py is up to date': 'web2py jest aktualne',
|
||||
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
|
||||
}
|
||||
320
applications/admin/languages/pt-br.py
Normal file
@@ -0,0 +1,320 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um JOIN',
|
||||
'%Y-%m-%d': '%d/%m/%Y',
|
||||
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
|
||||
'%s rows deleted': '%s registros apagados',
|
||||
'%s rows updated': '%s registros atualizados',
|
||||
'(requires internet access)': '(requer acesso a internet)',
|
||||
'(something like "it-it")': '(algo como "it-it")',
|
||||
'A new version of web2py is available': 'Está disponível uma nova versão do web2py',
|
||||
'A new version of web2py is available: %s': 'Está disponível uma nova versão do web2py: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENÇÃO o login requer uma conexão segura (HTTPS) ou executar de localhost.',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENÇÃO OS TESTES NÃO THREAD SAFE, NÃO EFETUE MÚLTIPLOS TESTES AO MESMO TEMPO.',
|
||||
'ATTENTION: you cannot edit the running application!': 'ATENÇÃO: Não pode modificar a aplicação em execução!',
|
||||
'About': 'Sobre',
|
||||
'About application': 'Sobre a aplicação',
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'Admin is disabled because insecure channel': 'Admin desabilitado pois o canal não é seguro',
|
||||
'Admin is disabled because unsecure channel': 'Admin desabilitado pois o canal não é seguro',
|
||||
'Admin language': 'Linguagem do Admin',
|
||||
'Administrator Password:': 'Senha de administrador:',
|
||||
'Application name:': 'Nome da aplicação:',
|
||||
'Are you sure you want to delete file "%s"?': 'Tem certeza que deseja apagar o arquivo "%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Tem certeza que deseja apagar o plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': 'Tem certeza que deseja apagar a aplicação "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"?': 'Tem certeza que deseja apagar a aplicação "%s"?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Tem certeza que deseja atualizar o web2py agora?',
|
||||
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
|
||||
'Cannot be empty': 'Não pode ser vazio',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Não é possível compilar: Existem erros em sua aplicação. Depure, corrija os errros e tente novamente',
|
||||
'Cannot compile: there are errors in your app:': 'Não é possível compilar: Existem erros em sua aplicação',
|
||||
'Change Password': 'Trocar Senha',
|
||||
'Check to delete': 'Marque para apagar',
|
||||
'Checking for upgrades...': 'Buscando atualizações...',
|
||||
'Click row to expand traceback': 'Clique em uma coluna para expandir o log do erro',
|
||||
'Client IP': 'IP do cliente',
|
||||
'Controllers': 'Controladores',
|
||||
'Count': 'Contagem',
|
||||
'Create new application using the Wizard': 'Criar nova aplicação utilizando o assistente',
|
||||
'Create new simple application': 'Crie uma nova aplicação',
|
||||
'Current request': 'Requisição atual',
|
||||
'Current response': 'Resposta atual',
|
||||
'Current session': 'Sessão atual',
|
||||
'DESIGN': 'Projeto',
|
||||
'Date and Time': 'Data e Hora',
|
||||
'Delete': 'Apague',
|
||||
'Delete:': 'Apague:',
|
||||
'Deploy on Google App Engine': 'Publicar no Google App Engine',
|
||||
'Description': 'Descrição',
|
||||
'Design for': 'Projeto de',
|
||||
'Detailed traceback description': 'Detailed traceback description',
|
||||
'E-mail': 'E-mail',
|
||||
'EDIT': 'EDITAR',
|
||||
'Edit Profile': 'Editar Perfil',
|
||||
'Edit application': 'Editar aplicação',
|
||||
'Edit current record': 'Editar o registro atual',
|
||||
'Editing Language file': 'Editando arquivo de linguagem',
|
||||
'Editing file': 'Editando arquivo',
|
||||
'Editing file "%s"': 'Editando arquivo "%s"',
|
||||
'Enterprise Web Framework': 'Framework web empresarial',
|
||||
'Error': 'Erro',
|
||||
'Error logs for "%(app)s"': 'Logs de erro para "%(app)s"',
|
||||
'Error snapshot': 'Error snapshot',
|
||||
'Error ticket': 'Error ticket',
|
||||
'Exception instance attributes': 'Atributos da instancia de excessão',
|
||||
'File': 'Arquivo',
|
||||
'First name': 'Nome',
|
||||
'Frames': 'Frames',
|
||||
'Functions with no doctests will result in [passed] tests.': 'Funções sem doctests resultarão em testes [aceitos].',
|
||||
'Group ID': 'ID do Grupo',
|
||||
'Hello World': 'Olá Mundo',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Se o relatório acima contém um número de ticket, isso indica uma falha no controlador em execução, antes de tantar executar os doctests. Isto acontece geralmente por erro de endentação ou erro fora do código da função.\nO titulo em verde indica que os testes (se definidos) passaram. Neste caso os testes não são mostrados.',
|
||||
'Import/Export': 'Importar/Exportar',
|
||||
'Installed applications': 'Aplicações instaladas',
|
||||
'Internal State': 'Estado Interno',
|
||||
'Invalid Query': 'Consulta inválida',
|
||||
'Invalid action': 'Ação inválida',
|
||||
'Invalid email': 'E-mail inválido',
|
||||
'Language files (static strings) updated': 'Arquivos de linguagem (textos estáticos) atualizados',
|
||||
'Languages': 'Linguagens',
|
||||
'Last name': 'Sobrenome',
|
||||
'Last saved on:': 'Salvo em:',
|
||||
'License for': 'Licença para',
|
||||
'Login': 'Entrar',
|
||||
'Login to the Administrative Interface': 'Entrar na interface adminitrativa',
|
||||
'Logout': 'Sair',
|
||||
'Lost Password': 'Senha perdida',
|
||||
'Models': 'Modelos',
|
||||
'Modules': 'Módulos',
|
||||
'NO': 'NÃO',
|
||||
'Name': 'Nome',
|
||||
'New Record': 'Novo registro',
|
||||
'New application wizard': 'Assistente para novas aplicações ',
|
||||
'New simple application': 'Nova aplicação básica',
|
||||
'No databases in this application': 'Não existem bancos de dados nesta aplicação',
|
||||
'Origin': 'Origem',
|
||||
'Original/Translation': 'Original/Tradução',
|
||||
'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, não pode alterar a senha por aqui',
|
||||
'Password': 'Senha',
|
||||
'Peeking at file': 'Visualizando arquivo',
|
||||
'Plugin "%s" in application': 'Plugin "%s" na aplicação',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': 'Este site utiliza',
|
||||
'Query:': 'Consulta:',
|
||||
'Record ID': 'ID do Registro',
|
||||
'Register': 'Registrar-se',
|
||||
'Registration key': 'Chave de registro',
|
||||
'Resolve Conflict file': 'Arquivo de resolução de conflito',
|
||||
'Role': 'Papel',
|
||||
'Rows in table': 'Registros na tabela',
|
||||
'Rows selected': 'Registros selecionados',
|
||||
'Saved file hash:': 'Hash do arquivo salvo:',
|
||||
'Searching:': 'Searching:',
|
||||
'Static files': 'Arquivos estáticos',
|
||||
'Sure you want to delete this object?': 'Tem certeza que deseja apaagr este objeto?',
|
||||
'TM': 'MR',
|
||||
'Table name': 'Nome da tabela',
|
||||
'Testing application': 'Testando a aplicação',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "consulta" é uma condição como "db.tabela.campo1==\'valor\'". Algo como "db.tabela1.campo1==db.tabela2.campo2" resulta em um JOIN SQL.',
|
||||
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
|
||||
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
|
||||
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
|
||||
'There are no controllers': 'Não existem controllers',
|
||||
'There are no models': 'Não existem modelos',
|
||||
'There are no modules': 'Não existem módulos',
|
||||
'There are no plugins': 'There are no plugins',
|
||||
'There are no static files': 'Não existem arquicos estáticos',
|
||||
'There are no translators, only default language is supported': 'Não há traduções, somente a linguagem padrão é suportada',
|
||||
'There are no views': 'Não existem visões',
|
||||
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
|
||||
'This is the %(filename)s template': 'Este é o template %(filename)s',
|
||||
'Ticket': 'Ticket',
|
||||
'Ticket ID': 'Ticket ID',
|
||||
'Timestamp': 'Data Atual',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'Para criar um plugin, nomeio um arquivo/pasta como plugin_[nome]',
|
||||
'Traceback': 'Traceback',
|
||||
'Translation strings for the application': 'Translation strings for the application',
|
||||
'Unable to check for upgrades': 'Não é possível checar as atualizações',
|
||||
'Unable to download': 'Não é possível efetuar o download',
|
||||
'Unable to download app': 'Não é possível baixar a aplicação',
|
||||
'Unable to download app because:': 'Não é possível baixar a aplicação porque:',
|
||||
'Unable to download because': 'Não é possível baixar porque',
|
||||
'Update:': 'Atualizar:',
|
||||
'Upload & install packed application': 'Faça upload e instale uma aplicação empacotada',
|
||||
'Upload a package:': 'Faça upload de um pacote:',
|
||||
'Upload existing application': 'Faça upload de uma aplicação existente',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para criar consultas mais complexas.',
|
||||
'Use an url:': 'Use uma url:',
|
||||
'User ID': 'ID do Usuario',
|
||||
'Version': 'Versão',
|
||||
'Views': 'Visões',
|
||||
'Welcome to web2py': 'Bem-vindo ao web2py',
|
||||
'YES': 'SIM',
|
||||
'About': 'sobre',
|
||||
'additional code for your application': 'código adicional para sua aplicação',
|
||||
'admin disabled because no admin password': ' admin desabilitado por falta de senha definida',
|
||||
'admin disabled because not supported on google app engine': 'admin dehabilitado, não é soportado no GAE',
|
||||
'admin disabled because unable to access password file': 'admin desabilitado, não foi possível ler o arquivo de senha',
|
||||
'administrative interface': 'interface administrativa',
|
||||
'and rename it (required):': 'e renomeie (requerido):',
|
||||
'and rename it:': ' e renomeie:',
|
||||
'appadmin': 'appadmin',
|
||||
'appadmin is disabled because insecure channel': 'admin desabilitado, canal inseguro',
|
||||
'application "%s" uninstalled': 'aplicação "%s" desinstalada',
|
||||
'application compiled': 'aplicação compilada',
|
||||
'application is compiled and cannot be designed': 'A aplicação está compilada e não pode ser modificada',
|
||||
'arguments': 'argumentos',
|
||||
'back': 'voltar',
|
||||
'browse': 'buscar',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'cache, erros e sessões eliminadas',
|
||||
'cannot create file': 'Não é possível criar o arquivo',
|
||||
'cannot upload file "%(filename)s"': 'não é possível fazer upload do arquivo "%(filename)s"',
|
||||
'Change admin password': 'mudar senha de administrador',
|
||||
'check all': 'marcar todos',
|
||||
'Check for upgrades': 'checar por atualizações',
|
||||
'Clean': 'limpar',
|
||||
'click here for online examples': 'clique para ver exemplos online',
|
||||
'click here for the administrative interface': 'Clique aqui para acessar a interface administrativa',
|
||||
'click to check for upgrades': 'clique aqui para checar por atualizações',
|
||||
'click to open': 'clique para abrir',
|
||||
'code': 'código',
|
||||
'collapse/expand all': 'collapse/expand all',
|
||||
'commit (mercurial)': 'commit (mercurial)',
|
||||
'Compile': 'compilar',
|
||||
'compiled application removed': 'aplicação compilada removida',
|
||||
'controllers': 'controladores',
|
||||
'Create': 'criar',
|
||||
'create file with filename:': 'criar um arquivo com o nome:',
|
||||
'create new application:': 'nome da nova aplicação:',
|
||||
'created by': 'criado por',
|
||||
'crontab': 'crontab',
|
||||
'currently running': 'Executando',
|
||||
'currently saved or': 'Atualmente salvo ou',
|
||||
'customize me!': 'Modifique-me',
|
||||
'data uploaded': 'Dados enviados',
|
||||
'database': 'banco de dados',
|
||||
'database %s select': 'Seleção no banco de dados %s',
|
||||
'database administration': 'administração de banco de dados',
|
||||
'db': 'db',
|
||||
'defines tables': 'define as tabelas',
|
||||
'delete': 'apagar',
|
||||
'delete all checked': 'apagar marcados',
|
||||
'delete plugin': 'apagar plugin',
|
||||
'Deploy': 'publicar',
|
||||
'design': 'modificar',
|
||||
'direction: ltr': 'direção: ltr',
|
||||
'done!': 'feito!',
|
||||
'download layouts': 'download layouts',
|
||||
'download plugins': 'download plugins',
|
||||
'Edit': 'editar',
|
||||
'edit controller': 'editar controlador',
|
||||
'edit views:': 'editar visões:',
|
||||
'Errors': 'erros',
|
||||
'export as csv file': 'exportar como arquivo CSV',
|
||||
'exposes': 'expõe',
|
||||
'extends': 'estende',
|
||||
'failed to reload module': 'Falha ao recarregar o módulo',
|
||||
'failed to reload module because:': 'falha ao recarregar o módulo por:',
|
||||
'file "%(filename)s" created': 'arquivo "%(filename)s" criado',
|
||||
'file "%(filename)s" deleted': 'arquivo "%(filename)s" apagado',
|
||||
'file "%(filename)s" uploaded': 'arquivo "%(filename)s" enviado',
|
||||
'file "%(filename)s" was not deleted': 'arquivo "%(filename)s" não foi apagado',
|
||||
'file "%s" of %s restored': 'arquivo "%s" de %s restaurado',
|
||||
'file changed on disk': 'arquivo modificado no disco',
|
||||
'file does not exist': 'arquivo não existe',
|
||||
'file saved on %(time)s': 'arquivo salvo em %(time)s',
|
||||
'file saved on %s': 'arquivo salvo em %s',
|
||||
'files': 'files',
|
||||
'filter': 'filter',
|
||||
'Help': 'ajuda',
|
||||
'htmledit': 'htmledit',
|
||||
'includes': 'inclui',
|
||||
'insert new': 'inserir novo',
|
||||
'insert new %s': 'inserir novo %s',
|
||||
'inspect attributes': 'inspect attributes',
|
||||
'Install': 'instalar',
|
||||
'internal error': 'erro interno',
|
||||
'invalid password': 'senha inválida',
|
||||
'invalid request': 'solicitação inválida',
|
||||
'invalid ticket': 'ticket inválido',
|
||||
'language file "%(filename)s" created/updated': 'arquivo de linguagem "%(filename)s" criado/atualizado',
|
||||
'languages': 'linguagens',
|
||||
'languages updated': 'linguagens atualizadas',
|
||||
'loading...': 'carregando...',
|
||||
'locals': 'locals',
|
||||
'login': 'inicio de sessão',
|
||||
'Logout': 'finalizar sessão',
|
||||
'manage': 'gerenciar',
|
||||
'merge': 'juntar',
|
||||
'models': 'modelos',
|
||||
'modules': 'módulos',
|
||||
'new application "%s" created': 'nova aplicação "%s" criada',
|
||||
'new plugin installed': 'novo plugin instalado',
|
||||
'new record inserted': 'novo registro inserido',
|
||||
'next 100 rows': 'próximos 100 registros',
|
||||
'no match': 'não encontrado',
|
||||
'or import from csv file': 'ou importar de um arquivo CSV',
|
||||
'or provide app url:': 'ou forneça a url de uma aplicação:',
|
||||
'or provide application url:': 'ou forneça a url de uma aplicação:',
|
||||
'Overwrite installed app': 'sobrescrever aplicação instalada',
|
||||
'Pack all': 'criar pacote',
|
||||
'Pack compiled': 'criar pacote compilado',
|
||||
'pack plugin': 'empacotar plugin',
|
||||
'password changed': 'senha alterada',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
|
||||
'plugins': 'plugins',
|
||||
'previous 100 rows': '100 registros anteriores',
|
||||
'record': 'registro',
|
||||
'record does not exist': 'o registro não existe',
|
||||
'record id': 'id do registro',
|
||||
'Remove compiled': 'eliminar compilados',
|
||||
'request': 'request',
|
||||
'response': 'response',
|
||||
'restore': 'restaurar',
|
||||
'revert': 'reverter',
|
||||
'save': 'salvar',
|
||||
'selected': 'selecionado(s)',
|
||||
'session': 'session',
|
||||
'session expired': 'sessão expirada',
|
||||
'shell': 'Terminal',
|
||||
'Site': 'site',
|
||||
'some files could not be removed': 'alguns arquicos não puderam ser removidos',
|
||||
'Start wizard': 'iniciar assistente',
|
||||
'state': 'estado',
|
||||
'static': 'estáticos',
|
||||
'submit': 'enviar',
|
||||
'table': 'tabela',
|
||||
'test': 'testar',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': 'A lógica da aplicação, cada URL é mapeada para uma função exposta pelo controlador',
|
||||
'the data representation, define database tables and sets': 'A representação dos dadps, define tabelas e estruturas de dados',
|
||||
'the presentations layer, views are also known as templates': 'A camada de apresentação, As visões também são chamadas de templates',
|
||||
'these files are served without processing, your images go here': 'Estes arquivos são servidos sem processamento, suas imagens ficam aqui',
|
||||
'to previous version.': 'para a versão anterior.',
|
||||
'translation strings for the application': 'textos traduzidos para a aplicação',
|
||||
'try': 'tente',
|
||||
'try something like': 'tente algo como',
|
||||
'unable to create application "%s"': 'não é possível criar a aplicação "%s"',
|
||||
'unable to delete file "%(filename)s"': 'não é possível criar o arquico "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'não é possível criar o plugin "%(plugin)s"',
|
||||
'unable to parse csv file': 'não é possível analisar o arquivo CSV',
|
||||
'unable to uninstall "%s"': 'não é possível instalar "%s"',
|
||||
'unable to upgrade because "%s"': 'não é possível atualizar porque "%s"',
|
||||
'uncheck all': 'desmarcar todos',
|
||||
'Uninstall': 'desinstalar',
|
||||
'update': 'atualizar',
|
||||
'update all languages': 'atualizar todas as linguagens',
|
||||
'upgrade web2py now': 'atualize o web2py agora',
|
||||
'upload': 'upload',
|
||||
'upload application:': 'Fazer upload de uma aplicação:',
|
||||
'upload file:': 'Enviar arquivo:',
|
||||
'upload plugin file:': 'Enviar arquivo de plugin:',
|
||||
'variables': 'variáveis',
|
||||
'versioning': 'versionamento',
|
||||
'view': 'visão',
|
||||
'views': 'visões',
|
||||
'web2py Recent Tweets': 'Tweets Recentes de @web2py',
|
||||
'web2py is up to date': 'web2py está atualizado',
|
||||
'web2py upgraded; please restart it': 'web2py atualizado; favor reiniciar',
|
||||
}
|
||||
290
applications/admin/languages/zh-cn.py
Normal file
@@ -0,0 +1,290 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"browse"': '游览',
|
||||
'"save"': '"保存"',
|
||||
'"submit"': '"提交"',
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新"是可配置项 如 "field1=\'newvalue\'",你无法在JOIN 中更新或删除',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': '%s 行已删',
|
||||
'%s rows updated': '%s 行更新',
|
||||
'(requires internet access)': '(requires internet access)',
|
||||
'(something like "it-it")': '(就酱 "it-it")',
|
||||
'A new version of web2py is available': '新版本web2py已经可用',
|
||||
'A new version of web2py is available: %s': '新版本web2py已经可用: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '',
|
||||
'ATTENTION: you cannot edit the running application!': '注意: 不能修改正在运行中的应用!',
|
||||
'About': '关于',
|
||||
'About application': '关于这个应用',
|
||||
'Admin is disabled because insecure channel': '管理因不安全通道而关闭',
|
||||
'Admin is disabled because unsecure channel': '管理因不稳定通道而关闭',
|
||||
'Admin language': 'Admin language',
|
||||
'Administrator Password:': '管理员密码:',
|
||||
'Application name:': 'Application name:',
|
||||
'Are you sure you want to delete file "%s"?': '你真想删除文件"%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': '你真确定要卸载应用 "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': '你真确定要卸载应用 "%s" ?',
|
||||
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
|
||||
'Available databases and tables': '可用数据库/表',
|
||||
'Cannot be empty': '不能不填',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': '无法编译: 应用中有错误,请修订后再试.',
|
||||
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
|
||||
'Change Password': '修改密码',
|
||||
'Check to delete': '检验删除',
|
||||
'Checking for upgrades...': '是否有升级版本检查ing...',
|
||||
'Client IP': '客户端IP',
|
||||
'Controllers': '控制器s',
|
||||
'Create new simple application': '创建一个新应用',
|
||||
'Current request': '当前请求',
|
||||
'Current response': '当前返回',
|
||||
'Current session': '当前会话',
|
||||
'DESIGN': '设计',
|
||||
'Date and Time': '时间日期',
|
||||
'Delete': '删除',
|
||||
'Delete:': '删除:',
|
||||
'Deploy on Google App Engine': '部署到GAE',
|
||||
'Description': '描述',
|
||||
'Design for': '设计:',
|
||||
'E-mail': '邮箱:',
|
||||
'EDIT': '编辑',
|
||||
'Edit Profile': '修订配置',
|
||||
'Edit application': '修订应用',
|
||||
'Edit current record': '修订当前记录',
|
||||
'Editing Language file': '修订语言文件',
|
||||
'Editing file': '修订文件',
|
||||
'Editing file "%s"': '修订文件 %s',
|
||||
'Enterprise Web Framework': '强悍的网络开发框架',
|
||||
'Error logs for "%(app)s"': '"%(app)s" 的错误日志',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'First name': '姓',
|
||||
'Functions with no doctests will result in [passed] tests.': '',
|
||||
'Group ID': '组ID',
|
||||
'Hello World': '道可道,非常道;名可名,非常名',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
|
||||
'Import/Export': '导入/导出',
|
||||
'Installed applications': '已安装的应用',
|
||||
'Internal State': '内部状态',
|
||||
'Invalid Query': '无效查询',
|
||||
'Invalid action': '无效动作',
|
||||
'Invalid email': '无效的email',
|
||||
'Language files (static strings) updated': '语言文件(静态部分)已更新',
|
||||
'Languages': '语言',
|
||||
'Last name': '名',
|
||||
'Last saved on:': '最后保存于:',
|
||||
'License for': '许可证',
|
||||
'Login': '登录',
|
||||
'Login to the Administrative Interface': '登录到管理员界面',
|
||||
'Logout': '注销',
|
||||
'Lost Password': '忘记密码',
|
||||
'Models': '模型s',
|
||||
'Modules': '模块s',
|
||||
'NO': '不',
|
||||
'Name': '姓名',
|
||||
'New Record': '新记录',
|
||||
'New application wizard': 'New application wizard',
|
||||
'New simple application': 'New simple application',
|
||||
'No databases in this application': '这应用没有数据库',
|
||||
'Origin': '起源',
|
||||
'Original/Translation': '原始文件/翻译文件',
|
||||
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
|
||||
'Password': '密码',
|
||||
'Peeking at file': '选个文件',
|
||||
'Plugin "%s" in application': 'Plugin "%s" in application',
|
||||
'Plugins': 'Plugins',
|
||||
'Powered by': '',
|
||||
'Query:': '查询',
|
||||
'Record ID': '记录ID',
|
||||
'Register': '注册',
|
||||
'Registration key': '注册密匙',
|
||||
'Resolve Conflict file': '解决冲突文件',
|
||||
'Role': '角色',
|
||||
'Rows in table': '表行',
|
||||
'Rows selected': '行选择',
|
||||
'Saved file hash:': '已存文件Hash:',
|
||||
'Static files': '静态文件',
|
||||
'Sure you want to delete this object?': '真的要删除这个对象?',
|
||||
'TM': '',
|
||||
'Table name': '表名',
|
||||
'Testing application': '应用测试',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '',
|
||||
'There are no controllers': '冇控制器',
|
||||
'There are no models': '冇模型s',
|
||||
'There are no modules': '冇模块s',
|
||||
'There are no static files': '冇静态文件',
|
||||
'There are no translators, only default language is supported': '没有找到相应翻译,只能使用默认语言',
|
||||
'There are no views': '冇视图',
|
||||
'This is the %(filename)s template': '这是 %(filename)s 模板',
|
||||
'Ticket': '传票',
|
||||
'Timestamp': '时间戳',
|
||||
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
|
||||
'Unable to check for upgrades': '无法检查是否需要升级',
|
||||
'Unable to download': '无法下载',
|
||||
'Unable to download app': '无法下载应用',
|
||||
'Unable to download app because:': 'Unable to download app because:',
|
||||
'Unable to download because': 'Unable to download because',
|
||||
'Update:': '更新:',
|
||||
'Upload & install packed application': 'Upload & install packed application',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload existing application': '上传已有应用',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': '',
|
||||
'Use an url:': 'Use an url:',
|
||||
'User ID': '用户ID',
|
||||
'Version': '版本',
|
||||
'Views': '视图',
|
||||
'Welcome to web2py': '欢迎使用web2py',
|
||||
'YES': '是',
|
||||
'About': '关于',
|
||||
'additional code for your application': '给你的应用附加代码',
|
||||
'admin disabled because no admin password': '管理员需要设定密码,否则无法管理',
|
||||
'admin disabled because not supported on google app engine': '未支持GAE,无法管理',
|
||||
'admin disabled because unable to access password file': '需要可以操作密码文件,否则无法进行管理',
|
||||
'administrative interface': 'administrative interface',
|
||||
'and rename it (required):': '重命名为 (必须):',
|
||||
'and rename it:': ' 重命名为:',
|
||||
'appadmin': '应用管理',
|
||||
'appadmin is disabled because insecure channel': '应用管理因非法通道失效',
|
||||
'application "%s" uninstalled': '应用"%s" 已被卸载',
|
||||
'application compiled': '应用已编译完',
|
||||
'application is compiled and cannot be designed': '应用已编译完无法设计',
|
||||
'arguments': 'arguments',
|
||||
'back': 'back',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': '缓存、错误、sesiones已被清空',
|
||||
'cannot create file': '无法创建文件',
|
||||
'cannot upload file "%(filename)s"': '无法上传文件 "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'check all': '检查所有',
|
||||
'Check for upgrades': 'check for upgrades',
|
||||
'Clean': '清除',
|
||||
'click here for online examples': '猛击此处,查看在线实例',
|
||||
'click here for the administrative interface': '猛击此处,进入管理界面',
|
||||
'click to check for upgrades': '猛击查看是否有升级版本',
|
||||
'code': 'code',
|
||||
'Compile': '编译',
|
||||
'compiled application removed': '已编译应用已移走',
|
||||
'controllers': '控制器',
|
||||
'Create': 'create',
|
||||
'create file with filename:': '创建文件用这名:',
|
||||
'create new application:': '创建新应用:',
|
||||
'created by': '创建自',
|
||||
'crontab': '定期事务',
|
||||
'currently running': 'currently running',
|
||||
'currently saved or': '保存当前的或',
|
||||
'customize me!': '定制俺!',
|
||||
'data uploaded': '数据已上传',
|
||||
'database': '数据库',
|
||||
'database %s select': '数据库 %s 选择',
|
||||
'database administration': '数据库管理',
|
||||
'db': '',
|
||||
'defines tables': '已定义表',
|
||||
'delete': '删除',
|
||||
'delete all checked': '删除所有选择的',
|
||||
'delete plugin': 'delete plugin',
|
||||
'Deploy': 'deploy',
|
||||
'design': '设计',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': '搞定!',
|
||||
'Edit': '修改',
|
||||
'edit controller': '修订控制器',
|
||||
'edit views:': 'edit views:',
|
||||
'Errors': '错误',
|
||||
'export as csv file': '导出为CSV文件',
|
||||
'exposes': '暴露',
|
||||
'extends': '扩展',
|
||||
'failed to reload module': '重新加载模块失败',
|
||||
'failed to reload module because:': 'failed to reload module because:',
|
||||
'file "%(filename)s" created': '文件 "%(filename)s" 已创建',
|
||||
'file "%(filename)s" deleted': '文件 "%(filename)s" 已删除',
|
||||
'file "%(filename)s" uploaded': '文件 "%(filename)s" 已上传',
|
||||
'file "%(filename)s" was not deleted': '文件 "%(filename)s" 没删除',
|
||||
'file "%s" of %s restored': '文件"%s" 有关 %s 已重存',
|
||||
'file changed on disk': '硬盘上的文件已经修改',
|
||||
'file does not exist': '文件并不存在',
|
||||
'file saved on %(time)s': '文件保存于 %(time)s',
|
||||
'file saved on %s': '文件保存在 %s',
|
||||
'Help': '帮助',
|
||||
'htmledit': 'html编辑',
|
||||
'includes': '包含',
|
||||
'insert new': '新插入',
|
||||
'insert new %s': '新插入 %s',
|
||||
'Install': 'install',
|
||||
'internal error': '内部错误',
|
||||
'invalid password': '无效密码',
|
||||
'invalid request': '无效请求',
|
||||
'invalid ticket': '无效传票',
|
||||
'language file "%(filename)s" created/updated': '语言文件 "%(filename)s"被创建/更新',
|
||||
'languages': '语言',
|
||||
'languages updated': '语言已被刷新',
|
||||
'loading...': '载入中...',
|
||||
'login': '登录',
|
||||
'Logout': '注销',
|
||||
'merge': '合并',
|
||||
'models': '模型s',
|
||||
'modules': '模块s',
|
||||
'new application "%s" created': '新应用 "%s"已被创建',
|
||||
'new plugin installed': 'new plugin installed',
|
||||
'new record inserted': '新记录被插入',
|
||||
'next 100 rows': '后100行',
|
||||
'no match': 'no match',
|
||||
'or import from csv file': '或者,从csv文件导入',
|
||||
'or provide app url:': 'or provide app url:',
|
||||
'or provide application url:': '或者,提供应用所在地址链接:',
|
||||
'Overwrite installed app': 'overwrite installed app',
|
||||
'Pack all': '全部打包',
|
||||
'Pack compiled': '包编译完',
|
||||
'pack plugin': 'pack plugin',
|
||||
'password changed': 'password changed',
|
||||
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
|
||||
'previous 100 rows': '前100行',
|
||||
'record': 'record',
|
||||
'record does not exist': '记录并不存在',
|
||||
'record id': '记录ID',
|
||||
'Remove compiled': '已移除',
|
||||
'restore': '重存',
|
||||
'revert': '恢复',
|
||||
'save': '保存',
|
||||
'selected': '已选',
|
||||
'session expired': '会话过期',
|
||||
'shell': '',
|
||||
'Site': '总站',
|
||||
'some files could not be removed': '有些文件无法被移除',
|
||||
'Start wizard': 'start wizard',
|
||||
'state': '状态',
|
||||
'static': '静态文件',
|
||||
'submit': '提交',
|
||||
'table': '表',
|
||||
'test': '测试',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': '应用逻辑:每个URL由控制器暴露的函式完成映射',
|
||||
'the data representation, define database tables and sets': '数据表达式,定义数据库/表',
|
||||
'the presentations layer, views are also known as templates': '提交层/视图都在模板中可知',
|
||||
'these files are served without processing, your images go here': '',
|
||||
'to previous version.': 'to previous version.',
|
||||
'to previous version.': '退回前一版本',
|
||||
'translation strings for the application': '应用的翻译字串',
|
||||
'try': '尝试',
|
||||
'try something like': '尝试',
|
||||
'unable to create application "%s"': '无法创建应用 "%s"',
|
||||
'unable to delete file "%(filename)s"': '无法删除文件 "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
|
||||
'unable to parse csv file': '无法生成 cvs',
|
||||
'unable to uninstall "%s"': '无法卸载 "%s"',
|
||||
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
|
||||
'uncheck all': '反选全部',
|
||||
'Uninstall': '卸载',
|
||||
'update': '更新',
|
||||
'update all languages': '更新所有语言',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upload application:': '提交已有的应用:',
|
||||
'upload file:': '提交文件:',
|
||||
'upload plugin file:': 'upload plugin file:',
|
||||
'variables': 'variables',
|
||||
'versioning': '版本',
|
||||
'view': '视图',
|
||||
'views': '视图s',
|
||||
'web2py Recent Tweets': 'twitter上的web2py进展实播',
|
||||
'web2py is up to date': 'web2py现在已经是最新的版本了',
|
||||
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
|
||||
}
|
||||
302
applications/admin/languages/zh-tw.py
Normal file
@@ -0,0 +1,302 @@
|
||||
# coding: utf8
|
||||
{
|
||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
|
||||
'%Y-%m-%d': '%Y-%m-%d',
|
||||
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
|
||||
'%s rows deleted': '已刪除 %s 筆',
|
||||
'%s rows updated': '已更新 %s 筆',
|
||||
'(something like "it-it")': '(格式類似 "zh-tw")',
|
||||
'A new version of web2py is available': '新版的 web2py 已發行',
|
||||
'A new version of web2py is available: %s': '新版的 web2py 已發行: %s',
|
||||
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '注意: 登入管理帳號需要安全連線(HTTPS)或是在本機連線(localhost).',
|
||||
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '注意: 因為在測試模式不保證多執行緒安全性,也就是說不可以同時執行多個測試案例',
|
||||
'ATTENTION: you cannot edit the running application!': '注意:不可編輯正在執行的應用程式!',
|
||||
'About': '關於',
|
||||
'About application': '關於本應用程式',
|
||||
'Admin is disabled because insecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
|
||||
'Admin is disabled because unsecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
|
||||
'Administrator Password:': '管理員密碼:',
|
||||
'Are you sure you want to delete file "%s"?': '確定要刪除檔案"%s"?',
|
||||
'Are you sure you want to delete plugin "%s"?': '確定要刪除插件 "%s"?',
|
||||
'Are you sure you want to uninstall application "%s"': '確定要移除應用程式 "%s"',
|
||||
'Are you sure you want to uninstall application "%s"?': '確定要移除應用程式 "%s"',
|
||||
'Are you sure you want to upgrade web2py now?': '確定現在要升級 web2py?',
|
||||
'Authentication': '驗證',
|
||||
'Available databases and tables': '可提供的資料庫和資料表',
|
||||
'Cannot be empty': '不可空白',
|
||||
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': '無法編譯:應用程式中含有錯誤,請除錯後再試一次.',
|
||||
'Cannot compile: there are errors in your app:': '無法編譯: 在你的應用程式存在錯誤:',
|
||||
'Change Password': '變更密碼',
|
||||
'Check to delete': '打勾代表刪除',
|
||||
'Check to delete:': '打勾代表刪除:',
|
||||
'Checking for upgrades...': '檢查新版本中...',
|
||||
'Client IP': '客戶端網址(IP)',
|
||||
'Controller': '控件',
|
||||
'Controllers': '控件',
|
||||
'Copyright': '版權所有',
|
||||
'Create new simple application': '創建應用程式',
|
||||
'Current request': '目前網路資料要求(request)',
|
||||
'Current response': '目前網路資料回應(response)',
|
||||
'Current session': '目前網路連線資訊(session)',
|
||||
'DB Model': '資料庫模組',
|
||||
'DESIGN': '設計',
|
||||
'Database': '資料庫',
|
||||
'Date and Time': '日期和時間',
|
||||
'Delete': '刪除',
|
||||
'Delete:': '刪除:',
|
||||
'Deploy on Google App Engine': '配置到 Google App Engine',
|
||||
'Description': '描述',
|
||||
'Design for': '設計為了',
|
||||
'E-mail': '電子郵件',
|
||||
'EDIT': '編輯',
|
||||
'Edit': '編輯',
|
||||
'Edit Profile': '編輯設定檔',
|
||||
'Edit This App': '編輯本應用程式',
|
||||
'Edit application': '編輯應用程式',
|
||||
'Edit current record': '編輯當前紀錄',
|
||||
'Editing Language file': '編輯語言檔案',
|
||||
'Editing file': '編輯檔案',
|
||||
'Editing file "%s"': '編輯檔案"%s"',
|
||||
'Enterprise Web Framework': '企業網站平台',
|
||||
'Error logs for "%(app)s"': '"%(app)s"的錯誤紀錄',
|
||||
'Exception instance attributes': 'Exception instance attributes',
|
||||
'First name': '名',
|
||||
'Functions with no doctests will result in [passed] tests.': '沒有 doctests 的函式會顯示 [passed].',
|
||||
'Group ID': '群組編號',
|
||||
'Hello World': '嗨! 世界',
|
||||
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
|
||||
'Import/Export': '匯入/匯出',
|
||||
'Index': '索引',
|
||||
'Installed applications': '已安裝應用程式',
|
||||
'Internal State': '內部狀態',
|
||||
'Invalid Query': '不合法的查詢',
|
||||
'Invalid action': '不合法的動作(action)',
|
||||
'Invalid email': '不合法的電子郵件',
|
||||
'Language files (static strings) updated': '語言檔已更新',
|
||||
'Languages': '各國語言',
|
||||
'Last name': '姓',
|
||||
'Last saved on:': '最後儲存時間:',
|
||||
'Layout': '網頁配置',
|
||||
'License for': '許可證',
|
||||
'Login': '登入',
|
||||
'Login to the Administrative Interface': '登入到管理員介面',
|
||||
'Logout': '登出',
|
||||
'Lost Password': '密碼遺忘',
|
||||
'Main Menu': '主選單',
|
||||
'Menu Model': '選單模組(menu)',
|
||||
'Models': '資料模組',
|
||||
'Modules': '程式模組',
|
||||
'NO': '否',
|
||||
'Name': '名字',
|
||||
'New Record': '新紀錄',
|
||||
'No databases in this application': '這應用程式不含資料庫',
|
||||
'Origin': '原文',
|
||||
'Original/Translation': '原文/翻譯',
|
||||
'PAM authenticated user, cannot change password here': 'PAM 授權使用者, 無法在此變更密碼',
|
||||
'Password': '密碼',
|
||||
"Password fields don't match": '密碼欄不匹配',
|
||||
'Peeking at file': '選個文件',
|
||||
'Plugin "%s" in application': '在應用程式的插件 "%s"',
|
||||
'Plugins': '插件',
|
||||
'Powered by': '基於以下技術構建:',
|
||||
'Query:': '查詢:',
|
||||
'Record ID': '紀錄編號',
|
||||
'Register': '註冊',
|
||||
'Registration key': '註冊金鑰',
|
||||
'Remember me (for 30 days)': '記住帳號(30 天)',
|
||||
'Reset Password key': '重設密碼',
|
||||
'Resolve Conflict file': '解決衝突檔案',
|
||||
'Role': '角色',
|
||||
'Rows in table': '在資料表裏的資料',
|
||||
'Rows selected': '筆資料被選擇',
|
||||
'Saved file hash:': '檔案雜湊值已紀錄:',
|
||||
'Static files': '靜態檔案',
|
||||
'Stylesheet': '網頁風格檔',
|
||||
'Submit': '傳送',
|
||||
'Sure you want to delete this object?': '確定要刪除此物件?',
|
||||
'TM': 'TM',
|
||||
'Table name': '資料表名稱',
|
||||
'Testing application': '測試中的應用程式',
|
||||
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"查詢"是一個像 "db.表1.欄位1==\'值\'" 的條件式. 以"db.表1.欄位1==db.表2.欄位2"方式則相當於執行 JOIN SQL.',
|
||||
'There are no controllers': '沒有控件(controllers)',
|
||||
'There are no models': '沒有資料庫模組(models)',
|
||||
'There are no modules': '沒有程式模組(modules)',
|
||||
'There are no static files': '沒有靜態檔案',
|
||||
'There are no translators, only default language is supported': '沒有翻譯檔,只支援原始語言',
|
||||
'There are no views': '沒有視圖',
|
||||
'This is the %(filename)s template': '這是%(filename)s檔案的樣板(template)',
|
||||
'Ticket': '問題單',
|
||||
'Timestamp': '時間標記',
|
||||
'To create a plugin, name a file/folder plugin_[name]': '檔案或目錄名稱以 plugin_開頭來創建插件',
|
||||
'Unable to check for upgrades': '無法做升級檢查',
|
||||
'Unable to download': '無法下載',
|
||||
'Unable to download app': '無法下載應用程式',
|
||||
'Unable to download app because:': '無法下載應用程式因為:',
|
||||
'Unable to download because': '因為下列原因無法下載:',
|
||||
'Update:': '更新:',
|
||||
'Upload & install packed application': '上傳並安裝已打包的應用程式',
|
||||
'Upload existing application': '更新存在的應用程式',
|
||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': '使用下列方式來組合更複雜的條件式, (...)&(...) 代表同時存在的條件, (...)|(...) 代表擇一的條件, ~(...)則代表反向條件.',
|
||||
'User %(id)s Logged-in': '使用者 %(id)s 已登入',
|
||||
'User %(id)s Registered': '使用者 %(id)s 已註冊',
|
||||
'User ID': '使用者編號',
|
||||
'Verify Password': '驗證密碼',
|
||||
'Version': '版本',
|
||||
'View': '視圖',
|
||||
'Views': '視圖',
|
||||
'Welcome %s': '歡迎 %s',
|
||||
'Welcome to web2py': '歡迎使用 web2py',
|
||||
'YES': '是',
|
||||
'About': '關於',
|
||||
'additional code for your application': '應用程式額外的程式碼',
|
||||
'admin disabled because no admin password': '管理介面關閉原因是沒有設定管理員密碼 ',
|
||||
'admin disabled because not supported on google app engine': '管理介面關閉原因是不支援在google apps engine環境下運作',
|
||||
'admin disabled because unable to access password file': '管理介面關閉原因是無法存取密碼檔',
|
||||
'amy_ajax': 'amy_ajax',
|
||||
'and rename it (required):': '同時更名為(必要的):',
|
||||
'and rename it:': '同時更名為:',
|
||||
'appadmin': '應用程式管理員',
|
||||
'appadmin is disabled because insecure channel': '管理介面關閉理由是連線方式不安全',
|
||||
'application "%s" uninstalled': '已移除應用程式 "%s"',
|
||||
'application compiled': '已編譯應用程式',
|
||||
'application is compiled and cannot be designed': '應用程式已經編譯無法重新設計',
|
||||
'arguments': 'arguments',
|
||||
'back': '回復(back)',
|
||||
'cache': '快取記憶體',
|
||||
'cache, errors and sessions cleaned': '快取記憶體,錯誤紀錄,連線紀錄已清除',
|
||||
'cannot create file': '無法創建檔案',
|
||||
'cannot upload file "%(filename)s"': '無法上傳檔案 "%(filename)s"',
|
||||
'Change admin password': 'change admin password',
|
||||
'change_password': '變更密碼',
|
||||
'check all': '全選',
|
||||
'Clean': '清除',
|
||||
'click here for online examples': '點此處進入線上範例',
|
||||
'click here for the administrative interface': '點此處進入管理介面',
|
||||
'click to check for upgrades': '點擊打勾以便升級',
|
||||
'code': 'code',
|
||||
'Compile': '編譯',
|
||||
'compiled application removed': '已移除已編譯的應用程式',
|
||||
'controllers': '控件',
|
||||
'Create': '創建',
|
||||
'create file with filename:': '創建檔案:',
|
||||
'create new application:': '創建新應用程式:',
|
||||
'created by': '創建自',
|
||||
'crontab': '定時執行表',
|
||||
'currently saved or': '現在存檔或',
|
||||
'customize me!': '請調整我!',
|
||||
'data uploaded': '資料已上傳',
|
||||
'database': '資料庫',
|
||||
'database %s select': '已選擇 %s 資料庫',
|
||||
'database administration': '資料庫管理',
|
||||
'db': 'db',
|
||||
'defines tables': '定義資料表',
|
||||
'delete': '刪除',
|
||||
'delete all checked': '刪除所有已選擇項目',
|
||||
'delete plugin': '刪除插件',
|
||||
'delete_plugin': '刪除插件',
|
||||
'design': '設計',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'done!': '完成!',
|
||||
'Edit': '編輯',
|
||||
'edit controller': '編輯控件',
|
||||
'edit views:': '編輯視圖',
|
||||
'edit_language': '編輯語言檔',
|
||||
'Errors': '錯誤紀錄',
|
||||
'export as csv file': '以逗號分隔檔(csv)格式匯出',
|
||||
'exposes': '外顯',
|
||||
'extends': '擴展',
|
||||
'failed to reload module because:': '因為下列原因無法重新載入程式模組:',
|
||||
'file "%(filename)s" created': '檔案 "%(filename)s" 已創建',
|
||||
'file "%(filename)s" deleted': '檔案 "%(filename)s" 已刪除',
|
||||
'file "%(filename)s" uploaded': '檔案 "%(filename)s" 已上傳',
|
||||
'file "%s" of %s restored': '檔案 %s 的 "%s" 已回存',
|
||||
'file changed on disk': '在磁碟上檔案已改變',
|
||||
'file does not exist': '檔案不存在',
|
||||
'file saved on %(time)s': '檔案已於 %(time)s 儲存',
|
||||
'file saved on %s': '檔案在 %s 已儲存',
|
||||
'Help': '說明檔',
|
||||
'htmledit': 'html編輯',
|
||||
'includes': '包含',
|
||||
'index': '索引',
|
||||
'insert new': '插入新資料',
|
||||
'insert new %s': '插入新資料 %s',
|
||||
'Install': '安裝',
|
||||
'internal error': '內部錯誤',
|
||||
'invalid password': '密碼錯誤',
|
||||
'invalid request': '不合法的網路要求(request)',
|
||||
'invalid ticket': '不合法的問題單號',
|
||||
'language file "%(filename)s" created/updated': '語言檔"%(filename)s"已創建或更新',
|
||||
'languages': '語言檔',
|
||||
'loading...': '載入中...',
|
||||
'login': '登入',
|
||||
'Logout': '登出',
|
||||
'merge': '合併',
|
||||
'models': '資料庫模組',
|
||||
'modules': '程式模組',
|
||||
'new application "%s" created': '已創建新的應用程式 "%s"',
|
||||
'new plugin installed': '已安裝新插件',
|
||||
'new record inserted': '已新增新紀錄',
|
||||
'next 100 rows': '往後 100 筆',
|
||||
'no match': '無法匹配',
|
||||
'or import from csv file': '或是從逗號分隔檔(CSV)匯入',
|
||||
'or provide app url:': '或是提供應用程式的安裝網址:',
|
||||
'Overwrite installed app': '覆蓋已安裝的應用程式',
|
||||
'Pack all': '全部打包',
|
||||
'Pack compiled': '打包已編譯資料',
|
||||
'pack plugin': '打包插件',
|
||||
'password changed': '密碼已變更',
|
||||
'peek': '選取',
|
||||
'plugin': '插件',
|
||||
'plugin "%(plugin)s" deleted': '已刪除插件"%(plugin)s"',
|
||||
'previous 100 rows': '往前 100 筆',
|
||||
'record': '紀錄',
|
||||
'record does not exist': '紀錄不存在',
|
||||
'record id': '紀錄編號',
|
||||
'register': '註冊',
|
||||
'Remove compiled': '編譯檔案已移除',
|
||||
'resolve': '解決',
|
||||
'restore': '回存',
|
||||
'revert': '反向恢復',
|
||||
'save': '儲存',
|
||||
'selected': '已選擇',
|
||||
'session expired': '連線(session)已過時',
|
||||
'shell': '命令列操作介面',
|
||||
'Site': '網站',
|
||||
'some files could not be removed': '部份檔案無法移除',
|
||||
'state': '狀態',
|
||||
'static': '靜態檔案',
|
||||
'submit': '傳送',
|
||||
'table': '資料表',
|
||||
'test': '測試',
|
||||
'the application logic, each URL path is mapped in one exposed function in the controller': '應用程式邏輯 - 每個網址路徑對應到一個控件的函式',
|
||||
'the data representation, define database tables and sets': '資料展現層 - 用來定義資料表和集合',
|
||||
'the presentations layer, views are also known as templates': '外觀展現層 - 視圖有時也被稱為樣板',
|
||||
'these files are served without processing, your images go here': '這些檔案保留未經處理,你的影像檔在此',
|
||||
'ticket': '問題單',
|
||||
'to previous version.': '到前一個版本',
|
||||
'translation strings for the application': '翻譯此應用程式的字串',
|
||||
'try': '嘗試',
|
||||
'try something like': '嘗試如',
|
||||
'unable to create application "%s"': '無法創建應用程式 "%s"',
|
||||
'unable to delete file "%(filename)s"': '無法刪除檔案 "%(filename)s"',
|
||||
'unable to delete file plugin "%(plugin)s"': '無法刪查插件檔 "%(plugin)s"',
|
||||
'unable to parse csv file': '無法解析逗號分隔檔(csv)',
|
||||
'unable to uninstall "%s"': '無法移除安裝 "%s"',
|
||||
'unable to upgrade because "%s"': '無法升級因為 "%s"',
|
||||
'uncheck all': '全不選',
|
||||
'Uninstall': '解除安裝',
|
||||
'update': '更新',
|
||||
'update all languages': '將程式中待翻譯語句更新到所有的語言檔',
|
||||
'upgrade web2py now': 'upgrade web2py now',
|
||||
'upgrade_web2py': '升級 web2py',
|
||||
'upload application:': '上傳應用程式:',
|
||||
'upload file:': '上傳檔案:',
|
||||
'upload plugin file:': '上傳插件檔:',
|
||||
'variables': 'variables',
|
||||
'versioning': '版本管理',
|
||||
'view': '視圖',
|
||||
'views': '視圖',
|
||||
'web2py Recent Tweets': 'web2py 最近的 Tweets',
|
||||
'web2py is up to date': 'web2py 已經是最新版',
|
||||
'web2py upgraded; please restart it': '已升級 web2py ; 請重新啟動',
|
||||
}
|
||||
65
applications/admin/models/0.py
Normal file
@@ -0,0 +1,65 @@
|
||||
EXPIRATION = 60 * 60 # logout after 60 minutes of inactivity
|
||||
CHECK_VERSION = True
|
||||
WEB2PY_URL = 'http://web2py.com'
|
||||
WEB2PY_VERSION_URL = WEB2PY_URL+'/examples/default/version'
|
||||
|
||||
###########################################################################
|
||||
# Preferences for EditArea
|
||||
# the user-interface feature that allows you to edit files in your web
|
||||
# browser.
|
||||
|
||||
## Default editor
|
||||
TEXT_EDITOR = 'edit_area' or 'amy'
|
||||
|
||||
### edit_area
|
||||
# The default font size, measured in 'points'. The value must be an integer > 0
|
||||
FONT_SIZE = 10
|
||||
|
||||
# Displays the editor in full screen mode. The value must be 'true' or 'false'
|
||||
FULL_SCREEN = 'false'
|
||||
|
||||
# Display a check box under the editor to allow the user to switch
|
||||
# between the editor and a simple
|
||||
# HTML text area. The value must be 'true' or 'false'
|
||||
ALLOW_TOGGLE = 'true'
|
||||
|
||||
# Replaces tab characters with space characters.
|
||||
# The value can be 'false' (meaning that tabs are not replaced),
|
||||
# or an integer > 0 that specifies the number of spaces to replace a tab with.
|
||||
REPLACE_TAB_BY_SPACES = 4
|
||||
|
||||
# Toggle on/off the code editor instead of textarea on startup
|
||||
DISPLAY = "onload" or "later"
|
||||
|
||||
# if demo mode is True then admin works readonly and does not require login
|
||||
DEMO_MODE = False
|
||||
|
||||
# if visible_apps is not empty only listed apps will be accessible
|
||||
FILTER_APPS = []
|
||||
|
||||
# To upload on google app engine this has to point to the proper appengine
|
||||
# config file
|
||||
import os
|
||||
# extract google_appengine_x.x.x.zip to web2py root directory
|
||||
#GAE_APPCFG = os.path.abspath(os.path.join('appcfg.py'))
|
||||
# extract google_appengine_x.x.x.zip to applications/admin/private/
|
||||
GAE_APPCFG = os.path.abspath(os.path.join('/usr/local/bin/appcfg.py'))
|
||||
|
||||
# To use web2py as a teaching tool, set MULTI_USER_MODE to True
|
||||
MULTI_USER_MODE = False
|
||||
|
||||
# configurable twitterbox, set to None/False to suppress
|
||||
TWITTER_HASH = "web2py"
|
||||
|
||||
# parameter for downloading LAYOUTS
|
||||
LAYOUTS_APP = 'http://web2py.com/layouts'
|
||||
#LAYOUTS_APP = 'http://127.0.0.1:8000/layouts'
|
||||
|
||||
|
||||
# parameter for downloading PLUGINS
|
||||
PLUGINS_APP = 'http://web2py.com/plugins'
|
||||
#PLUGINS_APP = 'http://127.0.0.1:8000/plugins'
|
||||
|
||||
# set the language
|
||||
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
|
||||
T.force(request.cookies['adminLanguage'].value)
|
||||
26
applications/admin/models/0_imports.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import urllib
|
||||
import cgi
|
||||
import difflib
|
||||
import shutil
|
||||
import stat
|
||||
import socket
|
||||
|
||||
from textwrap import dedent
|
||||
|
||||
try:
|
||||
from mercurial import ui, hg, cmdutil
|
||||
have_mercurial = True
|
||||
except ImportError:
|
||||
have_mercurial = False
|
||||
|
||||
from gluon.utils import md5_hash
|
||||
from gluon.fileutils import listdir, cleanpath, up
|
||||
from gluon.fileutils import tar, tar_compiled, untar, fix_newlines
|
||||
from gluon.languages import findT, update_all_languages
|
||||
from gluon.myregex import *
|
||||
from gluon.restricted import *
|
||||
from gluon.compileapp import compile_application, remove_compiled_application
|
||||
146
applications/admin/models/access.py
Normal file
@@ -0,0 +1,146 @@
|
||||
import os, time
|
||||
from gluon import portalocker
|
||||
from gluon.admin import apath
|
||||
from gluon.fileutils import read_file
|
||||
# ###########################################################
|
||||
# ## make sure administrator is on localhost or https
|
||||
# ###########################################################
|
||||
|
||||
http_host = request.env.http_host.split(':')[0]
|
||||
|
||||
if request.env.web2py_runtime_gae:
|
||||
session_db = DAL('gae')
|
||||
session.connect(request, response, db=session_db)
|
||||
hosts = (http_host, )
|
||||
|
||||
if request.env.http_x_forwarded_for or request.is_https:
|
||||
session.secure()
|
||||
elif not request.is_local and not DEMO_MODE:
|
||||
raise HTTP(200, T('Admin is disabled because insecure channel'))
|
||||
|
||||
try:
|
||||
_config = {}
|
||||
port = int(request.env.server_port or 0)
|
||||
restricted(read_file(apath('../parameters_%i.py' % port, request)), _config)
|
||||
|
||||
if not 'password' in _config or not _config['password']:
|
||||
raise HTTP(200, T('admin disabled because no admin password'))
|
||||
except IOError:
|
||||
import gluon.fileutils
|
||||
if request.env.web2py_runtime_gae:
|
||||
if gluon.fileutils.check_credentials(request):
|
||||
session.authorized = True
|
||||
session.last_time = time.time()
|
||||
else:
|
||||
raise HTTP(200,
|
||||
T('admin disabled because not supported on google app engine'))
|
||||
else:
|
||||
raise HTTP(200, T('admin disabled because unable to access password file'))
|
||||
|
||||
|
||||
def verify_password(password):
|
||||
session.pam_user = None
|
||||
if DEMO_MODE:
|
||||
return True
|
||||
elif not 'password' in _config:
|
||||
return False
|
||||
elif _config['password'].startswith('pam_user:'):
|
||||
session.pam_user = _config['password'][9:].strip()
|
||||
import gluon.contrib.pam
|
||||
return gluon.contrib.pam.authenticate(session.pam_user,password)
|
||||
else:
|
||||
return _config['password'] == CRYPT()(password)[0]
|
||||
|
||||
|
||||
# ###########################################################
|
||||
# ## handle brute-force login attacks
|
||||
# ###########################################################
|
||||
|
||||
deny_file = os.path.join(request.folder, 'private', 'hosts.deny')
|
||||
allowed_number_of_attempts = 5
|
||||
expiration_failed_logins = 3600
|
||||
|
||||
def read_hosts_deny():
|
||||
import datetime
|
||||
hosts = {}
|
||||
if os.path.exists(deny_file):
|
||||
hosts = {}
|
||||
f = open(deny_file, 'r')
|
||||
portalocker.lock(f, portalocker.LOCK_SH)
|
||||
for line in f.readlines():
|
||||
if not line.strip() or line.startswith('#'):
|
||||
continue
|
||||
fields = line.strip().split()
|
||||
if len(fields) > 2:
|
||||
hosts[fields[0].strip()] = ( # ip
|
||||
int(fields[1].strip()), # n attemps
|
||||
int(fields[2].strip()) # last attempts
|
||||
)
|
||||
portalocker.unlock(f)
|
||||
f.close()
|
||||
return hosts
|
||||
|
||||
def write_hosts_deny(denied_hosts):
|
||||
f = open(deny_file, 'w')
|
||||
portalocker.lock(f, portalocker.LOCK_EX)
|
||||
for key, val in denied_hosts.items():
|
||||
if time.time()-val[1] < expiration_failed_logins:
|
||||
line = '%s %s %s\n' % (key, val[0], val[1])
|
||||
f.write(line)
|
||||
portalocker.unlock(f)
|
||||
f.close()
|
||||
|
||||
def login_record(success=True):
|
||||
denied_hosts = read_hosts_deny()
|
||||
val = (0,0)
|
||||
if success and request.client in denied_hosts:
|
||||
del denied_hosts[request.client]
|
||||
elif not success and not request.is_local:
|
||||
val = denied_hosts.get(request.client,(0,0))
|
||||
if time.time()-val[1]<expiration_failed_logins \
|
||||
and val[0] >= allowed_number_of_attempts:
|
||||
return val[0] # locked out
|
||||
time.sleep(2**val[0])
|
||||
val = (val[0]+1,int(time.time()))
|
||||
denied_hosts[request.client] = val
|
||||
write_hosts_deny(denied_hosts)
|
||||
return val[0]
|
||||
|
||||
|
||||
# ###########################################################
|
||||
# ## session expiration
|
||||
# ###########################################################
|
||||
|
||||
t0 = time.time()
|
||||
if session.authorized:
|
||||
|
||||
if session.last_time and session.last_time < t0 - EXPIRATION:
|
||||
session.flash = T('session expired')
|
||||
session.authorized = False
|
||||
else:
|
||||
session.last_time = t0
|
||||
|
||||
if not session.authorized and not \
|
||||
(request.controller == 'default' and \
|
||||
request.function in ('index','user')):
|
||||
|
||||
if request.env.query_string:
|
||||
query_string = '?' + request.env.query_string
|
||||
else:
|
||||
query_string = ''
|
||||
|
||||
if request.env.web2py_original_uri:
|
||||
url = request.env.web2py_original_uri
|
||||
else:
|
||||
url = request.env.path_info + query_string
|
||||
redirect(URL(request.application, 'default', 'index', vars=dict(send=url)))
|
||||
elif session.authorized and \
|
||||
request.controller == 'default' and \
|
||||
request.function == 'index':
|
||||
redirect(URL(request.application, 'default', 'site'))
|
||||
|
||||
|
||||
if request.controller=='appadmin' and DEMO_MODE:
|
||||
session.flash = 'Appadmin disabled in demo mode'
|
||||
redirect(URL('default','sites'))
|
||||
|
||||
23
applications/admin/models/buttons.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Template helpers
|
||||
|
||||
import os
|
||||
|
||||
def button(href, label):
|
||||
return A(SPAN(label),_class='button',_href=href)
|
||||
|
||||
def button_enable(href, app):
|
||||
if os.path.exists(os.path.join(apath(app,r=request),'DISABLED')):
|
||||
label = SPAN(T('Enable'),_style='color:red')
|
||||
else:
|
||||
label = SPAN(T('Disable'),_style='color:green')
|
||||
id = 'enable_'+app
|
||||
return A(label,_class='button',_id=id,callback=href,target=id)
|
||||
|
||||
def sp_button(href, label):
|
||||
return A(SPAN(label),_class='button special',_href=href)
|
||||
|
||||
def helpicon():
|
||||
return IMG(_src=URL('static', 'images/help.png'), _alt='help')
|
||||
|
||||
def searchbox(elementid):
|
||||
return TAG[''](LABEL(IMG(_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
|
||||
40
applications/admin/models/db.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# this file is released under public domain and you can use without limitations
|
||||
|
||||
if MULTI_USER_MODE:
|
||||
db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB
|
||||
from gluon.tools import *
|
||||
mail = Mail() # mailer
|
||||
auth = Auth(globals(),db) # authentication/authorization
|
||||
crud = Crud(globals(),db) # for CRUD helpers using auth
|
||||
service = Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc
|
||||
plugins = PluginManager()
|
||||
|
||||
mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server
|
||||
mail.settings.sender = 'you@gmail.com' # your email
|
||||
mail.settings.login = 'username:password' # your credentials or None
|
||||
|
||||
auth.settings.hmac_key = '<your secret key>' # before define_tables()
|
||||
auth.define_tables() # creates all needed tables
|
||||
auth.settings.mailer = mail # for user email verification
|
||||
auth.settings.registration_requires_verification = False
|
||||
auth.settings.registration_requires_approval = True
|
||||
auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
|
||||
auth.settings.reset_password_requires_verification = True
|
||||
auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'
|
||||
|
||||
db.define_table('app',Field('name'),Field('owner',db.auth_user))
|
||||
|
||||
if not session.authorized and MULTI_USER_MODE:
|
||||
if auth.user and not request.function=='user':
|
||||
session.authorized = True
|
||||
elif not request.function=='user':
|
||||
redirect(URL('default','user/login'))
|
||||
|
||||
def is_manager():
|
||||
if not MULTI_USER_MODE:
|
||||
return True
|
||||
elif auth.user and auth.user.id==1:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
33
applications/admin/models/menu.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# ###########################################################
|
||||
# ## generate menu
|
||||
# ###########################################################
|
||||
|
||||
_a = request.application
|
||||
_c = request.controller
|
||||
_f = request.function
|
||||
response.title = '%s %s' % (_f, '/'.join(request.args))
|
||||
response.subtitle = 'admin'
|
||||
response.menu = [(T('Site'), _f == 'site', URL(_a,'default','site'))]
|
||||
|
||||
if request.args:
|
||||
_t = request.args[0]
|
||||
response.menu.append((T('Edit'), _c == 'default' and _f == 'design',
|
||||
URL(_a,'default','design',args=_t)))
|
||||
response.menu.append((T('About'), _c == 'default' and _f == 'about',
|
||||
URL(_a,'default','about',args=_t)))
|
||||
response.menu.append((T('Errors'), _c == 'default' and _f == 'errors',
|
||||
URL(_a,'default','errors',args=_t)))
|
||||
response.menu.append((T('Versioning'),
|
||||
_c == 'mercurial' and _f == 'commit',
|
||||
URL(_a,'mercurial','commit',args=_t)))
|
||||
|
||||
if not session.authorized:
|
||||
response.menu = [(T('Login'), True, '')]
|
||||
else:
|
||||
response.menu.append((T('Logout'), False,
|
||||
URL(_a,'default',f='logout')))
|
||||
|
||||
if os.path.exists('applications/examples'):
|
||||
response.menu.append((T('Help'), False, URL('examples','default','index')))
|
||||
else:
|
||||
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
|
||||
4
applications/admin/models/plugin_multiselect.py
Normal file
@@ -0,0 +1,4 @@
|
||||
response.files.append(URL('static','plugin_multiselect/jquery.dimensions.js'))
|
||||
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.js'))
|
||||
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.css'))
|
||||
response.files.append(URL('static','plugin_multiselect/start.js'))
|
||||
0
applications/admin/modules/__init__.py
Normal file
56
applications/admin/static/css/anytime.css
Normal file
@@ -0,0 +1,56 @@
|
||||
/* anytimec.css 4.1112H (anytime.css 4.1112H)
|
||||
Copyright 2008-2010 Andrew M. Andrews III (www.AMA3.com). Some Rights
|
||||
Reserved. This work licensed under the Creative Commons Attribution-
|
||||
Noncommercial-Share Alike 3.0 Unported License except in jurisdicitons
|
||||
for which the license has been ported by Creative Commons International,
|
||||
where the work is licensed under the applicable ported license instead.
|
||||
For a copy of the unported license, visit
|
||||
http://creativecommons.org/licenses/by-nc-sa/3.0/
|
||||
or send a letter to Creative Commons, 171 Second Street, Suite 300,
|
||||
San Francisco, California, 94105, USA. For ported versions of the
|
||||
license, visit http://creativecommons.org/international/
|
||||
Any+Time is a trademark of Andrew M. Andrews III. */
|
||||
.AnyTime-pkr * {border:0;font: inherit;font-size: x-small;font-style:normal;font-weight:normal;list-style-type:none;margin:0;padding:0;white-space: nowrap}
|
||||
.AnyTime-win {background-color:#F0F0F1;border:3px solid #C0C0C0;font:normal normal normal xx-small/normal sans-serif;padding-bottom:0.2em;-moz-border-radius:6px;-webkit-border-radius:6px}
|
||||
.AnyTime-pkr .AnyTime-cloak {background-color:#D7D7D7;opacity:0.7;filter:alpha(opacity=70)}
|
||||
.AnyTime-pkr .AnyTime-hdr {background-color:#D0D0D1;color:#606062;font-family:Arial,Helvetica,sans-serif;font-size:medium;font-weight:normal;height:1em;margin:0;padding:0 0 0.4em 0;text-align:center;-moz-border-radius:2px;-webkit-border-radius:2px}
|
||||
.AnyTime-pkr .AnyTime-x-btn {background-color:#FCFCFF;border:1px solid #F99;color:#FF9F9F;cursor:default;float:right;margin:0.3em;text-align:center;width:1.5em;-moz-border-radius:0.4em;-webkit-border-radius:0.4em}
|
||||
.AnyTime-pkr .AnyTime-btn {background-color:#FCFCFE;border:1px solid #999;color:#606062;cursor:default;float:left;font-family:Arial,Helvetica,sans-serif;height:1.5em;margin-bottom:1px;margin-right:1px;padding-top:0.1em;-moz-border-radius:0.4em;-webkit-border-radius:0.4em}
|
||||
.AnyTime-pkr .AnyTime-body {padding:0.5em}
|
||||
.AnyTime-pkr .AnyTime-date {float:left;padding:0 0.5em}
|
||||
.AnyTime-pkr .AnyTime-lbl {clear:left;color:#606063;font-family:Arial,Helvetica,sans-serif;font-size:100%;font-weight:normal;font-style:normal;height:1.3em;margin:0;padding:0;text-align:center}
|
||||
.AnyTime-pkr .AnyTime-yrs {height:2.6em;text-align:center;width:18.6em}
|
||||
.AnyTime-pkr .AnyTime-yrs-past-btn {width:2.7em}
|
||||
.AnyTime-pkr .AnyTime-yr-prior-btn, .AnyTime-pkr .AnyTime-yr-cur-btn, .AnyTime-pkr .AnyTime-yr-next-btn {width:3.75em}
|
||||
.AnyTime-pkr .AnyTime-yrs-ahead-btn {width:2.7em}
|
||||
.AnyTime-pkr .AnyTime-mons {height:4.8em;text-align:center;width:18.8em}
|
||||
.AnyTime-pkr .AnyTime-mon-btn {width:2.75em}
|
||||
.AnyTime-pkr .AnyTime-mon7-btn {clear:left}
|
||||
.AnyTime-pkr .AnyTime-dom-table {background-color:#F0F0F1;border:1px solid #E3E3E4;border-spacing:1px;width:18.6em}
|
||||
.AnyTime-pkr th.AnyTime-dow {background-color:#C0C0C1;color:white;font-family:Arial,Helvetica,sans-serif;font-size:95%;font-weight:normal;font-style:normal}
|
||||
.AnyTime-pkr .AnyTime-dom-btn {float:none;height:1.7em;text-align:right;padding:0 0.5em 0 0}
|
||||
.AnyTime-pkr .AnyTime-dom-btn-empty {background-color:#F3F3F4;border:1px solid #C0C0c1}
|
||||
.AnyTime-pkr .AnyTime-time {float:left;padding:0 0 0 1em;text-align:center}
|
||||
.AnyTime-pkr .AnyTime-hrs {float:left;padding-left:0.5em;padding-right:0.5em;text-align:center;width:7.2em}
|
||||
.AnyTime-pkr .AnyTime-hrs-am, .AnyTime-pkr .AnyTime-hrs-pm {float:left;width:3.6em}
|
||||
.AnyTime-pkr .AnyTime-hr-btn {text-align:right;padding-right:0.25em;width:3em; }
|
||||
.AnyTime-pkr .AnyTime-mins {float:left;padding-left:0.5em;padding-right:0.5em;text-align:center;width:4.7em}
|
||||
.AnyTime-pkr .AnyTime-mins-tens, .AnyTime-pkr .AnyTime-mins-ones {float:left;width:2.3em}
|
||||
.AnyTime-pkr .AnyTime-min-ten-btn, .AnyTime-pkr .AnyTime-min-one-btn {float:left;text-align:center;width:2em}
|
||||
.AnyTime-pkr .AnyTime-min-ten-btn-empty, .AnyTime-pkr .AnyTime-min-one-btn-empty {background-color:#F3F3F4;border:1px solid #C0C0c1}
|
||||
.AnyTime-pkr .AnyTime-secs {float:left;padding-left:0.5em;padding-right:0.5em;text-align:center;width:4.7em}
|
||||
.AnyTime-pkr .AnyTime-secs-tens, .AnyTime-pkr .AnyTime-secs-ones {float:left;width:2.3em}
|
||||
.AnyTime-pkr .AnyTime-sec-ten-btn, .AnyTime-pkr .AnyTime-sec-one-btn {float:left;text-align:center;width:2em}
|
||||
.AnyTime-pkr .AnyTime-sec-ten-btn-empty, .AnyTime-pkr .AnyTime-sec-one-btn-empty {background-color:#F3F3F4;border:1px solid #C0C0c1}
|
||||
.AnyTime-pkr .AnyTime-offs {clear:left;float:left;padding-left:0.5em;padding-top:0.5em;text-align:center}
|
||||
.AnyTime-pkr .AnyTime-off-select-btn {width:1.5em}
|
||||
.AnyTime-pkr .AnyTime-body-yr-selector {padding:1em; }
|
||||
.AnyTime-pkr .AnyTime-yr-mil, .AnyTime-pkr .AnyTime-yr-cent, .AnyTime-pkr .AnyTime-yr-dec, .AnyTime-pkr .AnyTime-yr-yr {float:left;width:2.5em}
|
||||
.AnyTime-pkr .AnyTime-mil-btn, .AnyTime-pkr .AnyTime-cent-btn, .AnyTime-pkr .AnyTime-dec-btn, .AnyTime-pkr .AnyTime-yr-btn {float:left;text-align:center;width:2em}
|
||||
.AnyTime-pkr .AnyTime-yr-era {float:left;padding-left:1em;width:4.1em}
|
||||
.AnyTime-pkr .AnyTime-era-btn {text-align:center;width:3em}
|
||||
.AnyTime-pkr .AnyTime-body-off-selector {margin:0.5em; }
|
||||
.AnyTime-pkr .AnyTime-off-off-btn {clear:left;padding-left:1em;padding-right:1em;text-align:left}
|
||||
.AnyTime-pkr .AnyTime-cur-btn {border:1px solid #333334;background-color:#C0C0C1;color:#FCFCFE;font-weight:bold}
|
||||
.AnyTime-pkr .AnyTime-out-btn {background-color:#F0F0F1;border:1px solid #C0C0c1}
|
||||
.AnyTime-pkr .AnyTime-focus-btn {border:1px dashed black}
|
||||
47
applications/admin/static/css/jqueryMultiSelect.css
Executable file
@@ -0,0 +1,47 @@
|
||||
.multiSelect {
|
||||
width: 200px;
|
||||
border: solid 1px #BBB;
|
||||
background: #FFF right center no-repeat;
|
||||
padding: 2px 4px;
|
||||
padding-right: 20px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.multiSelect.hover {
|
||||
background: right center no-repeat;
|
||||
}
|
||||
|
||||
.multiSelect.active,
|
||||
.multiSelect.focus {
|
||||
border: inset 1px #000;
|
||||
}
|
||||
|
||||
.multiSelect.active {
|
||||
background: right center no-repeat;
|
||||
}
|
||||
|
||||
.multiSelectOptions {
|
||||
width: 500px;
|
||||
max-height: 150px;
|
||||
margin-top: -1px;
|
||||
overflow: auto;
|
||||
border: solid 1px #B2B2B2;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.multiSelectOptions LABEL {
|
||||
padding: 2px 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multiSelectOptions LABEL.checked {
|
||||
background: #E6E6E6;
|
||||
}
|
||||
|
||||
.multiSelectOptions LABEL.selectAll {
|
||||
border-bottom: dotted 1px #CCC;
|
||||
}
|
||||
|
||||
.multiSelectOptions LABEL.hover {
|
||||
background: #CFCFCF;
|
||||
}
|
||||
1065
applications/admin/static/css/styles.css
Normal file
389
applications/admin/static/eamy/bundle_markup.js
Normal file
@@ -0,0 +1,389 @@
|
||||
/*
|
||||
* eAmy.Offline - Amy Editor embedded for offline use.
|
||||
* http://www.april-child.com/amy
|
||||
*
|
||||
* Published under MIT License.
|
||||
* Copyright (c) 2007-2008 Petr Krontorád, April-Child.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*
|
||||
*
|
||||
* This file is auto-generated from original Fry Framework and Amy Editor sources..
|
||||
*/
|
||||
|
||||
|
||||
// Generated from theme definition file.
|
||||
$class('ac.chap.theme.EAmy < ac.chap.Theme');
|
||||
|
||||
ac.chap.theme.EAmy.prototype.initDefinition = function()
|
||||
{
|
||||
// $call(this, 'ac.chap.Theme.initDefinition');this.cssId = 'black';
|
||||
//this.background = '#072240';
|
||||
//this.textColor = '#DFEFFF';
|
||||
//this.caretColor = 'lime';
|
||||
//this.caretRowStyleActive = '#041629';
|
||||
//this.selectionStyle = '#86553b';
|
||||
//this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#0084FF;font-style:italic';
|
||||
//this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#0084FF;font-style:italic';
|
||||
//this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#00DF00';
|
||||
//this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#00DF00';
|
||||
//this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#FF9D00';
|
||||
//this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#FF5B8C';
|
||||
//this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#FF9D00;';
|
||||
//this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#FFF177';
|
||||
//this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#54FFB8';
|
||||
//this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#FFE000';
|
||||
//this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#71E5B6';
|
||||
//this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#FF78E5';
|
||||
|
||||
$call(this, 'ac.chap.Theme.initDefinition');this.cssId = 'twilight';
|
||||
this.background = '#141414';
|
||||
this.textColor = '#F8F8F8';
|
||||
this.caretColor = '#A7A7A7';
|
||||
this.caretRowStyleActive = '#1B1B1B';
|
||||
this.selectionStyle = '#3C4043';
|
||||
this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#605A60;font-style:italic';
|
||||
this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#605A60;font-style:italic';
|
||||
this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#8B9F67';
|
||||
this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#D4F29E';
|
||||
this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#D2A964';
|
||||
this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#DE6848';
|
||||
this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#EFC25A;';
|
||||
this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#ABC4DC';
|
||||
this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#A0849E';
|
||||
this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#DAD280';
|
||||
this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#7286A8';
|
||||
this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#A55C29';
|
||||
}
|
||||
|
||||
|
||||
// Generated from bundle keymap definition file.
|
||||
ac.chap.KeyMap.prototype.initDefinition = function()
|
||||
{
|
||||
var _ = '\n';
|
||||
this.compile
|
||||
(""+_+ "KEY: 0"
|
||||
+_+ " insert(character:true)"
|
||||
+_+ "KEY: -37"
|
||||
+_+ " caret(move:'left')"
|
||||
+_+ "KEY: -37+shift"
|
||||
+_+ " caret(move:'left')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -37+ctrl"
|
||||
+_+ " caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
|
||||
+_+ "KEY: -37+alt"
|
||||
+_+ " caret(move:'prev_word')"
|
||||
+_+ "KEY: -37+ctrl+shift"
|
||||
+_+ " caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -37+alt+shift"
|
||||
+_+ " caret(move:'prev_word')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -37+meta"
|
||||
+_+ " caret(move:'row_start')"
|
||||
+_+ "KEY: -37+meta+shift"
|
||||
+_+ " caret(move:'row_start')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39"
|
||||
+_+ " caret(move:'right')"
|
||||
+_+ "KEY: -39+shift"
|
||||
+_+ " caret(move:'right')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39+ctrl"
|
||||
+_+ " caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
|
||||
+_+ "KEY: -39+alt"
|
||||
+_+ " caret(move:'next_word')"
|
||||
+_+ "KEY: -39+ctrl+shift"
|
||||
+_+ " caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39+alt+shift"
|
||||
+_+ " caret(move:'next_word')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39+meta"
|
||||
+_+ " caret(move:'row_end')"
|
||||
+_+ "KEY: -39+meta+shift"
|
||||
+_+ " caret(move:'row_end')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -38"
|
||||
+_+ " caret(move:'up')"
|
||||
+_+ "KEY: -38+shift"
|
||||
+_+ " caret(move:'up')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -40"
|
||||
+_+ " caret(move:'down')"
|
||||
+_+ "KEY: -40+shift"
|
||||
+_+ " caret(move:'down')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -13"
|
||||
+_+ " insert(row:true)"
|
||||
+_+ "KEY: -8"
|
||||
+_+ " delete(character:true)"
|
||||
+_+ "KEY: -46"
|
||||
+_+ " delete(character:false)"
|
||||
+_+ "KEY: 75+ctrl+shift"
|
||||
+_+ " delete(row:true)"
|
||||
+_+ "KEY: -27"
|
||||
+_+ " custom(action:'WordComplete', direction:true)"
|
||||
+_+ "KEY: -27+shift"
|
||||
+_+ " custom(action:'WordComplete', direction:false)"
|
||||
+_+ "KEY: -9"
|
||||
+_+ " custom(action:'SnippetComplete')"
|
||||
+_+ "KEY: 123"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:'}')"
|
||||
+_+ "KEY: 34"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:'\"')"
|
||||
+_+ "KEY: 91"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:']')"
|
||||
+_+ "KEY: 40"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:')')"
|
||||
+_+ "KEY: -36"
|
||||
+_+ " caret(move:'doc_start')"
|
||||
+_+ "KEY: -36+shift"
|
||||
+_+ " caret(move:'doc_start')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -35"
|
||||
+_+ " caret(move:'doc_end')"
|
||||
+_+ "KEY: -35+shift"
|
||||
+_+ " caret(move:'doc_end')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -34+meta"
|
||||
+_+ " caret(move:'page_down')"
|
||||
+_+ "KEY: -34+meta+shift"
|
||||
+_+ " caret(move:'page_down')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -33+meta"
|
||||
+_+ " caret(move:'page_up')"
|
||||
+_+ "KEY: -33+meta+shift"
|
||||
+_+ " caret(move:'page_down')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: 99+meta"
|
||||
+_+ " clipboard(copy:true)"
|
||||
+_+ "KEY: 120+meta"
|
||||
+_+ " clipboard(cut:true)"
|
||||
+_+ "KEY: 122+meta"
|
||||
+_+ " undo()"
|
||||
+_+ "KEY: 90+meta+shift"
|
||||
+_+ " redo()"
|
||||
+_+ "KEY: 97+meta"
|
||||
+_+ " selection(all:true)"
|
||||
+_+ "KEY: 97+ctrl"
|
||||
+_+ " selection(all:true)"
|
||||
+_+ "KEY: -113"
|
||||
+_+ " custom(action:'GoToBookmark', direction:1)"
|
||||
+_+ "KEY: -113+shift"
|
||||
+_+ " custom(action:'GoToBookmark', direction:-1)"
|
||||
+_+ "KEY: -113+meta"
|
||||
+_+ " custom(action:'ToggleBookmark')"
|
||||
+_+ "KEY: 91+meta"
|
||||
+_+ " custom(action:'Indent', direction:'left')"
|
||||
+_+ "KEY: 93+meta"
|
||||
+_+ " custom(action:'Indent', direction:'right')"
|
||||
+_+ "KEY: 47+meta"
|
||||
+_+ " custom(action:'Comment')"
|
||||
+_+ "KEY: 43+meta"
|
||||
+_+ " custom(action:'RuntimeOption', key:'font.size', value:'bigger')"
|
||||
+_+ "KEY: 45+meta"
|
||||
+_+ " custom(action:'RuntimeOption', key:'font.size', value:'smaller')"
|
||||
+_+ "KEY: 101+meta"
|
||||
+_+ " custom(action:'SetSearchKeyword')"
|
||||
+_+ "KEY: 103+meta"
|
||||
+_+ " custom(action:'SearchKeyword', direction:'down')"
|
||||
+_+ "KEY: 71+shift+meta"
|
||||
+_+ " custom(action:'SearchKeyword', direction:'up')"
|
||||
+_+ "KEY: 102+ctrl"
|
||||
+_+ " custom(action:'SearchInteractive')"
|
||||
+_+ "KEY: 83+ctrl+shift"
|
||||
+_+ " custom(action:'SearchInteractive')"
|
||||
+_+ "KEY: 102+meta"
|
||||
+_+ " custom(action:'SearchInteractive')"
|
||||
+_+ "KEY: -13"
|
||||
+_+ " custom(action:'SmartIndent', split_line:true, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
|
||||
+_+ "KEY: -13+meta"
|
||||
+_+ " custom(action:'SmartIndent', split_line:false, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
|
||||
+_+ "KEY: 39"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:'\\'')"
|
||||
)};
|
||||
|
||||
$class('ac.chap.lang.EAmy < ac.chap.Language');
|
||||
|
||||
ac.chap.lang.EAmy.prototype.initDefinition = function()
|
||||
{
|
||||
$call(this, 'ac.chap.Language.initDefinition');
|
||||
this.singleQuoteStringMarker = "'";
|
||||
this.singleQuoteStringMarkerException = "\\";
|
||||
this.doubleQuoteStringMarker = "\"";
|
||||
this.doubleQuoteStringMarkerException = "\\"
|
||||
this.wordDelimiter = /[\w\.\d]/;
|
||||
this.indentIgnoreMarker = /[\.]/;
|
||||
this.foldingStartMarkers = [/^\s*<(div)\b.*>/i, /^\s*<(ul)\b.*>/i];
|
||||
this.foldingParityMarkers = [/^\s*<(div)\b.*>/i, /^\s*<(ul)\b.*>/i];
|
||||
this.foldingStopMarkers = [/^\s*<\/(div)>/i, /^\s*<\/(ul)>/i];
|
||||
this.singleRowCommentStartMarkers = [];
|
||||
this.multiRowCommentStartMarker = "<!--";
|
||||
this.multiRowCommentEndMarker = "-->";
|
||||
this.chunkRules.push([/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER])
|
||||
this.chunkRules.push([/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR])
|
||||
this.chunkRules.push([/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS])
|
||||
this.chunkRules.push([/((<|<\/)([\w-_\:]*)([ >]))/i, 3, ac.chap.CHUNK_KEYWORD])
|
||||
this.chunkRules.push([/(([ \t])([\w-_\:]*)(=$))/i, 3, ac.chap.CHUNK_KEYWORD_CUSTOM])
|
||||
this.chunkRules.push([/(([^\w]|^)(!DOCTYPE)([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY])
|
||||
this.chunkRules.push([/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER])
|
||||
this.chunkRules.push([/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR])
|
||||
this.chunkRules.push([/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS])
|
||||
this.chunkRules.push([/((<|<\/)([\w-_\:]*)([ >]))/i, 3, ac.chap.CHUNK_KEYWORD])
|
||||
this.chunkRules.push([/(([ \t])([\w-_\:]*)(=$))/i, 3, ac.chap.CHUNK_KEYWORD_CUSTOM])
|
||||
this.chunkRules.push([/(([^\w]|^)(!DOCTYPE)([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY])
|
||||
}
|
||||
var snippet = {};
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ie6', code: '<!--[if IE 6]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 only }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'iegte7', code: '<!--[if gte IE 7]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 7 and above }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ie5', code: '<!--[if IE 5.5]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.5 only }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ie', code: '<!--[if IE]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ienot', code: '<!--[if !IE]><!-->${1:${AMY_SELECTED_TEXT: IE Conditional Comment: NOT Internet Explorer }}<!-- <![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ielte6', code: '<!--[if lte IE 6]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 and below }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: '<!--[if IE 5.0]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.0 only }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ielt6', code: '<!--[if lt IE 6]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.x }}<![endif]-->$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: '${0:${AMY_SELECTED_TEXT/\A<em>(.*)<\/em>\z|.*/(?1:$1:<em>$0<\/em>)/m}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: '${0:${AMY_SELECTED_TEXT/\A<strong>(.*)<\/strong>\z|.*/(?1:$1:<strong>$0<\/strong>)/m}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'left', code: '←'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'backtab', code: '⇤'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'enter', code: '⌅'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'arrow', code: '→'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'option', code: '⌥'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'shift', code: '⇧'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ' '};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'delete', code: '⌦'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'backspace', code: '⌫'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'escape', code: '⎋'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'tab', code: '⇥'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'up', code: '↑'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'control', code: '⌃'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'return', code: '↩'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'down', code: '↓'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'command', code: '⌘'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'doctype', code: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n "http://www.w3.org/TR/html4/strict.dtd">\n'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'doctype', code: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n "http://www.w3.org/TR/html4/loose.dtd">\n'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'doctypexf', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'doctypext', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'doctypex', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'doctypexs', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 't', code: '<{${1:tag_name}}>$0</{$1}>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'body', code: '<body id="${1:${AMY_FILENAME/(.*)\..*/\L$1/}}"${2: onload="$3"}>\n $0\n</body>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'textarea', code: '<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">$0</textarea>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'div', code: '<div${1: id="${2:name}"}>\n ${0:$AMY_SELECTED_TEXT}\n</div>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: '<br>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'title', code: '<title>${1:${AMY_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}}</title>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'movie', code: '<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n <param name="src" value="$1">\n <param name="controller" value="$4">\n <param name="autoplay" value="$5">\n <embed src="${1:movie.mov}"\n width="${2:320}" height="${3:240}"\n controller="${4:true}" autoplay="${5:true}"\n scale="tofit" cache="true"\n pluginspage="http://www.apple.com/quicktime/download/"\n >\n</object>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'input', code: '<input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="$3"${4: id="${5:$2}"}>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'head', code: '<head>\n <meta http-equiv="Content-type" content="text/html; charset=utf-8">\n <title>${1:${AMY_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}}</title>\n $0\n</head>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'meta', code: '<meta name="${1:name}" content="${2:content}">'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'h1', code: '<h1 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:$AMY_SELECTED_TEXT}</h1>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'form', code: '<form action="${1:${AMY_FILENAME/(.*?)\..*/$1_submit/}}" method="${2:get}" accept-charset="utf-8">\n $0\n\n <p><input type="submit" value="Continue →"></p>\n</form>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'link', code: '<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" title="${4:no title}" charset="${5:utf-8}">'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'style', code: '<style type="text/css" media="screen">\n $0\n</style>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'table', code: '<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>\n <tr><th>${5:Header}</th></tr>\n <tr><td>${0:Data}</td></tr>\n</table>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'base', code: '<base href="$1"${2: target="$3"}>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'scriptsrc', code: '<script src="$1" type="text/javascript" charset="${3:utf-8}"></script>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'mailto', code: '<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'script', code: '<script type="text/javascript" charset="utf-8">\n $0\n</script>'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'c', code: 'class="$1"'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'i', code: 'id="$1"'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'p', code: '{{pass}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ex', code: '{{extend \'${1:layout.html}\'}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'for', code: '{{for ${1:bar} in ${2:foo}:}}\n $0\n{{pass}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'if', code: '{{if ${1:foo} ${2:==/!=/=>/=</>/<} ${3:bar}:}}\n $0\n{{pass}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '=', code: '{{=$0}}'};
|
||||
eamy.snippets.push(snippet);
|
||||
|
||||
|
||||
296
applications/admin/static/eamy/bundle_python.js
Normal file
@@ -0,0 +1,296 @@
|
||||
/*
|
||||
* eAmy.Offline - Amy Editor embedded for offline use.
|
||||
* http://www.april-child.com/amy
|
||||
*
|
||||
* Published under MIT License.
|
||||
* Copyright (c) 2007-2008 Petr Krontorád, April-Child.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*
|
||||
*
|
||||
* This file is auto-generated from original Fry Framework and Amy Editor sources..
|
||||
*/
|
||||
|
||||
|
||||
// Generated from theme definition file.
|
||||
$class('ac.chap.theme.EAmy < ac.chap.Theme');
|
||||
|
||||
ac.chap.theme.EAmy.prototype.initDefinition = function()
|
||||
{
|
||||
// $call(this, 'ac.chap.Theme.initDefinition');this.cssId = 'black';
|
||||
//this.background = '#072240';
|
||||
//this.textColor = '#DFEFFF';
|
||||
//this.caretColor = 'lime';
|
||||
//this.caretRowStyleActive = '#041629';
|
||||
//this.selectionStyle = '#86553b';
|
||||
//this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#0084FF;font-style:italic';
|
||||
//this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#0084FF;font-style:italic';
|
||||
//this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#00DF00';
|
||||
//this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#00DF00';
|
||||
//this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#FF9D00';
|
||||
//this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#FF5B8C';
|
||||
//this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#FF9D00;';
|
||||
//this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#FFF177';
|
||||
//this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#54FFB8';
|
||||
//this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#FFE000';
|
||||
//this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#71E5B6';
|
||||
//this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#FF78E5';
|
||||
//
|
||||
$call(this, 'ac.chap.Theme.initDefinition');
|
||||
this.cssId = 'twilight';
|
||||
this.background = '#141414';
|
||||
this.textColor = '#F8F8F8';
|
||||
this.caretColor = '#A7A7A7';
|
||||
this.caretRowStyleActive = '#1B1B1B';
|
||||
this.selectionStyle = '#3C4043';
|
||||
this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#605A60;font-style:italic';
|
||||
this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#605A60;font-style:italic';
|
||||
this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#8B9F67';
|
||||
this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#D4F29E';
|
||||
this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#D2A964';
|
||||
this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#DE6848';
|
||||
this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#EFC25A;';
|
||||
this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#ABC4DC';
|
||||
this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#A0849E';
|
||||
this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#DAD280';
|
||||
this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#7286A8';
|
||||
this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#A55C29';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Generated from bundle keymap definition file.
|
||||
ac.chap.KeyMap.prototype.initDefinition = function()
|
||||
{
|
||||
var _ = '\n';
|
||||
this.compile
|
||||
(""+_+ "KEY: 0"
|
||||
+_+ " insert(character:true)"
|
||||
+_+ "KEY: -37"
|
||||
+_+ " caret(move:'left')"
|
||||
+_+ "KEY: -37+shift"
|
||||
+_+ " caret(move:'left')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -37+ctrl"
|
||||
+_+ " caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
|
||||
+_+ "KEY: -37+alt"
|
||||
+_+ " caret(move:'prev_word')"
|
||||
+_+ "KEY: -37+ctrl+shift"
|
||||
+_+ " caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -37+alt+shift"
|
||||
+_+ " caret(move:'prev_word')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -37+meta"
|
||||
+_+ " caret(move:'row_start')"
|
||||
+_+ "KEY: -37+meta+shift"
|
||||
+_+ " caret(move:'row_start')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39"
|
||||
+_+ " caret(move:'right')"
|
||||
+_+ "KEY: -39+shift"
|
||||
+_+ " caret(move:'right')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39+ctrl"
|
||||
+_+ " caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
|
||||
+_+ "KEY: -39+alt"
|
||||
+_+ " caret(move:'next_word')"
|
||||
+_+ "KEY: -39+ctrl+shift"
|
||||
+_+ " caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39+alt+shift"
|
||||
+_+ " caret(move:'next_word')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -39+meta"
|
||||
+_+ " caret(move:'row_end')"
|
||||
+_+ "KEY: -39+meta+shift"
|
||||
+_+ " caret(move:'row_end')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -38"
|
||||
+_+ " caret(move:'up')"
|
||||
+_+ "KEY: -38+shift"
|
||||
+_+ " caret(move:'up')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -40"
|
||||
+_+ " caret(move:'down')"
|
||||
+_+ "KEY: -40+shift"
|
||||
+_+ " caret(move:'down')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -13"
|
||||
+_+ " insert(row:true)"
|
||||
+_+ "KEY: -8"
|
||||
+_+ " delete(character:true)"
|
||||
+_+ "KEY: -46"
|
||||
+_+ " delete(character:false)"
|
||||
+_+ "KEY: 75+ctrl+shift"
|
||||
+_+ " delete(row:true)"
|
||||
+_+ "KEY: -27"
|
||||
+_+ " custom(action:'WordComplete', direction:true)"
|
||||
+_+ "KEY: -27+shift"
|
||||
+_+ " custom(action:'WordComplete', direction:false)"
|
||||
+_+ "KEY: -9"
|
||||
+_+ " custom(action:'SnippetComplete')"
|
||||
+_+ "KEY: 123"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:'}')"
|
||||
+_+ "KEY: 34"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:'\"')"
|
||||
+_+ "KEY: 91"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:']')"
|
||||
+_+ "KEY: 40"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:')')"
|
||||
+_+ "KEY: -36"
|
||||
+_+ " caret(move:'doc_start')"
|
||||
+_+ "KEY: -36+shift"
|
||||
+_+ " caret(move:'doc_start')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -35"
|
||||
+_+ " caret(move:'doc_end')"
|
||||
+_+ "KEY: -35+shift"
|
||||
+_+ " caret(move:'doc_end')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -34+meta"
|
||||
+_+ " caret(move:'page_down')"
|
||||
+_+ "KEY: -34+meta+shift"
|
||||
+_+ " caret(move:'page_down')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: -33+meta"
|
||||
+_+ " caret(move:'page_up')"
|
||||
+_+ "KEY: -33+meta+shift"
|
||||
+_+ " caret(move:'page_down')"
|
||||
+_+ " selection(add:true)"
|
||||
+_+ "KEY: 99+meta"
|
||||
+_+ " clipboard(copy:true)"
|
||||
+_+ "KEY: 120+meta"
|
||||
+_+ " clipboard(cut:true)"
|
||||
+_+ "KEY: 122+meta"
|
||||
+_+ " undo()"
|
||||
+_+ "KEY: 90+meta+shift"
|
||||
+_+ " redo()"
|
||||
+_+ "KEY: 97+meta"
|
||||
+_+ " selection(all:true)"
|
||||
+_+ "KEY: 97+ctrl"
|
||||
+_+ " selection(all:true)"
|
||||
+_+ "KEY: -113"
|
||||
+_+ " custom(action:'GoToBookmark', direction:1)"
|
||||
+_+ "KEY: -113+shift"
|
||||
+_+ " custom(action:'GoToBookmark', direction:-1)"
|
||||
+_+ "KEY: -113+meta"
|
||||
+_+ " custom(action:'ToggleBookmark')"
|
||||
+_+ "KEY: 91+meta"
|
||||
+_+ " custom(action:'Indent', direction:'left')"
|
||||
+_+ "KEY: 93+meta"
|
||||
+_+ " custom(action:'Indent', direction:'right')"
|
||||
+_+ "KEY: 47+meta"
|
||||
+_+ " custom(action:'Comment')"
|
||||
+_+ "KEY: 43+meta"
|
||||
+_+ " custom(action:'RuntimeOption', key:'font.size', value:'bigger')"
|
||||
+_+ "KEY: 45+meta"
|
||||
+_+ " custom(action:'RuntimeOption', key:'font.size', value:'smaller')"
|
||||
+_+ "KEY: 101+meta"
|
||||
+_+ " custom(action:'SetSearchKeyword')"
|
||||
+_+ "KEY: 103+meta"
|
||||
+_+ " custom(action:'SearchKeyword', direction:'down')"
|
||||
+_+ "KEY: 71+shift+meta"
|
||||
+_+ " custom(action:'SearchKeyword', direction:'up')"
|
||||
+_+ "KEY: 102+ctrl"
|
||||
+_+ " custom(action:'SearchInteractive')"
|
||||
+_+ "KEY: 83+ctrl+shift"
|
||||
+_+ " custom(action:'SearchInteractive')"
|
||||
+_+ "KEY: 102+meta"
|
||||
+_+ " custom(action:'SearchInteractive')"
|
||||
+_+ "KEY: -13"
|
||||
+_+ " custom(action:'SmartIndent', split_line:true, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
|
||||
+_+ "KEY: -13+meta"
|
||||
+_+ " custom(action:'SmartIndent', split_line:false, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
|
||||
+_+ "KEY: 39"
|
||||
+_+ " custom(action:'AutoComplete', use_selection:true, text:'\\'')"
|
||||
)};
|
||||
|
||||
$class('ac.chap.lang.EAmy < ac.chap.Language');
|
||||
|
||||
ac.chap.lang.EAmy.prototype.initDefinition = function()
|
||||
{
|
||||
$call(this, 'ac.chap.Language.initDefinition');
|
||||
this.singleQuoteStringMarker = "'";
|
||||
this.singleQuoteStringMarkerException = "\\";
|
||||
this.doubleQuoteStringMarker = "\"";
|
||||
this.doubleQuoteStringMarkerException = "\\";
|
||||
this.wordDelimiter = /[\w\d]/;
|
||||
this.indentIgnoreMarker = /[\t \s]/;
|
||||
this.foldingStartMarkers = [/^\s*def|class/i];
|
||||
this.foldingParityMarkers = [/do|(^\s*if)|(^\s*def)|(^\s*class)/i];
|
||||
this.foldingStopMarkers = [/^\s{0,1}$/i];
|
||||
this.singleRowCommentStartMarkers = ['#'];
|
||||
this.multiRowCommentStartMarker = "\"\"\"";
|
||||
this.multiRowCommentEndMarker = "\"\"\"";
|
||||
this.stringInterpolation = ['(#\{[^\}]*\})', 1];
|
||||
this.chunkRules.push([/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER])
|
||||
this.chunkRules.push([/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR])
|
||||
this.chunkRules.push([/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS])
|
||||
this.chunkRules.push([/(([^\w]|^)(elif|else|except|finally|for|if|try|while|with)([^\w]|$))/i, 3, ac.chap.CHUNK_KEYWORD])
|
||||
this.chunkRules.push([/(([^\w]|^)(@[\w]*|break|continue|pass|raise|return|yield|and|in|is|not|or|as|assert|del|exec|print)([^\w]|$))/i, 3, ac.chap.CHUNK_KEYWORD_CUSTOM])
|
||||
this.chunkRules.push([/((def[ ]{1,})([\w]{1,}))/i, 3, ac.chap.CHUNK_FUNCTION_NAME])
|
||||
this.chunkRules.push([/(([^\w]|^)(__import__|all|abs|any|apply|callable|chr|cmp|coerce|compile|delattr|dir|divmod|eval|execfile|filter|getattr|globals|hasattr|hash|hex|id|input|intern|isinstance|issubclass|iter|len|locals|map|max|min|oct|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|sorted|sum|unichr|vars|zip|basestring|bool|buffer|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|object|open|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY])
|
||||
this.chunkRules.push([/(([^\w]|^)((__(all|bases|class|debug|dict|doc|file|members|metaclass|methods|name|slots|weakref)__)|(import|from| abs|add|and|call|cmp|coerce|complex|contains|del|delattr|delete|delitem|delslice|div|divmod|enter|eq|exit|float|floordiv|ge|get|getattr|getattribute|getitem|getslice|gt|hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|long|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|setslice|str|sub|truediv|unicode|xor))([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY_CUSTOM])
|
||||
}
|
||||
var snippet = {};
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ifmain', code: 'if __name__ == '+"'"+'__main__'+"'"+':\n ${1:main()}$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'try', code: 'try:\n ${1:pass}\nexcept ${2:Exception}, ${3:e}:\n ${4:raise e}\nelse:\n ${5:pass}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'property', code: 'def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n def fdel(self):\n ${5:del self._$1}\n return locals()\n$1 = property(**$1())$0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '__', code: '__${1:init}__'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '.', code: 'self.'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: '', code: ''};
|
||||
eamy.snippets.push(snippet);
|
||||
//snippet = {tab_activation: 'def', code: 'def ${1:fname}(${2:`if [ "$TM_CURRENT_LINE" != "" ]\n # poor man'+"'"+'s way ... check if there is an indent or not\n # (cuz we would have lost the class scope by this point)\n then\n echo "self"\n fi`}):\n ${3/.+/"""/}${3:docstring for $1}${3/.+/"""\n/}${3/.+/\t/}${0:pass}'};
|
||||
//eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'def', code: 'def ${1:fname}(${2:`if [ "$TM_CURRENT_LINE" != "" ]\n # poor man'+"'"+'s way ... check if there is an indent or not\n # (cuz we would have lost the class scope by this point)\n then\n echo "self"\n fi`}):\n ${3:}\n ${0:return dict()}'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'class', code: 'class ${1:ClassName}(${2:object}):\n ${3/.+/"""/}${3:docstring for $1}${3/.+/"""\n/}${3/.+/\t/}def __init__(self${4/([^,])?(.*)/(?1:, )/}${4:arg}):\n ${5:super($1, self).__init__()}\n${4/(\A\s*,\s*\Z)|,?\s*([A-Za-z_][a-zA-Z0-9_]*)\s*(=[^,]*)?(,\s*|$)/(?2:\t\tself.$2 = $2\n)/g} $0'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'aurm', code: '@auth.requires_membership(\'$0\'):'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'dbt', code: '${1:db_name}.define_table("${2:table_name}",\n SQLField("${3:field_name}", "${4:string/text/password/blob/upload/boolean/integer/double/time/date/datetime/db.reference_table}", ${5:length=$6}, ${7:default="$8"}),$9\n)'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'dbf', code: 'SQLField("${1:field_name}", "${2:string/text/password/blob/upload/boolean/integer/double/time/date/datetime/db.reference_table}", ${3:length=$4}, ${5:default="$6"}),$7'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'dbi', code: '${1:db_name}.${2:table_name}.insert(\n ${3:field_name}="$4" $5\n)'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 't', code: 'T("$0")'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'rev', code: 'response.view=\'$0\''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'ref', code: 'response.flash=\'$0\''};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 're', code: 'redirect(\'$0\')'};
|
||||
eamy.snippets.push(snippet);
|
||||
snippet = {tab_activation: 'rej', code: 'response.json=\'$0\''};
|
||||
eamy.snippets.push(snippet);
|
||||
BIN
applications/admin/static/eamy/chap-bg-sidebar.gif
Executable file
|
After Width: | Height: | Size: 300 B |
BIN
applications/admin/static/eamy/chap-bookmark-default.gif
Executable file
|
After Width: | Height: | Size: 186 B |
BIN
applications/admin/static/eamy/chap-folding-expand-inner.gif
Executable file
|
After Width: | Height: | Size: 119 B |
BIN
applications/admin/static/eamy/chap-folding-expand.gif
Executable file
|
After Width: | Height: | Size: 319 B |
BIN
applications/admin/static/eamy/chap-folding-start.gif
Executable file
|
After Width: | Height: | Size: 204 B |
BIN
applications/admin/static/eamy/chap-folding-stop.gif
Executable file
|
After Width: | Height: | Size: 204 B |
BIN
applications/admin/static/eamy/chap-wrapped-row.gif
Executable file
|
After Width: | Height: | Size: 92 B |
8143
applications/admin/static/eamy/eamy.js
Normal file
56
applications/admin/static/eamy/style.css
Normal file
@@ -0,0 +1,56 @@
|
||||
/*.acw-chap pre, .acw-chap pre span, span.acw-char-check, .acw-chap .selection-area div
|
||||
{
|
||||
font:11px 'Courier', monospaced;
|
||||
line-height:11px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0;
|
||||
}
|
||||
*/
|
||||
.acw-chap .wrapped-row
|
||||
{
|
||||
background-image:url('chap-wrapped-row.gif');
|
||||
background-repeat:no-repeat;
|
||||
background-position:25px 4px;
|
||||
}
|
||||
.acw-chap .sidebar
|
||||
{
|
||||
background-image:url('chap-bg-sidebar.gif');
|
||||
line-height:11px;
|
||||
}
|
||||
/*.acw-chap .sidebar .row-number
|
||||
{
|
||||
text-align:right;
|
||||
font-size:9px;
|
||||
font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
|
||||
color:#999;
|
||||
}
|
||||
*/
|
||||
.acw-chap .folding-expand-inner
|
||||
{
|
||||
width:14px;
|
||||
height:10px;
|
||||
margin-left:2px;
|
||||
display:inline;
|
||||
background-image:url('chap-folding-expand-inner.gif');
|
||||
}
|
||||
.acw-chap .folding-expand
|
||||
{
|
||||
background-image:url('chap-folding-expand.gif');
|
||||
}
|
||||
.acw-chap .folding-start
|
||||
{
|
||||
background-image:url('chap-folding-start.gif');
|
||||
}
|
||||
.acw-chap .folding-stop
|
||||
{
|
||||
background-image:url('chap-folding-stop.gif');
|
||||
}
|
||||
.acw-chap .bookmark-default
|
||||
{
|
||||
background-image:url('chap-bookmark-default.gif');
|
||||
}
|
||||
.acw-chap .void
|
||||
{
|
||||
background-image:url('void.gif');
|
||||
}
|
||||
BIN
applications/admin/static/eamy/void.gif
Executable file
|
After Width: | Height: | Size: 55 B |
491
applications/admin/static/edit_area/autocompletion.js
Executable file
@@ -0,0 +1,491 @@
|
||||
/**
|
||||
* Autocompletion class
|
||||
*
|
||||
* An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
|
||||
*
|
||||
* Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
|
||||
* But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
|
||||
* and add a too important feature that many people would miss if included as a plugin
|
||||
*
|
||||
* - init param: autocompletion_start
|
||||
* - Button name: "autocompletion"
|
||||
*/
|
||||
|
||||
var EditArea_autocompletion= {
|
||||
|
||||
/**
|
||||
* Get called once this file is loaded (editArea still not initialized)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
// alert("test init: "+ this._someInternalFunction(2, 3));
|
||||
|
||||
if(editArea.settings["autocompletion"])
|
||||
this.enabled= true;
|
||||
else
|
||||
this.enabled= false;
|
||||
this.current_word = false;
|
||||
this.shown = false;
|
||||
this.selectIndex = -1;
|
||||
this.forceDisplay = false;
|
||||
this.isInMiddleWord = false;
|
||||
this.autoSelectIfOneResult = false;
|
||||
this.delayBeforeDisplay = 100;
|
||||
this.checkDelayTimer = false;
|
||||
this.curr_syntax_str = '';
|
||||
|
||||
this.file_syntax_datas = {};
|
||||
}
|
||||
/**
|
||||
* Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
|
||||
* A control can be a button, select list or any other HTML item to present in the EditArea user interface.
|
||||
* Language variables such as {$lang_somekey} will also be replaced with contents from
|
||||
* the language packs.
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
* @return HTML code for a specific control or false.
|
||||
* @type string or boolean
|
||||
*/
|
||||
/*,get_control_html: function(ctrl_name){
|
||||
switch( ctrl_name ){
|
||||
case 'autocompletion':
|
||||
// Control id, button img, command
|
||||
return parent.editAreaLoader.get_button_html('autocompletion_but', 'autocompletion.gif', 'toggle_autocompletion', false, this.baseURL);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}*/
|
||||
/**
|
||||
* Get called once EditArea is fully loaded and initialised
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
,onload: function(){
|
||||
if(this.enabled)
|
||||
{
|
||||
var icon= document.getElementById("autocompletion");
|
||||
if(icon)
|
||||
editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
|
||||
}
|
||||
|
||||
this.container = document.createElement('div');
|
||||
this.container.id = "auto_completion_area";
|
||||
editArea.container.insertBefore( this.container, editArea.container.firstChild );
|
||||
|
||||
// add event detection for hiding suggestion box
|
||||
parent.editAreaLoader.add_event( document, "click", function(){ editArea.plugins['autocompletion']._hide();} );
|
||||
parent.editAreaLoader.add_event( editArea.textarea, "blur", function(){ editArea.plugins['autocompletion']._hide();} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Is called each time the user touch a keyboard key.
|
||||
*
|
||||
* @param (event) e: the keydown event
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
,onkeydown: function(e){
|
||||
if(!this.enabled)
|
||||
return true;
|
||||
|
||||
if (EA_keys[e.keyCode])
|
||||
letter=EA_keys[e.keyCode];
|
||||
else
|
||||
letter=String.fromCharCode(e.keyCode);
|
||||
// shown
|
||||
if( this._isShown() )
|
||||
{
|
||||
// if escape, hide the box
|
||||
if(letter=="Esc")
|
||||
{
|
||||
this._hide();
|
||||
return false;
|
||||
}
|
||||
// Enter
|
||||
else if( letter=="Entrer")
|
||||
{
|
||||
var as = this.container.getElementsByTagName('A');
|
||||
// select a suggested entry
|
||||
if( this.selectIndex >= 0 && this.selectIndex < as.length )
|
||||
{
|
||||
as[ this.selectIndex ].onmousedown();
|
||||
return false
|
||||
}
|
||||
// simply add an enter in the code
|
||||
else
|
||||
{
|
||||
this._hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if( letter=="Tab" || letter=="Down")
|
||||
{
|
||||
this._selectNext();
|
||||
return false;
|
||||
}
|
||||
else if( letter=="Up")
|
||||
{
|
||||
this._selectBefore();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// hidden
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// show current suggestion list and do autoSelect if possible (no matter it's shown or hidden)
|
||||
if( letter=="Space" && CtrlPressed(e) )
|
||||
{
|
||||
//parent.console.log('SHOW SUGGEST');
|
||||
this.forceDisplay = true;
|
||||
this.autoSelectIfOneResult = true;
|
||||
this._checkLetter();
|
||||
return false;
|
||||
}
|
||||
|
||||
// wait a short period for check that the cursor isn't moving
|
||||
setTimeout("editArea.plugins['autocompletion']._checkDelayAndCursorBeforeDisplay();", editArea.check_line_selection_timer +5 );
|
||||
this.checkDelayTimer = false;
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Executes a specific command, this function handles plugin commands.
|
||||
*
|
||||
* @param {string} cmd: the name of the command being executed
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
,execCommand: function(cmd, param){
|
||||
switch( cmd ){
|
||||
case 'toggle_autocompletion':
|
||||
var icon= document.getElementById("autocompletion");
|
||||
if(!this.enabled)
|
||||
{
|
||||
if(icon != null){
|
||||
editArea.restoreClass(icon);
|
||||
editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
|
||||
}
|
||||
this.enabled= true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.enabled= false;
|
||||
if(icon != null)
|
||||
editArea.switchClassSticky(icon, 'editAreaButtonNormal', false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
,_checkDelayAndCursorBeforeDisplay: function()
|
||||
{
|
||||
this.checkDelayTimer = setTimeout("if(editArea.textarea.selectionStart == "+ editArea.textarea.selectionStart +") EditArea_autocompletion._checkLetter();", this.delayBeforeDisplay - editArea.check_line_selection_timer - 5 );
|
||||
}
|
||||
// hide the suggested box
|
||||
,_hide: function(){
|
||||
this.container.style.display="none";
|
||||
this.selectIndex = -1;
|
||||
this.shown = false;
|
||||
this.forceDisplay = false;
|
||||
this.autoSelectIfOneResult = false;
|
||||
}
|
||||
// display the suggested box
|
||||
,_show: function(){
|
||||
if( !this._isShown() )
|
||||
{
|
||||
this.container.style.display="block";
|
||||
this.selectIndex = -1;
|
||||
this.shown = true;
|
||||
}
|
||||
}
|
||||
// is the suggested box displayed?
|
||||
,_isShown: function(){
|
||||
return this.shown;
|
||||
}
|
||||
// setter and getter
|
||||
,_isInMiddleWord: function( new_value ){
|
||||
if( typeof( new_value ) == "undefined" )
|
||||
return this.isInMiddleWord;
|
||||
else
|
||||
this.isInMiddleWord = new_value;
|
||||
}
|
||||
// select the next element in the suggested box
|
||||
,_selectNext: function()
|
||||
{
|
||||
var as = this.container.getElementsByTagName('A');
|
||||
|
||||
// clean existing elements
|
||||
for( var i=0; i<as.length; i++ )
|
||||
{
|
||||
if( as[i].className )
|
||||
as[i].className = as[i].className.replace(/ focus/g, '');
|
||||
}
|
||||
|
||||
this.selectIndex++;
|
||||
this.selectIndex = ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? 0 : this.selectIndex;
|
||||
as[ this.selectIndex ].className += " focus";
|
||||
}
|
||||
// select the previous element in the suggested box
|
||||
,_selectBefore: function()
|
||||
{
|
||||
var as = this.container.getElementsByTagName('A');
|
||||
|
||||
// clean existing elements
|
||||
for( var i=0; i<as.length; i++ )
|
||||
{
|
||||
if( as[i].className )
|
||||
as[i].className = as[ i ].className.replace(/ focus/g, '');
|
||||
}
|
||||
|
||||
this.selectIndex--;
|
||||
|
||||
this.selectIndex = ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? as.length-1 : this.selectIndex;
|
||||
as[ this.selectIndex ].className += " focus";
|
||||
}
|
||||
,_select: function( content )
|
||||
{
|
||||
cursor_forced_position = content.indexOf( '{@}' );
|
||||
content = content.replace(/{@}/g, '' );
|
||||
editArea.getIESelection();
|
||||
|
||||
// retrive the number of matching characters
|
||||
var start_index = Math.max( 0, editArea.textarea.selectionEnd - content.length );
|
||||
|
||||
line_string = editArea.textarea.value.substring( start_index, editArea.textarea.selectionEnd + 1);
|
||||
limit = line_string.length -1;
|
||||
nbMatch = 0;
|
||||
for( i =0; i<limit ; i++ )
|
||||
{
|
||||
if( line_string.substring( limit - i - 1, limit ) == content.substring( 0, i + 1 ) )
|
||||
nbMatch = i + 1;
|
||||
}
|
||||
// if characters match, we should include them in the selection that will be replaced
|
||||
if( nbMatch > 0 )
|
||||
parent.editAreaLoader.setSelectionRange(editArea.id, editArea.textarea.selectionStart - nbMatch , editArea.textarea.selectionEnd);
|
||||
|
||||
parent.editAreaLoader.setSelectedText(editArea.id, content );
|
||||
range= parent.editAreaLoader.getSelectionRange(editArea.id);
|
||||
|
||||
if( cursor_forced_position != -1 )
|
||||
new_pos = range["end"] - ( content.length-cursor_forced_position );
|
||||
else
|
||||
new_pos = range["end"];
|
||||
parent.editAreaLoader.setSelectionRange(editArea.id, new_pos, new_pos);
|
||||
this._hide();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse the AUTO_COMPLETION part of syntax definition files
|
||||
*/
|
||||
,_parseSyntaxAutoCompletionDatas: function(){
|
||||
//foreach syntax loaded
|
||||
for(var lang in parent.editAreaLoader.load_syntax)
|
||||
{
|
||||
if(!parent.editAreaLoader.syntax[lang]['autocompletion']) // init the regexp if not already initialized
|
||||
{
|
||||
parent.editAreaLoader.syntax[lang]['autocompletion']= {};
|
||||
// the file has auto completion datas
|
||||
if(parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
|
||||
{
|
||||
// parse them
|
||||
for(var i in parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
|
||||
{
|
||||
datas = parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'][i];
|
||||
tmp = {};
|
||||
if(datas["CASE_SENSITIVE"]!="undefined" && datas["CASE_SENSITIVE"]==false)
|
||||
tmp["modifiers"]="i";
|
||||
else
|
||||
tmp["modifiers"]="";
|
||||
tmp["prefix_separator"]= datas["REGEXP"]["prefix_separator"];
|
||||
tmp["match_prefix_separator"]= new RegExp( datas["REGEXP"]["prefix_separator"] +"$", tmp["modifiers"]);
|
||||
tmp["match_word"]= new RegExp("(?:"+ datas["REGEXP"]["before_word"] +")("+ datas["REGEXP"]["possible_words_letters"] +")$", tmp["modifiers"]);
|
||||
tmp["match_next_letter"]= new RegExp("^("+ datas["REGEXP"]["letter_after_word_must_match"] +")$", tmp["modifiers"]);
|
||||
tmp["keywords"]= {};
|
||||
//console.log( datas["KEYWORDS"] );
|
||||
for( var prefix in datas["KEYWORDS"] )
|
||||
{
|
||||
tmp["keywords"][prefix]= {
|
||||
prefix: prefix,
|
||||
prefix_name: prefix,
|
||||
prefix_reg: new RegExp("(?:"+ parent.editAreaLoader.get_escaped_regexp( prefix ) +")(?:"+ tmp["prefix_separator"] +")$", tmp["modifiers"] ),
|
||||
datas: []
|
||||
};
|
||||
for( var j=0; j<datas["KEYWORDS"][prefix].length; j++ )
|
||||
{
|
||||
tmp["keywords"][prefix]['datas'][j]= {
|
||||
is_typing: datas["KEYWORDS"][prefix][j][0],
|
||||
// if replace with is empty, replace with the is_typing value
|
||||
replace_with: datas["KEYWORDS"][prefix][j][1] ? datas["KEYWORDS"][prefix][j][1].replace('§', datas["KEYWORDS"][prefix][j][0] ) : '',
|
||||
comment: datas["KEYWORDS"][prefix][j][2] ? datas["KEYWORDS"][prefix][j][2] : ''
|
||||
};
|
||||
|
||||
// the replace with shouldn't be empty
|
||||
if( tmp["keywords"][prefix]['datas'][j]['replace_with'].length == 0 )
|
||||
tmp["keywords"][prefix]['datas'][j]['replace_with'] = tmp["keywords"][prefix]['datas'][j]['is_typing'];
|
||||
|
||||
// if the comment is empty, display the replace_with value
|
||||
if( tmp["keywords"][prefix]['datas'][j]['comment'].length == 0 )
|
||||
tmp["keywords"][prefix]['datas'][j]['comment'] = tmp["keywords"][prefix]['datas'][j]['replace_with'].replace(/{@}/g, '' );
|
||||
}
|
||||
|
||||
}
|
||||
tmp["max_text_length"]= datas["MAX_TEXT_LENGTH"];
|
||||
parent.editAreaLoader.syntax[lang]['autocompletion'][i] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
,_checkLetter: function(){
|
||||
// check that syntax hasn't changed
|
||||
if( this.curr_syntax_str != editArea.settings['syntax'] )
|
||||
{
|
||||
if( !parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'] )
|
||||
this._parseSyntaxAutoCompletionDatas();
|
||||
this.curr_syntax= parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'];
|
||||
this.curr_syntax_str = editArea.settings['syntax'];
|
||||
//console.log( this.curr_syntax );
|
||||
}
|
||||
|
||||
if( editArea.is_editable )
|
||||
{
|
||||
time=new Date;
|
||||
t1= time.getTime();
|
||||
editArea.getIESelection();
|
||||
this.selectIndex = -1;
|
||||
start=editArea.textarea.selectionStart;
|
||||
var str = editArea.textarea.value;
|
||||
var results= [];
|
||||
|
||||
|
||||
for(var i in this.curr_syntax)
|
||||
{
|
||||
var last_chars = str.substring(Math.max(0, start-this.curr_syntax[i]["max_text_length"]), start);
|
||||
var matchNextletter = str.substring(start, start+1).match( this.curr_syntax[i]["match_next_letter"]);
|
||||
// if not writting in the middle of a word or if forcing display
|
||||
if( matchNextletter || this.forceDisplay )
|
||||
{
|
||||
// check if the last chars match a separator
|
||||
var match_prefix_separator = last_chars.match(this.curr_syntax[i]["match_prefix_separator"]);
|
||||
|
||||
// check if it match a possible word
|
||||
var match_word= last_chars.match(this.curr_syntax[i]["match_word"]);
|
||||
|
||||
//console.log( match_word );
|
||||
if( match_word )
|
||||
{
|
||||
var begin_word= match_word[1];
|
||||
var match_curr_word= new RegExp("^"+ parent.editAreaLoader.get_escaped_regexp( begin_word ), this.curr_syntax[i]["modifiers"]);
|
||||
//console.log( match_curr_word );
|
||||
for(var prefix in this.curr_syntax[i]["keywords"])
|
||||
{
|
||||
// parent.console.log( this.curr_syntax[i]["keywords"][prefix] );
|
||||
for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
|
||||
{
|
||||
// parent.console.log( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'] );
|
||||
// the key word match or force display
|
||||
if( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'].match(match_curr_word) )
|
||||
{
|
||||
// parent.console.log('match');
|
||||
hasMatch = false;
|
||||
var before = last_chars.substr( 0, last_chars.length - begin_word.length );
|
||||
|
||||
// no prefix to match => it's valid
|
||||
if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
|
||||
{
|
||||
if( ! before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
|
||||
hasMatch = true;
|
||||
}
|
||||
// we still need to check the prefix if there is one
|
||||
else if( this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
|
||||
{
|
||||
if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
|
||||
hasMatch = true;
|
||||
}
|
||||
|
||||
if( hasMatch )
|
||||
results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// it doesn't match any possible word but we want to display something
|
||||
// we'll display to list of all available words
|
||||
else if( this.forceDisplay || match_prefix_separator )
|
||||
{
|
||||
for(var prefix in this.curr_syntax[i]["keywords"])
|
||||
{
|
||||
for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
|
||||
{
|
||||
hasMatch = false;
|
||||
// no prefix to match => it's valid
|
||||
if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
|
||||
{
|
||||
hasMatch = true;
|
||||
}
|
||||
// we still need to check the prefix if there is one
|
||||
else if( match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
|
||||
{
|
||||
var before = last_chars; //.substr( 0, last_chars.length );
|
||||
if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
|
||||
hasMatch = true;
|
||||
}
|
||||
|
||||
if( hasMatch )
|
||||
results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// there is only one result, and we can select it automatically
|
||||
if( results.length == 1 && this.autoSelectIfOneResult )
|
||||
{
|
||||
// console.log( results );
|
||||
this._select( results[0][1]['replace_with'] );
|
||||
}
|
||||
else if( results.length == 0 )
|
||||
{
|
||||
this._hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
// build the suggestion box content
|
||||
var lines=[];
|
||||
for(var i=0; i<results.length; i++)
|
||||
{
|
||||
var line= "<li><a href=\"#\" class=\"entry\" onmousedown=\"EditArea_autocompletion._select('"+ results[i][1]['replace_with'].replace(new RegExp('"', "g"), """) +"');return false;\">"+ results[i][1]['comment'];
|
||||
if(results[i][0]['prefix_name'].length>0)
|
||||
line+='<span class="prefix">'+ results[i][0]['prefix_name'] +'</span>';
|
||||
line+='</a></li>';
|
||||
lines[lines.length]=line;
|
||||
}
|
||||
// sort results
|
||||
this.container.innerHTML = '<ul>'+ lines.sort().join('') +'</ul>';
|
||||
|
||||
var cursor = _$("cursor_pos");
|
||||
this.container.style.top = ( cursor.cursor_top + editArea.lineHeight ) +"px";
|
||||
this.container.style.left = ( cursor.cursor_left + 8 ) +"px";
|
||||
this._show();
|
||||
}
|
||||
|
||||
this.autoSelectIfOneResult = false;
|
||||
time=new Date;
|
||||
t2= time.getTime();
|
||||
|
||||
//parent.console.log( begin_word +"\n"+ (t2-t1) +"\n"+ html );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Load as a plugin
|
||||
editArea.settings['plugins'][ editArea.settings['plugins'].length ] = 'autocompletion';
|
||||
editArea.add_plugin('autocompletion', EditArea_autocompletion);
|
||||
530
applications/admin/static/edit_area/edit_area.css
Executable file
@@ -0,0 +1,530 @@
|
||||
body, html{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
border: none;
|
||||
overflow: hidden;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
body, html, table, form, textarea{
|
||||
font: 12px monospace, sans-serif;
|
||||
}
|
||||
|
||||
#editor{
|
||||
border: solid #888 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#result{
|
||||
z-index: 4;
|
||||
overflow-x: auto;
|
||||
overflow-y: scroll;
|
||||
border-top: solid #888 1px;
|
||||
border-bottom: solid #888 1px;
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#result.empty{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#container{
|
||||
overflow: hidden;
|
||||
border: solid blue 0;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
padding: 0 5px 0 45px;
|
||||
/*padding-right: 5px;*/
|
||||
}
|
||||
|
||||
#textarea{
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
z-index: 7;
|
||||
border-width: 0;
|
||||
background-color: transparent;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
#textarea, #textarea:hover{
|
||||
outline: none; /* safari outline fix */
|
||||
}
|
||||
|
||||
#content_highlight{
|
||||
white-space: pre;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position : absolute;
|
||||
z-index: 4;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
#selection_field, #selection_field_text{
|
||||
margin: 0;
|
||||
background-color: #E1F2F9;
|
||||
/* height: 1px; */
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
top: -100px;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#selection_field.show_colors {
|
||||
z-index: 3;
|
||||
background-color:#EDF9FC;
|
||||
|
||||
}
|
||||
|
||||
#selection_field strong{
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
#selection_field.show_colors *, #selection_field_text * {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#selection_field_text{
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
#selection_field_text strong{
|
||||
font-weight:normal;
|
||||
background-color:#3399FE;
|
||||
color: #FFF;
|
||||
visibility:visible;
|
||||
}
|
||||
|
||||
#container.word_wrap #content_highlight,
|
||||
#container.word_wrap #selection_field,
|
||||
#container.word_wrap #selection_field_text,
|
||||
#container.word_wrap #test_font_size{
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
#line_number{
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
border-right: solid black 1px;
|
||||
z-index:8;
|
||||
width: 38px;
|
||||
padding: 0 5px 0 0;
|
||||
margin: 0 0 0 -45px;
|
||||
text-align: right;
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
#test_font_size{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
pre{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
opacity: 0.2;
|
||||
filter:alpha(opacity=20);
|
||||
}
|
||||
|
||||
#result .edit_area_cursor{
|
||||
position: absolute;
|
||||
z-index:6;
|
||||
background-color: #FF6633;
|
||||
top: -100px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#result .edit_area_selection_field .overline{
|
||||
background-color: #996600;
|
||||
}
|
||||
|
||||
|
||||
/* area popup */
|
||||
.editarea_popup{
|
||||
border: solid 1px #888888;
|
||||
background-color: #ECE9D8;
|
||||
width: 250px;
|
||||
padding: 4px;
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
z-index: 15;
|
||||
top: -500px;
|
||||
}
|
||||
|
||||
.editarea_popup, .editarea_popup table{
|
||||
font-family: sans-serif;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.editarea_popup img{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.editarea_popup .close_popup{
|
||||
float: right;
|
||||
line-height: 16px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.editarea_popup .copyright{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Area_search */
|
||||
div#area_search_replace{
|
||||
/*width: 250px;*/
|
||||
}
|
||||
|
||||
div#area_search_replace img{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
div#area_search_replace div.button{
|
||||
text-align: center;
|
||||
line-height: 1.7em;
|
||||
}
|
||||
|
||||
div#area_search_replace .button a{
|
||||
cursor: pointer;
|
||||
border: solid 1px #888888;
|
||||
background-color: #DEDEDE;
|
||||
text-decoration: none;
|
||||
padding: 0 2px;
|
||||
color: #000000;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div#area_search_replace a:hover{
|
||||
/*border: solid 1px #888888;*/
|
||||
background-color: #EDEDED;
|
||||
}
|
||||
|
||||
div#area_search_replace #move_area_search_replace{
|
||||
cursor: move;
|
||||
border: solid 1px #888;
|
||||
}
|
||||
|
||||
div#area_search_replace #close_area_search_replace{
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div#area_search_replace #area_search_msg{
|
||||
height: 18px;
|
||||
overflow: hidden;
|
||||
border-top: solid 1px #888;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
/* area help */
|
||||
#edit_area_help{
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
#edit_area_help div.close_popup{
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* area_toolbar */
|
||||
.area_toolbar{
|
||||
/*font: 11px sans-serif;*/
|
||||
width: 100%;
|
||||
/*height: 21px; */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #ECE9D8;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.area_toolbar, .area_toolbar table{
|
||||
font: 11px sans-serif;
|
||||
}
|
||||
|
||||
.area_toolbar img{
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.area_toolbar input{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.area_toolbar select{
|
||||
font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;
|
||||
font-size: 7pt;
|
||||
font-weight: normal;
|
||||
margin: 2px 0 0 0 ;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
background-color: #F0F0EE;
|
||||
}
|
||||
|
||||
table.statusbar{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.area_toolbar td.infos{
|
||||
text-align: center;
|
||||
width: 130px;
|
||||
border-right: solid 1px #888;
|
||||
border-width: 0 1px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.area_toolbar td.total{
|
||||
text-align: right;
|
||||
width: 50px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.area_toolbar td.resize{
|
||||
text-align: right;
|
||||
}
|
||||
/*
|
||||
.area_toolbar span{
|
||||
line-height: 1px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}*/
|
||||
|
||||
.area_toolbar span#resize_area{
|
||||
cursor: nw-resize;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* toolbar buttons */
|
||||
.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {
|
||||
border: 0; margin: 0; padding: 0; background: transparent;
|
||||
margin-top: 0;
|
||||
margin-left: 1px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.editAreaButtonNormal {
|
||||
border: 1px solid #ECE9D8 !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.editAreaButtonOver {
|
||||
border: 1px solid #0A246A !important;
|
||||
cursor: pointer;
|
||||
background-color: #B6BDD2;
|
||||
}
|
||||
|
||||
.editAreaButtonDown {
|
||||
cursor: pointer;
|
||||
border: 1px solid #0A246A !important;
|
||||
background-color: #8592B5;
|
||||
}
|
||||
|
||||
.editAreaButtonSelected {
|
||||
border: 1px solid #C0C0BB !important;
|
||||
cursor: pointer;
|
||||
background-color: #F4F2E8;
|
||||
}
|
||||
|
||||
.editAreaButtonDisabled {
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
|
||||
-moz-opacity:0.3;
|
||||
opacity: 0.3;
|
||||
border: 1px solid #F0F0EE !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.editAreaSeparatorLine {
|
||||
margin: 1px 2px;
|
||||
background-color: #C0C0BB;
|
||||
width: 2px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
/* waiting screen */
|
||||
#processing{
|
||||
display: none;
|
||||
background-color:#ECE9D8;
|
||||
border: solid #888 1px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#processing_text{
|
||||
position:absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 200px;
|
||||
height: 20px;
|
||||
margin-left: -100px;
|
||||
margin-top: -10px;
|
||||
text-align: center;
|
||||
}
|
||||
/* end */
|
||||
|
||||
|
||||
/**** tab browsing area ****/
|
||||
#tab_browsing_area{
|
||||
display: none;
|
||||
background-color: #CCC9A8;
|
||||
border-top: 1px solid #888;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#tab_browsing_list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#tab_browsing_list li {
|
||||
float: left;
|
||||
margin: -1px;
|
||||
}
|
||||
#tab_browsing_list a {
|
||||
position: relative;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
line-height:14px;
|
||||
}
|
||||
|
||||
#tab_browsing_list a span {
|
||||
display: block;
|
||||
color: #000;
|
||||
background: #ECE9D8;
|
||||
border: 1px solid #888;
|
||||
border-width: 1px 1px 0;
|
||||
text-align: center;
|
||||
padding: 2px 2px 1px 4px;
|
||||
position: relative; /*IE 6 hack */
|
||||
}
|
||||
|
||||
#tab_browsing_list a b {
|
||||
display: block;
|
||||
border-bottom: 2px solid #617994;
|
||||
}
|
||||
|
||||
#tab_browsing_list a .edited {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#tab_browsing_list a.edited .edited {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#tab_browsing_list a img{
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
#tab_browsing_list a.edited img{
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
#tab_browsing_list a:hover span {
|
||||
background: #F4F2E8;
|
||||
border-color: #0A246A;
|
||||
}
|
||||
|
||||
#tab_browsing_list .selected a span{
|
||||
background: #046380;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
#no_file_selected{
|
||||
height: 100%;
|
||||
width: 150%; /* Opera need more than 100% */
|
||||
background: #CCC;
|
||||
display: none;
|
||||
z-index: 20;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
/*** Non-editable mode ***/
|
||||
.non_editable #editor
|
||||
{
|
||||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.non_editable .area_toolbar
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*** Auto completion ***/
|
||||
#auto_completion_area
|
||||
{
|
||||
background: #FFF;
|
||||
border: solid 1px #888;
|
||||
position: absolute;
|
||||
z-index: 15;
|
||||
width: 280px;
|
||||
height: 180px;
|
||||
overflow: auto;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#auto_completion_area a, #auto_completion_area a:visited
|
||||
{
|
||||
display: block;
|
||||
padding: 0 2px 1px;
|
||||
color: #000;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus
|
||||
{
|
||||
background: #D6E1FE;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#auto_completion_area ul
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none inside;
|
||||
}
|
||||
#auto_completion_area li
|
||||
{
|
||||
padding: 0;
|
||||
}
|
||||
#auto_completion_area .prefix
|
||||
{
|
||||
font-style: italic;
|
||||
padding: 0 3px;
|
||||
}
|
||||
527
applications/admin/static/edit_area/edit_area.js
Executable file
@@ -0,0 +1,527 @@
|
||||
/******
|
||||
*
|
||||
* EditArea
|
||||
* Developped by Christophe Dolivet
|
||||
* Released under LGPL, Apache and BSD licenses (use the one you want)
|
||||
*
|
||||
******/
|
||||
|
||||
function EditArea(){
|
||||
var t=this;
|
||||
t.error= false; // to know if load is interrrupt
|
||||
|
||||
t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"},
|
||||
{popup_id: "edit_area_help", icon_id: "help"}];
|
||||
t.plugins= {};
|
||||
|
||||
t.line_number=0;
|
||||
|
||||
parent.editAreaLoader.set_browser_infos(t); // navigator identification
|
||||
// fix IE8 detection as we run in IE7 emulate mode through X-UA <meta> tag
|
||||
if( t.isIE >= 8 )
|
||||
t.isIE = 7;
|
||||
|
||||
t.last_selection={};
|
||||
t.last_text_to_highlight="";
|
||||
t.last_hightlighted_text= "";
|
||||
t.syntax_list= [];
|
||||
t.allready_used_syntax= {};
|
||||
t.check_line_selection_timer= 50; // the timer delay for modification and/or selection change detection
|
||||
|
||||
t.textareaFocused= false;
|
||||
t.highlight_selection_line= null;
|
||||
t.previous= [];
|
||||
t.next= [];
|
||||
t.last_undo="";
|
||||
t.files= {};
|
||||
t.filesIdAssoc= {};
|
||||
t.curr_file= '';
|
||||
//t.loaded= false;
|
||||
t.assocBracket={};
|
||||
t.revertAssocBracket= {};
|
||||
// bracket selection init
|
||||
t.assocBracket["("]=")";
|
||||
t.assocBracket["{"]="}";
|
||||
t.assocBracket["["]="]";
|
||||
for(var index in t.assocBracket){
|
||||
t.revertAssocBracket[t.assocBracket[index]]=index;
|
||||
}
|
||||
t.is_editable= true;
|
||||
|
||||
|
||||
/*t.textarea="";
|
||||
|
||||
t.state="declare";
|
||||
t.code = []; // store highlight syntax for languagues*/
|
||||
// font datas
|
||||
t.lineHeight= 16;
|
||||
/*t.default_font_family= "monospace";
|
||||
t.default_font_size= 10;*/
|
||||
t.tab_nb_char= 8; //nb of white spaces corresponding to a tabulation
|
||||
if(t.isOpera)
|
||||
t.tab_nb_char= 6;
|
||||
|
||||
t.is_tabbing= false;
|
||||
|
||||
t.fullscreen= {'isFull': false};
|
||||
|
||||
t.isResizing=false; // resize var
|
||||
|
||||
// init with settings and ID (area_id is a global var defined by editAreaLoader on iframe creation
|
||||
t.id= area_id;
|
||||
t.settings= editAreas[t.id]["settings"];
|
||||
|
||||
if((""+t.settings['replace_tab_by_spaces']).match(/^[0-9]+$/))
|
||||
{
|
||||
t.tab_nb_char= t.settings['replace_tab_by_spaces'];
|
||||
t.tabulation="";
|
||||
for(var i=0; i<t.tab_nb_char; i++)
|
||||
t.tabulation+=" ";
|
||||
}else{
|
||||
t.tabulation="\t";
|
||||
}
|
||||
|
||||
// retrieve the init parameter for syntax
|
||||
if(t.settings["syntax_selection_allow"] && t.settings["syntax_selection_allow"].length>0)
|
||||
t.syntax_list= t.settings["syntax_selection_allow"].replace(/ /g,"").split(",");
|
||||
|
||||
if(t.settings['syntax'])
|
||||
t.allready_used_syntax[t.settings['syntax']]=true;
|
||||
|
||||
|
||||
};
|
||||
EditArea.prototype.init= function(){
|
||||
var t=this, a, s=t.settings;
|
||||
t.textarea = _$("textarea");
|
||||
t.container = _$("container");
|
||||
t.result = _$("result");
|
||||
t.content_highlight = _$("content_highlight");
|
||||
t.selection_field = _$("selection_field");
|
||||
t.selection_field_text= _$("selection_field_text");
|
||||
t.processing_screen = _$("processing");
|
||||
t.editor_area = _$("editor");
|
||||
t.tab_browsing_area = _$("tab_browsing_area");
|
||||
t.test_font_size = _$("test_font_size");
|
||||
a = t.textarea;
|
||||
|
||||
if(!s['is_editable'])
|
||||
t.set_editable(false);
|
||||
|
||||
t.set_show_line_colors( s['show_line_colors'] );
|
||||
|
||||
if(syntax_selec= _$("syntax_selection"))
|
||||
{
|
||||
// set up syntax selection lsit in the toolbar
|
||||
for(var i=0; i<t.syntax_list.length; i++) {
|
||||
var syntax= t.syntax_list[i];
|
||||
var option= document.createElement("option");
|
||||
option.value= syntax;
|
||||
if(syntax==s['syntax'])
|
||||
option.selected= "selected";
|
||||
dispSyntax = parent.editAreaLoader.syntax_display_name[ syntax ];
|
||||
option.innerHTML= typeof( dispSyntax ) == 'undefined' ? syntax.substring( 0, 1 ).toUpperCase() + syntax.substring( 1 ) : dispSyntax;//t.get_translation("syntax_" + syntax, "word");
|
||||
syntax_selec.appendChild(option);
|
||||
}
|
||||
}
|
||||
|
||||
// add plugins buttons in the toolbar
|
||||
spans= parent.getChildren(_$("toolbar_1"), "span", "", "", "all", -1);
|
||||
|
||||
for(var i=0; i<spans.length; i++){
|
||||
|
||||
id=spans[i].id.replace(/tmp_tool_(.*)/, "$1");
|
||||
if(id!= spans[i].id){
|
||||
for(var j in t.plugins){
|
||||
if(typeof(t.plugins[j].get_control_html)=="function" ){
|
||||
html=t.plugins[j].get_control_html(id);
|
||||
if(html!=false){
|
||||
html= t.get_translation(html, "template");
|
||||
var new_span= document.createElement("span");
|
||||
new_span.innerHTML= html;
|
||||
var father= spans[i].parentNode;
|
||||
spans[i].parentNode.replaceChild(new_span, spans[i]);
|
||||
break; // exit the for loop
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// init datas
|
||||
//a.value = 'a';//editAreas[t.id]["textarea"].value;
|
||||
|
||||
if(s["debug"])
|
||||
{
|
||||
t.debug=parent.document.getElementById("edit_area_debug_"+t.id);
|
||||
}
|
||||
// init size
|
||||
//this.update_size();
|
||||
|
||||
if(_$("redo") != null)
|
||||
t.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
|
||||
|
||||
// insert css rules for highlight mode
|
||||
if(typeof(parent.editAreaLoader.syntax[s["syntax"]])!="undefined"){
|
||||
for(var i in parent.editAreaLoader.syntax){
|
||||
if (typeof(parent.editAreaLoader.syntax[i]["styles"]) != "undefined"){
|
||||
t.add_style(parent.editAreaLoader.syntax[i]["styles"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// init key events
|
||||
if(t.isOpera)
|
||||
_$("editor").onkeypress = keyDown;
|
||||
else
|
||||
_$("editor").onkeydown = keyDown;
|
||||
|
||||
for(var i=0; i<t.inlinePopup.length; i++){
|
||||
if(t.isOpera)
|
||||
_$(t.inlinePopup[i]["popup_id"]).onkeypress = keyDown;
|
||||
else
|
||||
_$(t.inlinePopup[i]["popup_id"]).onkeydown = keyDown;
|
||||
}
|
||||
|
||||
if(s["allow_resize"]=="both" || s["allow_resize"]=="x" || s["allow_resize"]=="y")
|
||||
t.allow_resize(true);
|
||||
|
||||
parent.editAreaLoader.toggle(t.id, "on");
|
||||
//a.focus();
|
||||
// line selection init
|
||||
t.change_smooth_selection_mode(editArea.smooth_selection);
|
||||
// highlight
|
||||
t.execCommand("change_highlight", s["start_highlight"]);
|
||||
|
||||
// get font size datas
|
||||
t.set_font(editArea.settings["font_family"], editArea.settings["font_size"]);
|
||||
|
||||
// set unselectable text
|
||||
children= parent.getChildren(document.body, "", "selec", "none", "all", -1);
|
||||
for(var i=0; i<children.length; i++){
|
||||
if(t.isIE)
|
||||
children[i].unselectable = true; // IE
|
||||
else
|
||||
children[i].onmousedown= function(){return false};
|
||||
/* children[i].style.MozUserSelect = "none"; // Moz
|
||||
children[i].style.KhtmlUserSelect = "none"; // Konqueror/Safari*/
|
||||
}
|
||||
|
||||
a.spellcheck= s["gecko_spellcheck"];
|
||||
|
||||
/** Browser specific style fixes **/
|
||||
|
||||
// fix rendering bug for highlighted lines beginning with no tabs
|
||||
if( t.isFirefox >= '3' ) {
|
||||
t.content_highlight.style.paddingLeft= "1px";
|
||||
t.selection_field.style.paddingLeft= "1px";
|
||||
t.selection_field_text.style.paddingLeft= "1px";
|
||||
}
|
||||
|
||||
if(t.isIE && t.isIE < 8 ){
|
||||
a.style.marginTop= "-1px";
|
||||
}
|
||||
/*
|
||||
if(t.isOpera){
|
||||
t.editor_area.style.position= "absolute";
|
||||
}*/
|
||||
|
||||
if( t.isSafari ){
|
||||
t.editor_area.style.position = "absolute";
|
||||
// a.style.marginLeft ="-3px";
|
||||
if( t.isSafari < 3.2 ) // Safari 3.0 (3.1?)
|
||||
a.style.marginTop ="1px";
|
||||
}
|
||||
|
||||
// si le textarea n'est pas grand, un click sous le textarea doit provoquer un focus sur le textarea
|
||||
parent.editAreaLoader.add_event(t.result, "click", function(e){ if((e.target || e.srcElement)==editArea.result) { editArea.area_select(editArea.textarea.value.length, 0);} });
|
||||
|
||||
if(s['is_multi_files']!=false)
|
||||
t.open_file({'id': t.curr_file, 'text': ''});
|
||||
|
||||
t.set_word_wrap( s['word_wrap'] );
|
||||
|
||||
setTimeout("editArea.focus();editArea.manage_size();editArea.execCommand('EA_load');", 10);
|
||||
//start checkup routine
|
||||
t.check_undo();
|
||||
t.check_line_selection(true);
|
||||
t.scroll_to_view();
|
||||
|
||||
for(var i in t.plugins){
|
||||
if(typeof(t.plugins[i].onload)=="function")
|
||||
t.plugins[i].onload();
|
||||
}
|
||||
if(s['fullscreen']==true)
|
||||
t.toggle_full_screen(true);
|
||||
|
||||
parent.editAreaLoader.add_event(window, "resize", editArea.update_size);
|
||||
parent.editAreaLoader.add_event(parent.window, "resize", editArea.update_size);
|
||||
parent.editAreaLoader.add_event(top.window, "resize", editArea.update_size);
|
||||
parent.editAreaLoader.add_event(window, "unload", function(){
|
||||
// in case where editAreaLoader have been already cleaned
|
||||
if( parent.editAreaLoader )
|
||||
{
|
||||
parent.editAreaLoader.remove_event(parent.window, "resize", editArea.update_size);
|
||||
parent.editAreaLoader.remove_event(top.window, "resize", editArea.update_size);
|
||||
}
|
||||
if(editAreas[editArea.id] && editAreas[editArea.id]["displayed"]){
|
||||
editArea.execCommand("EA_unload");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*date= new Date();
|
||||
alert(date.getTime()- parent.editAreaLoader.start_time);*/
|
||||
};
|
||||
|
||||
|
||||
|
||||
//called by the toggle_on
|
||||
EditArea.prototype.update_size= function(){
|
||||
var d=document,pd=parent.document,height,width,popup,maxLeft,maxTop;
|
||||
|
||||
if( typeof editAreas != 'undefined' && editAreas[editArea.id] && editAreas[editArea.id]["displayed"]==true){
|
||||
if(editArea.fullscreen['isFull']){
|
||||
pd.getElementById("frame_"+editArea.id).style.width = pd.getElementsByTagName("html")[0].clientWidth + "px";
|
||||
pd.getElementById("frame_"+editArea.id).style.height = pd.getElementsByTagName("html")[0].clientHeight + "px";
|
||||
}
|
||||
|
||||
if(editArea.tab_browsing_area.style.display=='block' && ( !editArea.isIE || editArea.isIE >= 8 ) )
|
||||
{
|
||||
editArea.tab_browsing_area.style.height = "0px";
|
||||
editArea.tab_browsing_area.style.height = (editArea.result.offsetTop - editArea.tab_browsing_area.offsetTop -1)+"px";
|
||||
}
|
||||
|
||||
height = d.body.offsetHeight - editArea.get_all_toolbar_height() - 4;
|
||||
editArea.result.style.height = height +"px";
|
||||
|
||||
width = d.body.offsetWidth -2;
|
||||
editArea.result.style.width = width+"px";
|
||||
//alert("result h: "+ height+" w: "+width+"\ntoolbar h: "+this.get_all_toolbar_height()+"\nbody_h: "+document.body.offsetHeight);
|
||||
|
||||
// check that the popups don't get out of the screen
|
||||
for( i=0; i < editArea.inlinePopup.length; i++ )
|
||||
{
|
||||
popup = _$(editArea.inlinePopup[i]["popup_id"]);
|
||||
maxLeft = d.body.offsetWidth - popup.offsetWidth;
|
||||
maxTop = d.body.offsetHeight - popup.offsetHeight;
|
||||
if( popup.offsetTop > maxTop )
|
||||
popup.style.top = maxTop+"px";
|
||||
if( popup.offsetLeft > maxLeft )
|
||||
popup.style.left = maxLeft+"px";
|
||||
}
|
||||
|
||||
editArea.manage_size( true );
|
||||
editArea.fixLinesHeight( editArea.textarea.value, 0,-1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
EditArea.prototype.manage_size= function(onlyOneTime){
|
||||
if(!editAreas[this.id])
|
||||
return false;
|
||||
|
||||
if(editAreas[this.id]["displayed"]==true && this.textareaFocused)
|
||||
{
|
||||
var area_height,resized= false;
|
||||
|
||||
//1) Manage display width
|
||||
//1.1) Calc the new width to use for display
|
||||
if( !this.settings['word_wrap'] )
|
||||
{
|
||||
var area_width= this.textarea.scrollWidth;
|
||||
area_height= this.textarea.scrollHeight;
|
||||
// bug on old opera versions
|
||||
if(this.isOpera && this.isOpera < 9.6 ){
|
||||
area_width=10000;
|
||||
}
|
||||
//1.2) the width is not the same, we must resize elements
|
||||
if(this.textarea.previous_scrollWidth!=area_width)
|
||||
{
|
||||
this.container.style.width= area_width+"px";
|
||||
this.textarea.style.width= area_width+"px";
|
||||
this.content_highlight.style.width= area_width+"px";
|
||||
this.textarea.previous_scrollWidth=area_width;
|
||||
resized=true;
|
||||
}
|
||||
}
|
||||
// manage wrap width
|
||||
if( this.settings['word_wrap'] )
|
||||
{
|
||||
newW=this.textarea.offsetWidth;
|
||||
if( this.isFirefox || this.isIE )
|
||||
newW-=2;
|
||||
if( this.isSafari )
|
||||
newW-=6;
|
||||
this.content_highlight.style.width=this.selection_field_text.style.width=this.selection_field.style.width=this.test_font_size.style.width=newW+"px";
|
||||
}
|
||||
|
||||
//2) Manage display height
|
||||
//2.1) Calc the new height to use for display
|
||||
if( this.isOpera || this.isFirefox || this.isSafari ) {
|
||||
area_height= this.getLinePosTop( this.last_selection["nb_line"] + 1 );
|
||||
} else {
|
||||
area_height = this.textarea.scrollHeight;
|
||||
}
|
||||
//2.2) the width is not the same, we must resize elements
|
||||
if(this.textarea.previous_scrollHeight!=area_height)
|
||||
{
|
||||
this.container.style.height= (area_height+2)+"px";
|
||||
this.textarea.style.height= area_height+"px";
|
||||
this.content_highlight.style.height= area_height+"px";
|
||||
this.textarea.previous_scrollHeight= area_height;
|
||||
resized=true;
|
||||
}
|
||||
|
||||
//3) if there is new lines, we add new line numbers in the line numeration area
|
||||
if(this.last_selection["nb_line"] >= this.line_number)
|
||||
{
|
||||
var newLines= '', destDiv=_$("line_number"), start=this.line_number, end=this.last_selection["nb_line"]+100;
|
||||
for( i = start+1; i < end; i++ )
|
||||
{
|
||||
newLines+='<div id="line_'+ i +'">'+i+"</div>";
|
||||
this.line_number++;
|
||||
}
|
||||
destDiv.innerHTML= destDiv.innerHTML + newLines;
|
||||
if(this.settings['word_wrap']){
|
||||
this.fixLinesHeight( this.textarea.value, start, -1 );
|
||||
}
|
||||
}
|
||||
|
||||
//4) be sure the text is well displayed
|
||||
this.textarea.scrollTop="0px";
|
||||
this.textarea.scrollLeft="0px";
|
||||
if(resized==true){
|
||||
this.scroll_to_view();
|
||||
}
|
||||
}
|
||||
|
||||
if(!onlyOneTime)
|
||||
setTimeout("editArea.manage_size();", 100);
|
||||
};
|
||||
|
||||
EditArea.prototype.execCommand= function(cmd, param){
|
||||
|
||||
for(var i in this.plugins){
|
||||
if(typeof(this.plugins[i].execCommand)=="function"){
|
||||
if(!this.plugins[i].execCommand(cmd, param))
|
||||
return;
|
||||
}
|
||||
}
|
||||
switch(cmd){
|
||||
case "save":
|
||||
if(this.settings["save_callback"].length>0)
|
||||
eval("parent."+this.settings["save_callback"]+"('"+ this.id +"', editArea.textarea.value);");
|
||||
break;
|
||||
case "load":
|
||||
if(this.settings["load_callback"].length>0)
|
||||
eval("parent."+this.settings["load_callback"]+"('"+ this.id +"');");
|
||||
break;
|
||||
case "onchange":
|
||||
if(this.settings["change_callback"].length>0)
|
||||
eval("parent."+this.settings["change_callback"]+"('"+ this.id +"');");
|
||||
break;
|
||||
case "EA_load":
|
||||
if(this.settings["EA_load_callback"].length>0)
|
||||
eval("parent."+this.settings["EA_load_callback"]+"('"+ this.id +"');");
|
||||
break;
|
||||
case "EA_unload":
|
||||
if(this.settings["EA_unload_callback"].length>0)
|
||||
eval("parent."+this.settings["EA_unload_callback"]+"('"+ this.id +"');");
|
||||
break;
|
||||
case "toggle_on":
|
||||
if(this.settings["EA_toggle_on_callback"].length>0)
|
||||
eval("parent."+this.settings["EA_toggle_on_callback"]+"('"+ this.id +"');");
|
||||
break;
|
||||
case "toggle_off":
|
||||
if(this.settings["EA_toggle_off_callback"].length>0)
|
||||
eval("parent."+this.settings["EA_toggle_off_callback"]+"('"+ this.id +"');");
|
||||
break;
|
||||
case "re_sync":
|
||||
if(!this.do_highlight)
|
||||
break;
|
||||
case "file_switch_on":
|
||||
if(this.settings["EA_file_switch_on_callback"].length>0)
|
||||
eval("parent."+this.settings["EA_file_switch_on_callback"]+"(param);");
|
||||
break;
|
||||
case "file_switch_off":
|
||||
if(this.settings["EA_file_switch_off_callback"].length>0)
|
||||
eval("parent."+this.settings["EA_file_switch_off_callback"]+"(param);");
|
||||
break;
|
||||
case "file_close":
|
||||
if(this.settings["EA_file_close_callback"].length>0)
|
||||
return eval("parent."+this.settings["EA_file_close_callback"]+"(param);");
|
||||
break;
|
||||
|
||||
default:
|
||||
if(typeof(eval("editArea."+cmd))=="function")
|
||||
{
|
||||
if(this.settings["debug"])
|
||||
eval("editArea."+ cmd +"(param);");
|
||||
else
|
||||
try{eval("editArea."+ cmd +"(param);");}catch(e){};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EditArea.prototype.get_translation= function(word, mode){
|
||||
if(mode=="template")
|
||||
return parent.editAreaLoader.translate(word, this.settings["language"], mode);
|
||||
else
|
||||
return parent.editAreaLoader.get_word_translation(word, this.settings["language"]);
|
||||
};
|
||||
|
||||
EditArea.prototype.add_plugin= function(plug_name, plug_obj){
|
||||
for(var i=0; i<this.settings["plugins"].length; i++){
|
||||
if(this.settings["plugins"][i]==plug_name){
|
||||
this.plugins[plug_name]=plug_obj;
|
||||
plug_obj.baseURL=parent.editAreaLoader.baseURL + "plugins/" + plug_name + "/";
|
||||
if( typeof(plug_obj.init)=="function" )
|
||||
plug_obj.init();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EditArea.prototype.load_css= function(url){
|
||||
try{
|
||||
link = document.createElement("link");
|
||||
link.type = "text/css";
|
||||
link.rel= "stylesheet";
|
||||
link.media="all";
|
||||
link.href = url;
|
||||
head = document.getElementsByTagName("head");
|
||||
head[0].appendChild(link);
|
||||
}catch(e){
|
||||
document.write("<link href='"+ url +"' rel='stylesheet' type='text/css' />");
|
||||
}
|
||||
};
|
||||
|
||||
EditArea.prototype.load_script= function(url){
|
||||
try{
|
||||
script = document.createElement("script");
|
||||
script.type = "text/javascript";
|
||||
script.src = url;
|
||||
script.charset= "UTF-8";
|
||||
head = document.getElementsByTagName("head");
|
||||
head[0].appendChild(script);
|
||||
}catch(e){
|
||||
document.write("<script type='text/javascript' src='" + url + "' charset=\"UTF-8\"><"+"/script>");
|
||||
}
|
||||
};
|
||||
|
||||
// add plugin translation to language translation array
|
||||
EditArea.prototype.add_lang= function(language, values){
|
||||
if(!parent.editAreaLoader.lang[language])
|
||||
parent.editAreaLoader.lang[language]={};
|
||||
for(var i in values)
|
||||
parent.editAreaLoader.lang[language][i]= values[i];
|
||||
};
|
||||
|
||||
// short cut for document.getElementById()
|
||||
function _$(id){return document.getElementById( id );};
|
||||
|
||||
var editArea = new EditArea();
|
||||
parent.editAreaLoader.add_event(window, "load", init);
|
||||
|
||||
function init(){
|
||||
setTimeout("editArea.init(); ", 10);
|
||||
};
|
||||
428
applications/admin/static/edit_area/edit_area_compressor.php
Executable file
@@ -0,0 +1,428 @@
|
||||
<?php
|
||||
/******
|
||||
*
|
||||
* EditArea PHP compressor
|
||||
* Developped by Christophe Dolivet
|
||||
* Released under LGPL, Apache and BSD licenses
|
||||
* v1.1.3 (2007/01/18)
|
||||
*
|
||||
******/
|
||||
|
||||
// CONFIG
|
||||
$param['cache_duration']= 3600 * 24 * 10; // 10 days util client cache expires
|
||||
$param['compress'] = true; // enable the code compression, should be activated but it can be usefull to desactivate it for easier error retrieving (true or false)
|
||||
$param['debug'] = false; // Enable this option if you need debuging info
|
||||
$param['use_disk_cache']= true; // If you enable this option gzip files will be cached on disk.
|
||||
$param['use_gzip']= true; // Enable gzip compression
|
||||
// END CONFIG
|
||||
|
||||
$compressor= new Compressor($param);
|
||||
|
||||
class Compressor{
|
||||
|
||||
|
||||
function compressor($param)
|
||||
{
|
||||
$this->__construct($param);
|
||||
}
|
||||
|
||||
function __construct($param)
|
||||
{
|
||||
$this->start_time= $this->get_microtime();
|
||||
$this->file_loaded_size=0;
|
||||
$this->param= $param;
|
||||
$this->script_list="";
|
||||
$this->path= dirname(__FILE__)."/";
|
||||
if(isset($_GET['plugins'])){
|
||||
$this->load_all_plugins= true;
|
||||
$this->full_cache_file= $this->path."edit_area_full_with_plugins.js";
|
||||
$this->gzip_cache_file= $this->path."edit_area_full_with_plugins.gz";
|
||||
}else{
|
||||
$this->load_all_plugins= false;
|
||||
$this->full_cache_file= $this->path."edit_area_full.js";
|
||||
$this->gzip_cache_file= $this->path."edit_area_full.gz";
|
||||
}
|
||||
|
||||
$this->check_gzip_use();
|
||||
$this->send_headers();
|
||||
$this->check_cache();
|
||||
$this->load_files();
|
||||
$this->send_datas();
|
||||
}
|
||||
|
||||
function send_headers()
|
||||
{
|
||||
header("Content-type: text/javascript; charset: UTF-8");
|
||||
header("Vary: Accept-Encoding"); // Handle proxies
|
||||
header(sprintf("Expires: %s GMT", gmdate("D, d M Y H:i:s", time() + $this->param['cache_duration'])) );
|
||||
if($this->use_gzip)
|
||||
header("Content-Encoding: ".$this->gzip_enc_header);
|
||||
}
|
||||
|
||||
function check_gzip_use()
|
||||
{
|
||||
$encodings = array();
|
||||
$desactivate_gzip=false;
|
||||
|
||||
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
|
||||
$encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));
|
||||
|
||||
// desactivate gzip for IE version < 7
|
||||
if(preg_match("/(?:msie )([0-9.]+)/i", $_SERVER['HTTP_USER_AGENT'], $ie))
|
||||
{
|
||||
if($ie[1]<7)
|
||||
$desactivate_gzip=true;
|
||||
}
|
||||
|
||||
// Check for gzip header or northon internet securities
|
||||
if (!$desactivate_gzip && $this->param['use_gzip'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
|
||||
$this->gzip_enc_header= in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
|
||||
$this->use_gzip=true;
|
||||
$this->cache_file=$this->gzip_cache_file;
|
||||
}else{
|
||||
$this->use_gzip=false;
|
||||
$this->cache_file=$this->full_cache_file;
|
||||
}
|
||||
}
|
||||
|
||||
function check_cache()
|
||||
{
|
||||
// Only gzip the contents if clients and server support it
|
||||
if (file_exists($this->cache_file)) {
|
||||
// check if cache file must be updated
|
||||
$cache_date=0;
|
||||
if ($dir = opendir($this->path)) {
|
||||
while (($file = readdir($dir)) !== false) {
|
||||
if(is_file($this->path.$file) && $file!="." && $file!="..")
|
||||
$cache_date= max($cache_date, filemtime($this->path.$file));
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
if($this->load_all_plugins){
|
||||
$plug_path= $this->path."plugins/";
|
||||
if (($dir = @opendir($plug_path)) !== false)
|
||||
{
|
||||
while (($file = readdir($dir)) !== false)
|
||||
{
|
||||
if ($file !== "." && $file !== "..")
|
||||
{
|
||||
if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
|
||||
$cache_date= max($cache_date, filemtime("plugins/".$file."/".$file.".js"));
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
if(filemtime($this->cache_file) >= $cache_date){
|
||||
// if cache file is up to date
|
||||
$last_modified = gmdate("D, d M Y H:i:s",filemtime($this->cache_file))." GMT";
|
||||
if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && strcasecmp($_SERVER["HTTP_IF_MODIFIED_SINCE"], $last_modified) === 0)
|
||||
{
|
||||
header("HTTP/1.1 304 Not Modified");
|
||||
header("Last-modified: ".$last_modified);
|
||||
header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
|
||||
header("Pragma:"); // Tells HTTP 1.0 clients to cache
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Last-modified: ".$last_modified);
|
||||
header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
|
||||
header("Pragma:"); // Tells HTTP 1.0 clients to cache
|
||||
header('Content-Length: '.filesize($this->cache_file));
|
||||
echo file_get_contents($this->cache_file);
|
||||
}
|
||||
die;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function load_files()
|
||||
{
|
||||
$loader= $this->get_content("edit_area_loader.js")."\n";
|
||||
|
||||
// get the list of other files to load
|
||||
$loader= preg_replace("/(t\.scripts_to_load=\s*)\[([^\]]*)\];/e"
|
||||
, "\$this->replace_scripts('script_list', '\\1', '\\2')"
|
||||
, $loader);
|
||||
|
||||
$loader= preg_replace("/(t\.sub_scripts_to_load=\s*)\[([^\]]*)\];/e"
|
||||
, "\$this->replace_scripts('sub_script_list', '\\1', '\\2')"
|
||||
, $loader);
|
||||
|
||||
// replace languages names
|
||||
$reg_path= $this->path."reg_syntax/";
|
||||
$a_displayName = array();
|
||||
if (($dir = @opendir($reg_path)) !== false)
|
||||
{
|
||||
while (($file = readdir($dir)) !== false)
|
||||
{
|
||||
if( $file !== "." && $file !== ".." && ( $pos = strpos( $file, '.js' ) ) !== false )
|
||||
{
|
||||
$jsContent = $this->file_get_contents( $reg_path.$file );
|
||||
if( preg_match( '@(\'|")DISPLAY_NAME\1\s*:\s*(\'|")(.*)\2@', $jsContent, $match ) )
|
||||
{
|
||||
$a_displayName[] = "'". substr( $file, 0, $pos ) ."':'". htmlspecialchars( $match[3], ENT_QUOTES ) ."'";
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
$loader = str_replace( '/*syntax_display_name_AUTO-FILL-BY-COMPRESSOR*/', implode( ",", $a_displayName ), $loader );
|
||||
|
||||
$this->datas= $loader;
|
||||
$this->compress_javascript($this->datas);
|
||||
|
||||
// load other scripts needed for the loader
|
||||
preg_match_all('/"([^"]*)"/', $this->script_list, $match);
|
||||
foreach($match[1] as $key => $value)
|
||||
{
|
||||
$content= $this->get_content(preg_replace("/\\|\//i", "", $value).".js");
|
||||
$this->compress_javascript($content);
|
||||
$this->datas.= $content."\n";
|
||||
}
|
||||
//$this->datas);
|
||||
//$this->datas= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $this->datas);
|
||||
|
||||
// improved compression step 1/2
|
||||
$this->datas= preg_replace(array("/(\b)EditAreaLoader(\b)/", "/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/"), array("EAL", "eAL", "eAs"), $this->datas);
|
||||
//$this->datas= str_replace(array("EditAreaLoader", "editAreaLoader", "editAreas"), array("EAL", "eAL", "eAs"), $this->datas);
|
||||
$this->datas.= "var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;";
|
||||
|
||||
// load sub scripts
|
||||
$sub_scripts="";
|
||||
$sub_scripts_list= array();
|
||||
preg_match_all('/"([^"]*)"/', $this->sub_script_list, $match);
|
||||
foreach($match[1] as $value){
|
||||
$sub_scripts_list[]= preg_replace("/\\|\//i", "", $value).".js";
|
||||
}
|
||||
|
||||
if($this->load_all_plugins){
|
||||
// load plugins scripts
|
||||
$plug_path= $this->path."plugins/";
|
||||
if (($dir = @opendir($plug_path)) !== false)
|
||||
{
|
||||
while (($file = readdir($dir)) !== false)
|
||||
{
|
||||
if ($file !== "." && $file !== "..")
|
||||
{
|
||||
if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
|
||||
$sub_scripts_list[]= "plugins/".$file."/".$file.".js";
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($sub_scripts_list as $value){
|
||||
$sub_scripts.= $this->get_javascript_content($value);
|
||||
}
|
||||
// improved compression step 2/2
|
||||
$sub_scripts= preg_replace(array("/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/", "/(\b)editArea(\b)/", "/(\b)EditArea(\b)/"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
|
||||
// $sub_scripts= str_replace(array("editAreaLoader", "editAreas", "editArea", "EditArea"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
|
||||
$sub_scripts.= "var editArea= eA;EditArea=EA;";
|
||||
|
||||
|
||||
// add the scripts
|
||||
// $this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\";\n", $sub_scripts);
|
||||
|
||||
|
||||
// add the script and use a last compression
|
||||
if( $this->param['compress'] )
|
||||
{
|
||||
$last_comp = array( 'Á' => 'this',
|
||||
'Â' => 'textarea',
|
||||
'Ã' => 'function',
|
||||
'Ä' => 'prototype',
|
||||
'Å' => 'settings',
|
||||
'Æ' => 'length',
|
||||
'Ç' => 'style',
|
||||
'È' => 'parent',
|
||||
'É' => 'last_selection',
|
||||
'Ê' => 'value',
|
||||
'Ë' => 'true',
|
||||
'Ì' => 'false'
|
||||
/*,
|
||||
'Î' => '"',
|
||||
'Ï' => "\n",
|
||||
'À' => "\r"*/);
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_comp = array();
|
||||
}
|
||||
|
||||
$js_replace= '';
|
||||
foreach( $last_comp as $key => $val )
|
||||
$js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')";
|
||||
|
||||
$this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\"%s;\n",
|
||||
str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ),
|
||||
$js_replace);
|
||||
|
||||
if($this->load_all_plugins)
|
||||
$this->datas.="editAreaLoader.all_plugins_loaded=true;\n";
|
||||
|
||||
|
||||
// load the template
|
||||
$this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html"));
|
||||
// load the css
|
||||
$this->datas.= sprintf("editAreaLoader.iframe_css= \"<style>%s</style>\";\n", $this->get_css_content("edit_area.css"));
|
||||
|
||||
// $this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();";
|
||||
|
||||
}
|
||||
|
||||
function send_datas()
|
||||
{
|
||||
if($this->param['debug']){
|
||||
$header=sprintf("/* USE PHP COMPRESSION\n");
|
||||
$header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas));
|
||||
if($this->use_gzip){
|
||||
$gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);
|
||||
$header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas));
|
||||
$ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0);
|
||||
}else{
|
||||
$ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0);
|
||||
}
|
||||
$header.=sprintf(", reduced by %s%%\n", $ratio);
|
||||
$header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time);
|
||||
$header.=sprintf("%s\n", implode("\n", $this->infos));
|
||||
$header.=sprintf("*/\n");
|
||||
$this->datas= $header.$this->datas;
|
||||
}
|
||||
$mtime= time(); // ensure that the 2 disk files will have the same update time
|
||||
// generate gzip file and cahce it if using disk cache
|
||||
if($this->use_gzip){
|
||||
$this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);
|
||||
if($this->param['use_disk_cache'])
|
||||
$this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime);
|
||||
}
|
||||
|
||||
// generate full js file and cache it if using disk cache
|
||||
if($this->param['use_disk_cache'])
|
||||
$this->file_put_contents($this->full_cache_file, $this->datas, $mtime);
|
||||
|
||||
// generate output
|
||||
if($this->use_gzip)
|
||||
echo $this->gzip_datas;
|
||||
else
|
||||
echo $this->datas;
|
||||
|
||||
// die;
|
||||
}
|
||||
|
||||
|
||||
function get_content($end_uri)
|
||||
{
|
||||
$end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security)
|
||||
$file= $this->path.$end_uri;
|
||||
if(file_exists($file)){
|
||||
$this->infos[]=sprintf("'%s' loaded", $end_uri);
|
||||
/*$fd = fopen($file, 'rb');
|
||||
$content = fread($fd, filesize($file));
|
||||
fclose($fd);
|
||||
return $content;*/
|
||||
return $this->file_get_contents($file);
|
||||
}else{
|
||||
$this->infos[]=sprintf("'%s' not loaded", $end_uri);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function get_javascript_content($end_uri)
|
||||
{
|
||||
$val=$this->get_content($end_uri);
|
||||
|
||||
$this->compress_javascript($val);
|
||||
$this->prepare_string_for_quotes($val);
|
||||
return $val;
|
||||
}
|
||||
|
||||
function compress_javascript(&$code)
|
||||
{
|
||||
if($this->param['compress'])
|
||||
{
|
||||
// remove all comments
|
||||
// (\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))
|
||||
$code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
|
||||
// remove line return, empty line and tabulation
|
||||
$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
|
||||
// add line break before "else" otherwise navigators can't manage to parse the file
|
||||
$code= preg_replace('/(\b(else)\b)/', "\n$1", $code);
|
||||
// remove unnecessary spaces
|
||||
$code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code);
|
||||
}
|
||||
}
|
||||
|
||||
function get_css_content($end_uri){
|
||||
$code=$this->get_content($end_uri);
|
||||
// remove comments
|
||||
$code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code);
|
||||
// remove spaces
|
||||
$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code);
|
||||
// remove spaces
|
||||
$code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code);
|
||||
|
||||
$this->prepare_string_for_quotes($code);
|
||||
return $code;
|
||||
}
|
||||
|
||||
function get_html_content($end_uri){
|
||||
$code=$this->get_content($end_uri);
|
||||
//$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
|
||||
$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
|
||||
$this->prepare_string_for_quotes($code);
|
||||
return $code;
|
||||
}
|
||||
|
||||
function prepare_string_for_quotes(&$str){
|
||||
// prepare the code to be putted into quotes
|
||||
/*$pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/");
|
||||
$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\\\n"$1+"');*/
|
||||
$pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/");
|
||||
if($this->param['compress'])
|
||||
$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\n');
|
||||
else
|
||||
$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , "\\n\"\n+\"");
|
||||
$str= preg_replace($pattern, $replace, $str);
|
||||
}
|
||||
|
||||
function replace_scripts($var, $param1, $param2)
|
||||
{
|
||||
$this->$var=stripslashes($param2);
|
||||
return $param1."[];";
|
||||
}
|
||||
|
||||
/* for php version that have not thoses functions */
|
||||
function file_get_contents($file)
|
||||
{
|
||||
$fd = fopen($file, 'rb');
|
||||
$content = fread($fd, filesize($file));
|
||||
fclose($fd);
|
||||
$this->file_loaded_size+= strlen($content);
|
||||
return $content;
|
||||
}
|
||||
|
||||
function file_put_contents($file, &$content, $mtime=-1)
|
||||
{
|
||||
if($mtime==-1)
|
||||
$mtime=time();
|
||||
$fp = @fopen($file, "wb");
|
||||
if ($fp) {
|
||||
fwrite($fp, $content);
|
||||
fclose($fp);
|
||||
touch($file, $mtime);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_microtime()
|
||||
{
|
||||
list($usec, $sec) = explode(" ", microtime());
|
||||
return ((float)$usec + (float)$sec);
|
||||
}
|
||||
}
|
||||
?>
|
||||
BIN
applications/admin/static/edit_area/edit_area_full.gz
Executable file
38
applications/admin/static/edit_area/edit_area_full.js
Executable file
39
applications/admin/static/edit_area/edit_area_full_with_plugins.js
Executable file
1202
applications/admin/static/edit_area/edit_area_functions.js
Executable file
1081
applications/admin/static/edit_area/edit_area_loader.js
Executable file
336
applications/admin/static/edit_area/elements_functions.js
Executable file
@@ -0,0 +1,336 @@
|
||||
/****
|
||||
* This page contains some general usefull functions for javascript
|
||||
*
|
||||
****/
|
||||
|
||||
|
||||
// need to redefine this functiondue to IE problem
|
||||
function getAttribute( elm, aName ) {
|
||||
var aValue,taName,i;
|
||||
try{
|
||||
aValue = elm.getAttribute( aName );
|
||||
}catch(exept){}
|
||||
|
||||
if( ! aValue ){
|
||||
for( i = 0; i < elm.attributes.length; i ++ ) {
|
||||
taName = elm.attributes[i] .name.toLowerCase();
|
||||
if( taName == aName ) {
|
||||
aValue = elm.attributes[i] .value;
|
||||
return aValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return aValue;
|
||||
};
|
||||
|
||||
// need to redefine this function due to IE problem
|
||||
function setAttribute( elm, attr, val ) {
|
||||
if(attr=="class"){
|
||||
elm.setAttribute("className", val);
|
||||
elm.setAttribute("class", val);
|
||||
}else{
|
||||
elm.setAttribute(attr, val);
|
||||
}
|
||||
};
|
||||
|
||||
/* return a child element
|
||||
elem: element we are searching in
|
||||
elem_type: type of the eleemnt we are searching (DIV, A, etc...)
|
||||
elem_attribute: attribute of the searched element that must match
|
||||
elem_attribute_match: value that elem_attribute must match
|
||||
option: "all" if must return an array of all children, otherwise return the first match element
|
||||
depth: depth of search (-1 or no set => unlimited)
|
||||
*/
|
||||
function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth)
|
||||
{
|
||||
if(!option)
|
||||
var option="single";
|
||||
if(!depth)
|
||||
var depth=-1;
|
||||
if(elem){
|
||||
var children= elem.childNodes;
|
||||
var result=null;
|
||||
var results= [];
|
||||
for (var x=0;x<children.length;x++) {
|
||||
strTagName = new String(children[x].tagName);
|
||||
children_class="?";
|
||||
if(strTagName!= "undefined"){
|
||||
child_attribute= getAttribute(children[x],elem_attribute);
|
||||
if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){
|
||||
if(option=="all"){
|
||||
results.push(children[x]);
|
||||
}else{
|
||||
return children[x];
|
||||
}
|
||||
}
|
||||
if(depth!=0){
|
||||
result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);
|
||||
if(option=="all"){
|
||||
if(result.length>0){
|
||||
results= results.concat(result);
|
||||
}
|
||||
}else if(result!=null){
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(option=="all")
|
||||
return results;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
function isChildOf(elem, parent){
|
||||
if(elem){
|
||||
if(elem==parent)
|
||||
return true;
|
||||
while(elem.parentNode != 'undefined'){
|
||||
return isChildOf(elem.parentNode, parent);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
function getMouseX(e){
|
||||
|
||||
if(e!=null && typeof(e.pageX)!="undefined"){
|
||||
return e.pageX;
|
||||
}else{
|
||||
return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;
|
||||
}
|
||||
};
|
||||
|
||||
function getMouseY(e){
|
||||
if(e!=null && typeof(e.pageY)!="undefined"){
|
||||
return e.pageY;
|
||||
}else{
|
||||
return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;
|
||||
}
|
||||
};
|
||||
|
||||
function calculeOffsetLeft(r){
|
||||
return calculeOffset(r,"offsetLeft")
|
||||
};
|
||||
|
||||
function calculeOffsetTop(r){
|
||||
return calculeOffset(r,"offsetTop")
|
||||
};
|
||||
|
||||
function calculeOffset(element,attr){
|
||||
var offset=0;
|
||||
while(element){
|
||||
offset+=element[attr];
|
||||
element=element.offsetParent
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
|
||||
/** return the computed style
|
||||
* @param: elem: the reference to the element
|
||||
* @param: prop: the name of the css property
|
||||
*/
|
||||
function get_css_property(elem, prop)
|
||||
{
|
||||
if(document.defaultView)
|
||||
{
|
||||
return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
|
||||
}
|
||||
else if(elem.currentStyle)
|
||||
{
|
||||
var prop = prop.replace(/-\D/gi, function(sMatch)
|
||||
{
|
||||
return sMatch.charAt(sMatch.length - 1).toUpperCase();
|
||||
});
|
||||
return elem.currentStyle[prop];
|
||||
}
|
||||
else return null;
|
||||
}
|
||||
|
||||
/****
|
||||
* Moving an element
|
||||
***/
|
||||
|
||||
var _mCE; // currently moving element
|
||||
|
||||
/* allow to move an element in a window
|
||||
e: the event
|
||||
id: the id of the element
|
||||
frame: the frame of the element
|
||||
ex of use:
|
||||
in html: <img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["this_frame_id"]);' .../>
|
||||
or
|
||||
in javascript: document.getElementById("my_div").onmousedown= start_move_element
|
||||
*/
|
||||
function start_move_element(e, id, frame){
|
||||
var elem_id=(e.target || e.srcElement).id;
|
||||
if(id)
|
||||
elem_id=id;
|
||||
if(!frame)
|
||||
frame=window;
|
||||
if(frame.event)
|
||||
e=frame.event;
|
||||
|
||||
_mCE= frame.document.getElementById(elem_id);
|
||||
_mCE.frame=frame;
|
||||
frame.document.onmousemove= move_element;
|
||||
frame.document.onmouseup= end_move_element;
|
||||
/*_mCE.onmousemove= move_element;
|
||||
_mCE.onmouseup= end_move_element;*/
|
||||
|
||||
//alert(_mCE.frame.document.body.offsetHeight);
|
||||
|
||||
mouse_x= getMouseX(e);
|
||||
mouse_y= getMouseY(e);
|
||||
//window.status=frame+ " elem: "+elem_id+" elem: "+ _mCE + " mouse_x: "+mouse_x;
|
||||
_mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px","") || calculeOffsetLeft(_mCE));
|
||||
_mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px","") || calculeOffsetTop(_mCE));
|
||||
return false;
|
||||
};
|
||||
|
||||
function end_move_element(e){
|
||||
_mCE.frame.document.onmousemove= "";
|
||||
_mCE.frame.document.onmouseup= "";
|
||||
_mCE=null;
|
||||
};
|
||||
|
||||
function move_element(e){
|
||||
var newTop,newLeft,maxLeft;
|
||||
|
||||
if( _mCE.frame && _mCE.frame.event )
|
||||
e=_mCE.frame.event;
|
||||
newTop = getMouseY(e) - _mCE.start_pos_y;
|
||||
newLeft = getMouseX(e) - _mCE.start_pos_x;
|
||||
|
||||
maxLeft = _mCE.frame.document.body.offsetWidth- _mCE.offsetWidth;
|
||||
max_top = _mCE.frame.document.body.offsetHeight- _mCE.offsetHeight;
|
||||
newTop = Math.min(Math.max(0, newTop), max_top);
|
||||
newLeft = Math.min(Math.max(0, newLeft), maxLeft);
|
||||
|
||||
_mCE.style.top = newTop+"px";
|
||||
_mCE.style.left = newLeft+"px";
|
||||
return false;
|
||||
};
|
||||
|
||||
/***
|
||||
* Managing a textarea (this part need the navigator infos from editAreaLoader
|
||||
***/
|
||||
|
||||
var nav= editAreaLoader.nav;
|
||||
|
||||
// allow to get infos on the selection: array(start, end)
|
||||
function getSelectionRange(textarea){
|
||||
return {"start": textarea.selectionStart, "end": textarea.selectionEnd};
|
||||
};
|
||||
|
||||
// allow to set the selection
|
||||
function setSelectionRange(t, start, end){
|
||||
t.focus();
|
||||
|
||||
start = Math.max(0, Math.min(t.value.length, start));
|
||||
end = Math.max(start, Math.min(t.value.length, end));
|
||||
|
||||
if( nav.isOpera && nav.isOpera < 9.6 ){ // Opera bug when moving selection start and selection end
|
||||
t.selectionEnd = 1;
|
||||
t.selectionStart = 0;
|
||||
t.selectionEnd = 1;
|
||||
t.selectionStart = 0;
|
||||
}
|
||||
t.selectionStart = start;
|
||||
t.selectionEnd = end;
|
||||
//textarea.setSelectionRange(start, end);
|
||||
|
||||
if(nav.isIE)
|
||||
set_IE_selection(t);
|
||||
};
|
||||
|
||||
|
||||
// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task
|
||||
function get_IE_selection(t){
|
||||
var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;
|
||||
if(t && t.focused)
|
||||
{
|
||||
if(!t.ea_line_height)
|
||||
{ // calculate the lineHeight
|
||||
div= d.createElement("div");
|
||||
div.style.fontFamily= get_css_property(t, "font-family");
|
||||
div.style.fontSize= get_css_property(t, "font-size");
|
||||
div.style.visibility= "hidden";
|
||||
div.innerHTML="0";
|
||||
d.body.appendChild(div);
|
||||
t.ea_line_height= div.offsetHeight;
|
||||
d.body.removeChild(div);
|
||||
}
|
||||
//t.focus();
|
||||
range = d.selection.createRange();
|
||||
try
|
||||
{
|
||||
stored_range = range.duplicate();
|
||||
stored_range.moveToElementText( t );
|
||||
stored_range.setEndPoint( 'EndToEnd', range );
|
||||
if(stored_range.parentElement() == t){
|
||||
// the range don't take care of empty lines in the end of the selection
|
||||
elem = t;
|
||||
scrollTop = 0;
|
||||
while(elem.parentNode){
|
||||
scrollTop+= elem.scrollTop;
|
||||
elem = elem.parentNode;
|
||||
}
|
||||
|
||||
// var scrollTop= t.scrollTop + document.body.scrollTop;
|
||||
|
||||
// var relative_top= range.offsetTop - calculeOffsetTop(t) + scrollTop;
|
||||
relative_top= range.offsetTop - calculeOffsetTop(t)+ scrollTop;
|
||||
// alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(t) +"\nrelativeTop: "+ relative_top);
|
||||
line_start = Math.round((relative_top / t.ea_line_height) +1);
|
||||
|
||||
line_nb = Math.round(range.boundingHeight / t.ea_line_height);
|
||||
|
||||
range_start = stored_range.text.length - range.text.length;
|
||||
tab = t.value.substr(0, range_start).split("\n");
|
||||
range_start += (line_start - tab.length)*2; // add missing empty lines to the selection
|
||||
t.selectionStart = range_start;
|
||||
|
||||
range_end = t.selectionStart + range.text.length;
|
||||
tab = t.value.substr(0, range_start + range.text.length).split("\n");
|
||||
range_end += (line_start + line_nb - 1 - tab.length)*2;
|
||||
t.selectionEnd = range_end;
|
||||
}
|
||||
}
|
||||
catch(e){}
|
||||
}
|
||||
if( t && t.id )
|
||||
{
|
||||
setTimeout("get_IE_selection(document.getElementById('"+ t.id +"'));", 50);
|
||||
}
|
||||
};
|
||||
|
||||
function IE_textarea_focus(){
|
||||
event.srcElement.focused= true;
|
||||
}
|
||||
|
||||
function IE_textarea_blur(){
|
||||
event.srcElement.focused= false;
|
||||
}
|
||||
|
||||
// select the text for IE (take into account the \r difference)
|
||||
function set_IE_selection( t ){
|
||||
var nbLineStart,nbLineStart,nbLineEnd,range;
|
||||
if(!window.closed){
|
||||
nbLineStart=t.value.substr(0, t.selectionStart).split("\n").length - 1;
|
||||
nbLineEnd=t.value.substr(0, t.selectionEnd).split("\n").length - 1;
|
||||
try
|
||||
{
|
||||
range = document.selection.createRange();
|
||||
range.moveToElementText( t );
|
||||
range.setEndPoint( 'EndToStart', range );
|
||||
range.moveStart('character', t.selectionStart - nbLineStart);
|
||||
range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart) );
|
||||
range.select();
|
||||
}
|
||||
catch(e){}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
editAreaLoader.waiting_loading["elements_functions.js"]= "loaded";
|
||||
407
applications/admin/static/edit_area/highlight.js
Executable file
@@ -0,0 +1,407 @@
|
||||
// change_to: "on" or "off"
|
||||
EditArea.prototype.change_highlight= function(change_to){
|
||||
if(this.settings["syntax"].length==0 && change_to==false){
|
||||
this.switchClassSticky(_$("highlight"), 'editAreaButtonDisabled', true);
|
||||
this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.do_highlight==change_to)
|
||||
return false;
|
||||
|
||||
|
||||
this.getIESelection();
|
||||
var pos_start= this.textarea.selectionStart;
|
||||
var pos_end= this.textarea.selectionEnd;
|
||||
|
||||
if(this.do_highlight===true || change_to==false)
|
||||
this.disable_highlight();
|
||||
else
|
||||
this.enable_highlight();
|
||||
this.textarea.focus();
|
||||
this.textarea.selectionStart = pos_start;
|
||||
this.textarea.selectionEnd = pos_end;
|
||||
this.setIESelection();
|
||||
|
||||
};
|
||||
|
||||
EditArea.prototype.disable_highlight= function(displayOnly){
|
||||
var t= this, a=t.textarea, new_Obj, old_class, new_class;
|
||||
|
||||
t.selection_field.innerHTML="";
|
||||
t.selection_field_text.innerHTML="";
|
||||
t.content_highlight.style.visibility="hidden";
|
||||
// replacing the node is far more faster than deleting it's content in firefox
|
||||
new_Obj= t.content_highlight.cloneNode(false);
|
||||
new_Obj.innerHTML= "";
|
||||
t.content_highlight.parentNode.insertBefore(new_Obj, t.content_highlight);
|
||||
t.content_highlight.parentNode.removeChild(t.content_highlight);
|
||||
t.content_highlight= new_Obj;
|
||||
old_class= parent.getAttribute( a,"class" );
|
||||
if(old_class){
|
||||
new_class= old_class.replace( "hidden","" );
|
||||
parent.setAttribute( a, "class", new_class );
|
||||
}
|
||||
|
||||
a.style.backgroundColor="transparent"; // needed in order to see the bracket finders
|
||||
|
||||
//var icon= document.getElementById("highlight");
|
||||
//setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
|
||||
//t.restoreClass(icon);
|
||||
//t.switchClass(icon,'editAreaButtonNormal');
|
||||
t.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', true);
|
||||
t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
|
||||
|
||||
t.do_highlight=false;
|
||||
|
||||
t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonSelected', true);
|
||||
if(typeof(t.smooth_selection_before_highlight)!="undefined" && t.smooth_selection_before_highlight===false){
|
||||
t.change_smooth_selection_mode(false);
|
||||
}
|
||||
|
||||
// this.textarea.style.backgroundColor="#FFFFFF";
|
||||
};
|
||||
|
||||
EditArea.prototype.enable_highlight= function(){
|
||||
var t=this, a=t.textarea, new_class;
|
||||
t.show_waiting_screen();
|
||||
|
||||
t.content_highlight.style.visibility="visible";
|
||||
new_class =parent.getAttribute(a,"class")+" hidden";
|
||||
parent.setAttribute( a, "class", new_class );
|
||||
|
||||
// IE can't manage mouse click outside text range without this
|
||||
if( t.isIE )
|
||||
a.style.backgroundColor="#FFFFFF";
|
||||
|
||||
t.switchClassSticky(_$("highlight"), 'editAreaButtonSelected', false);
|
||||
t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);
|
||||
|
||||
t.smooth_selection_before_highlight=t.smooth_selection;
|
||||
if(!t.smooth_selection)
|
||||
t.change_smooth_selection_mode(true);
|
||||
t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonDisabled', true);
|
||||
|
||||
|
||||
t.do_highlight=true;
|
||||
t.resync_highlight();
|
||||
|
||||
t.hide_waiting_screen();
|
||||
};
|
||||
|
||||
/**
|
||||
* Ask to update highlighted text
|
||||
* @param Array infos - Array of datas returned by EditArea.get_selection_infos()
|
||||
*/
|
||||
EditArea.prototype.maj_highlight= function(infos){
|
||||
// for speed mesure
|
||||
var debug_opti="",tps_start= new Date().getTime(), tps_middle_opti=new Date().getTime();
|
||||
var t=this, hightlighted_text, updated_highlight;
|
||||
var textToHighlight=infos["full_text"], doSyntaxOpti = false, doHtmlOpti = false, stay_begin="", stay_end="", trace_new , trace_last;
|
||||
|
||||
if(t.last_text_to_highlight==infos["full_text"] && t.resync_highlight!==true)
|
||||
return;
|
||||
|
||||
// OPTIMISATION: will search to update only changed lines
|
||||
if(t.reload_highlight===true){
|
||||
t.reload_highlight=false;
|
||||
}else if(textToHighlight.length==0){
|
||||
textToHighlight="\n ";
|
||||
}else{
|
||||
// get text change datas
|
||||
changes = t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);
|
||||
|
||||
// check if it can only reparse the changed text
|
||||
trace_new = t.get_syntax_trace(changes.newTextLine).replace(/\r/g, '');
|
||||
trace_last = t.get_syntax_trace(changes.lastTextLine).replace(/\r/g, '');
|
||||
doSyntaxOpti = ( trace_new == trace_last );
|
||||
|
||||
// check if the difference comes only from a new line created
|
||||
// => we have to remember that the editor can automaticaly add tabulation or space after the new line)
|
||||
if( !doSyntaxOpti && trace_new == "\n"+trace_last && /^[ \t\s]*\n[ \t\s]*$/.test( changes.newText.replace(/\r/g, '') ) && changes.lastText =="" )
|
||||
{
|
||||
doSyntaxOpti = true;
|
||||
}
|
||||
|
||||
// we do the syntax optimisation
|
||||
if( doSyntaxOpti ){
|
||||
|
||||
tps_middle_opti=new Date().getTime();
|
||||
|
||||
stay_begin= t.last_hightlighted_text.split("\n").slice(0, changes.lineStart).join("\n");
|
||||
if(changes.lineStart>0)
|
||||
stay_begin+= "\n";
|
||||
stay_end= t.last_hightlighted_text.split("\n").slice(changes.lineLastEnd+1).join("\n");
|
||||
if(stay_end.length>0)
|
||||
stay_end= "\n"+stay_end;
|
||||
|
||||
// Final check to see that we're not in the middle of span tags
|
||||
if( stay_begin.split('<span').length != stay_begin.split('</span').length
|
||||
|| stay_end.split('<span').length != stay_end.split('</span').length )
|
||||
{
|
||||
doSyntaxOpti = false;
|
||||
stay_end = '';
|
||||
stay_begin = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
if(stay_begin.length==0 && changes.posLastEnd==-1)
|
||||
changes.newTextLine+="\n";
|
||||
textToHighlight=changes.newTextLine;
|
||||
}
|
||||
}
|
||||
if(t.settings["debug"]){
|
||||
var ch =changes;
|
||||
debug_opti= ( doSyntaxOpti?"Optimisation": "No optimisation" )
|
||||
+" start: "+ch.posStart +"("+ch.lineStart+")"
|
||||
+" end_new: "+ ch.posNewEnd+"("+ch.lineNewEnd+")"
|
||||
+" end_last: "+ ch.posLastEnd+"("+ch.lineLastEnd+")"
|
||||
+"\nchanged_text: "+ch.newText+" => trace: "+trace_new
|
||||
+"\nchanged_last_text: "+ch.lastText+" => trace: "+trace_last
|
||||
//debug_opti+= "\nchanged: "+ infos["full_text"].substring(ch.posStart, ch.posNewEnd);
|
||||
+ "\nchanged_line: "+ch.newTextLine
|
||||
+ "\nlast_changed_line: "+ch.lastTextLine
|
||||
+"\nstay_begin: "+ stay_begin.slice(-100)
|
||||
+"\nstay_end: "+ stay_end.substr( 0, 100 );
|
||||
//debug_opti="start: "+stay_begin_len+ "("+nb_line_start_unchanged+") end: "+ (stay_end_len)+ "("+(splited.length-nb_line_end_unchanged)+") ";
|
||||
//debug_opti+="changed: "+ textToHighlight.substring(stay_begin_len, textToHighlight.length-stay_end_len)+" \n";
|
||||
|
||||
//debug_opti+="changed: "+ stay_begin.substr(stay_begin.length-200)+ "----------"+ textToHighlight+"------------------"+ stay_end.substr(0,200) +"\n";
|
||||
+"\n";
|
||||
}
|
||||
|
||||
|
||||
// END OPTIMISATION
|
||||
}
|
||||
|
||||
tps_end_opti = new Date().getTime();
|
||||
|
||||
// apply highlight
|
||||
updated_highlight = t.colorize_text(textToHighlight);
|
||||
tpsAfterReg = new Date().getTime();
|
||||
|
||||
/***
|
||||
* see if we can optimize for updating only the required part of the HTML code
|
||||
*
|
||||
* The goal here will be to find the text node concerned by the modification and to update it
|
||||
*/
|
||||
//-------------------------------------------
|
||||
|
||||
// disable latest optimization tricks (introduced in 0.8.1 and removed in 0.8.2), TODO: check for another try later
|
||||
doSyntaxOpti = doHtmlOpti = false;
|
||||
if( doSyntaxOpti )
|
||||
{
|
||||
try
|
||||
{
|
||||
var replacedBloc, i, nbStart = '', nbEnd = '', newHtml, lengthOld, lengthNew;
|
||||
replacedBloc = t.last_hightlighted_text.substring( stay_begin.length, t.last_hightlighted_text.length - stay_end.length );
|
||||
|
||||
lengthOld = replacedBloc.length;
|
||||
lengthNew = updated_highlight.length;
|
||||
|
||||
// find the identical caracters at the beginning
|
||||
for( i=0; i < lengthOld && i < lengthNew && replacedBloc.charAt(i) == updated_highlight.charAt(i) ; i++ )
|
||||
{
|
||||
}
|
||||
nbStart = i;
|
||||
// find the identical caracters at the end
|
||||
for( i=0; i + nbStart < lengthOld && i + nbStart < lengthNew && replacedBloc.charAt(lengthOld-i-1) == updated_highlight.charAt(lengthNew-i-1) ; i++ )
|
||||
{
|
||||
}
|
||||
nbEnd = i;
|
||||
//console.log( nbStart, nbEnd, replacedBloc, updated_highlight );
|
||||
// get the changes
|
||||
lastHtml = replacedBloc.substring( nbStart, lengthOld - nbEnd );
|
||||
newHtml = updated_highlight.substring( nbStart, lengthNew - nbEnd );
|
||||
|
||||
// We can do the optimisation only if we havn't touch to span elements
|
||||
if( newHtml.indexOf('<span') == -1 && newHtml.indexOf('</span') == -1
|
||||
&& lastHtml.indexOf('<span') == -1 && lastHtml.indexOf('</span') == -1 )
|
||||
{
|
||||
var beginStr, nbOpendedSpan, nbClosedSpan, nbUnchangedChars, span, textNode;
|
||||
doHtmlOpti = true;
|
||||
beginStr = t.last_hightlighted_text.substr( 0, stay_begin.length + nbStart );
|
||||
// fix special chars
|
||||
newHtml = newHtml.replace( /</g, '<').replace( />/g, '>').replace( /&/g, '&');
|
||||
|
||||
nbOpendedSpan = beginStr.split('<span').length - 1;
|
||||
nbClosedSpan = beginStr.split('</span').length - 1;
|
||||
// retrieve the previously opened span (Add 1 for the first level span?)
|
||||
span = t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];
|
||||
|
||||
//--------[
|
||||
// get the textNode to update
|
||||
|
||||
// if we're inside a span, we'll take the one that is opened (can be a parent of the current span)
|
||||
parentSpan = span;
|
||||
maxStartOffset = maxEndOffset = 0;
|
||||
|
||||
// it will be in the child of the root node
|
||||
if( nbOpendedSpan == nbClosedSpan )
|
||||
{
|
||||
while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' )
|
||||
{
|
||||
parentSpan = parentSpan.parentNode;
|
||||
}
|
||||
}
|
||||
// get the last opened span
|
||||
else
|
||||
{
|
||||
maxStartOffset = maxEndOffset = beginStr.length + 1;
|
||||
// move to parent node for each closed span found after the lastest open span
|
||||
nbClosed = beginStr.substr( Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ).split('</span').length - 1;
|
||||
while( nbClosed > 0 )
|
||||
{
|
||||
nbClosed--;
|
||||
parentSpan = parentSpan.parentNode;
|
||||
}
|
||||
|
||||
// find the position of the last opended tag
|
||||
while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' && ( tmpMaxStartOffset = Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ) < ( tmpMaxEndOffset = Math.max( 0, beginStr.lastIndexOf( '</span', maxEndOffset - 1 ) ) ) )
|
||||
{
|
||||
maxStartOffset = tmpMaxStartOffset;
|
||||
maxEndOffset = tmpMaxEndOffset;
|
||||
}
|
||||
}
|
||||
// Note: maxEndOffset is no more used but maxStartOffset will be used
|
||||
|
||||
if( parentSpan.parentNode == t.content_highlight || parentSpan.parentNode.tagName == 'PRE' )
|
||||
{
|
||||
maxStartOffset = Math.max( 0, beginStr.indexOf( '<span' ) );
|
||||
}
|
||||
|
||||
// find the matching text node (this will be one that will be at the end of the beginStr
|
||||
if( maxStartOffset == beginStr.length )
|
||||
{
|
||||
nbSubSpanBefore = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastEndPos = Math.max( 0, beginStr.lastIndexOf( '>', maxStartOffset ) );
|
||||
|
||||
// count the number of sub spans
|
||||
nbSubSpanBefore = beginStr.substr( lastEndPos ).split('<span').length-1;
|
||||
}
|
||||
|
||||
// there is no sub-span before
|
||||
if( nbSubSpanBefore == 0 )
|
||||
{
|
||||
textNode = parentSpan.firstChild;
|
||||
}
|
||||
// we need to find where is the text node modified
|
||||
else
|
||||
{
|
||||
// take the last direct child (no sub-child)
|
||||
lastSubSpan = parentSpan.getElementsByTagName('span')[ nbSubSpanBefore - 1 ];
|
||||
while( lastSubSpan.parentNode != parentSpan )
|
||||
{
|
||||
lastSubSpan = lastSubSpan.parentNode;
|
||||
}
|
||||
|
||||
// associate to next text node following the last sub span
|
||||
if( lastSubSpan.nextSibling == null || lastSubSpan.nextSibling.nodeType != 3 )
|
||||
{
|
||||
textNode = document.createTextNode('');
|
||||
lastSubSpan.parentNode.insertBefore( textNode, lastSubSpan.nextSibling );
|
||||
}
|
||||
else
|
||||
{
|
||||
textNode = lastSubSpan.nextSibling;
|
||||
}
|
||||
}
|
||||
//--------]
|
||||
|
||||
|
||||
//--------[
|
||||
// update the textNode content
|
||||
|
||||
// number of caracters after the last opened of closed span
|
||||
//nbUnchangedChars = ( lastIndex = beginStr.lastIndexOf( '>' ) ) == -1 ? beginStr.length : beginStr.length - ( lastIndex + 1 );
|
||||
//nbUnchangedChars = ? beginStr.length : beginStr.substr( lastIndex + 1 ).replace( /</g, '<').replace( />/g, '>').replace( /&/g, '&').length;
|
||||
|
||||
if( ( lastIndex = beginStr.lastIndexOf( '>' ) ) == -1 )
|
||||
{
|
||||
nbUnchangedChars = beginStr.length;
|
||||
}
|
||||
else
|
||||
{
|
||||
nbUnchangedChars = beginStr.substr( lastIndex + 1 ).replace( /</g, '<').replace( />/g, '>').replace( /&/g, '&').length;
|
||||
//nbUnchangedChars += beginStr.substr( ).replace( /&/g, '&').replace( /</g, '<').replace( />/g, '>').length - beginStr.length;
|
||||
}
|
||||
//alert( nbUnchangedChars );
|
||||
// console.log( span, textNode, nbOpendedSpan,nbClosedSpan, span.nextSibling, textNode.length, nbUnchangedChars, lastHtml, lastHtml.length, newHtml, newHtml.length );
|
||||
// alert( textNode.parentNode.className +'-'+ textNode.parentNode.tagName+"\n"+ textNode.data +"\n"+ nbUnchangedChars +"\n"+ lastHtml.length +"\n"+ newHtml +"\n"+ newHtml.length );
|
||||
// console.log( nbUnchangedChars, lastIndex, beginStr.length, beginStr.replace(/&/g, '&'), lastHtml.length, '|', newHtml.replace( /\t/g, 't').replace( /\n/g, 'n').replace( /\r/g, 'r'), lastHtml.replace( /\t/g, 't').replace( /\n/g, 'n').replace( /\r/, 'r') );
|
||||
// console.log( textNode.data.replace(/&/g, '&') );
|
||||
// IE only manage \r for cariage return in textNode and not \n or \r\n
|
||||
if( t.isIE )
|
||||
{
|
||||
nbUnchangedChars -= ( beginStr.substr( beginStr.length - nbUnchangedChars ).split("\n").length - 1 );
|
||||
//alert( textNode.data.replace(/\r/g, '_r').replace(/\n/g, '_n'));
|
||||
textNode.replaceData( nbUnchangedChars, lastHtml.replace(/\n/g, '').length, newHtml.replace(/\n/g, '') );
|
||||
}
|
||||
else
|
||||
{
|
||||
textNode.replaceData( nbUnchangedChars, lastHtml.length, newHtml );
|
||||
}
|
||||
//--------]
|
||||
}
|
||||
}
|
||||
// an exception shouldn't occured but if replaceData failed at least it won't break everything
|
||||
catch( e )
|
||||
{
|
||||
// throw e;
|
||||
// console.log( e );
|
||||
doHtmlOpti = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*** END HTML update's optimisation ***/
|
||||
// end test
|
||||
|
||||
// console.log( (TPS6-TPS5), (TPS5-TPS4), (TPS4-TPS3), (TPS3-TPS2), (TPS2-TPS1), _CPT );
|
||||
// get the new highlight content
|
||||
tpsAfterOpti2 = new Date().getTime();
|
||||
hightlighted_text = stay_begin + updated_highlight + stay_end;
|
||||
if( !doHtmlOpti )
|
||||
{
|
||||
// update the content of the highlight div by first updating a clone node (as there is no display in the same time for t node it's quite faster (5*))
|
||||
var new_Obj= t.content_highlight.cloneNode(false);
|
||||
if( ( t.isIE && t.isIE < 8 ) || ( t.isOpera && t.isOpera < 9.6 ) )
|
||||
new_Obj.innerHTML= "<pre><span class='"+ t.settings["syntax"] +"'>" + hightlighted_text + "</span></pre>";
|
||||
else
|
||||
new_Obj.innerHTML= "<span class='"+ t.settings["syntax"] +"'>"+ hightlighted_text +"</span>";
|
||||
|
||||
t.content_highlight.parentNode.replaceChild(new_Obj, t.content_highlight);
|
||||
|
||||
t.content_highlight= new_Obj;
|
||||
}
|
||||
|
||||
t.last_text_to_highlight= infos["full_text"];
|
||||
t.last_hightlighted_text= hightlighted_text;
|
||||
|
||||
tps3=new Date().getTime();
|
||||
|
||||
if(t.settings["debug"]){
|
||||
//lineNumber=tab_text.length;
|
||||
//t.debug.value+=" \nNB char: "+_$("src").value.length+" Nb line: "+ lineNumber;
|
||||
|
||||
t.debug.value= "Tps optimisation "+(tps_end_opti-tps_start)
|
||||
+" | tps reg exp: "+ (tpsAfterReg-tps_end_opti)
|
||||
+" | tps opti HTML : "+ (tpsAfterOpti2-tpsAfterReg) + ' '+ ( doHtmlOpti ? 'yes' : 'no' )
|
||||
+" | tps update highlight content: "+ (tps3-tpsAfterOpti2)
|
||||
+" | tpsTotal: "+ (tps3-tps_start)
|
||||
+ "("+tps3+")\n"+ debug_opti;
|
||||
// t.debug.value+= "highlight\n"+hightlighted_text;*/
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
EditArea.prototype.resync_highlight= function(reload_now){
|
||||
this.reload_highlight=true;
|
||||
this.last_text_to_highlight="";
|
||||
this.focus();
|
||||
if(reload_now)
|
||||
this.check_line_selection(false);
|
||||
};
|
||||
BIN
applications/admin/static/edit_area/images/autocompletion.gif
Executable file
|
After Width: | Height: | Size: 359 B |
BIN
applications/admin/static/edit_area/images/close.gif
Executable file
|
After Width: | Height: | Size: 102 B |
BIN
applications/admin/static/edit_area/images/fullscreen.gif
Executable file
|
After Width: | Height: | Size: 198 B |
BIN
applications/admin/static/edit_area/images/go_to_line.gif
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
applications/admin/static/edit_area/images/help.gif
Executable file
|
After Width: | Height: | Size: 295 B |
BIN
applications/admin/static/edit_area/images/highlight.gif
Executable file
|
After Width: | Height: | Size: 256 B |
BIN
applications/admin/static/edit_area/images/load.gif
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
applications/admin/static/edit_area/images/move.gif
Executable file
|
After Width: | Height: | Size: 257 B |
BIN
applications/admin/static/edit_area/images/newdocument.gif
Executable file
|
After Width: | Height: | Size: 170 B |
BIN
applications/admin/static/edit_area/images/opacity.png
Executable file
|
After Width: | Height: | Size: 147 B |
BIN
applications/admin/static/edit_area/images/processing.gif
Executable file
|
After Width: | Height: | Size: 825 B |
BIN
applications/admin/static/edit_area/images/redo.gif
Executable file
|
After Width: | Height: | Size: 169 B |
BIN
applications/admin/static/edit_area/images/reset_highlight.gif
Executable file
|
After Width: | Height: | Size: 168 B |
BIN
applications/admin/static/edit_area/images/save.gif
Executable file
|
After Width: | Height: | Size: 285 B |
BIN
applications/admin/static/edit_area/images/search.gif
Executable file
|
After Width: | Height: | Size: 191 B |
BIN
applications/admin/static/edit_area/images/smooth_selection.gif
Executable file
|
After Width: | Height: | Size: 174 B |
BIN
applications/admin/static/edit_area/images/spacer.gif
Executable file
|
After Width: | Height: | Size: 43 B |
BIN
applications/admin/static/edit_area/images/statusbar_resize.gif
Executable file
|
After Width: | Height: | Size: 79 B |
BIN
applications/admin/static/edit_area/images/undo.gif
Executable file
|
After Width: | Height: | Size: 175 B |
BIN
applications/admin/static/edit_area/images/word_wrap.gif
Executable file
|
After Width: | Height: | Size: 951 B |
145
applications/admin/static/edit_area/keyboard.js
Executable file
@@ -0,0 +1,145 @@
|
||||
var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};
|
||||
|
||||
|
||||
|
||||
function keyDown(e){
|
||||
if(!e){ // if IE
|
||||
e=event;
|
||||
}
|
||||
|
||||
// send the event to the plugins
|
||||
for(var i in editArea.plugins){
|
||||
if(typeof(editArea.plugins[i].onkeydown)=="function"){
|
||||
if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging
|
||||
if(editArea.isIE)
|
||||
e.keyCode=0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var target_id=(e.target || e.srcElement).id;
|
||||
var use=false;
|
||||
if (EA_keys[e.keyCode])
|
||||
letter=EA_keys[e.keyCode];
|
||||
else
|
||||
letter=String.fromCharCode(e.keyCode);
|
||||
|
||||
var low_letter= letter.toLowerCase();
|
||||
|
||||
if(letter=="Page up" && !AltPressed(e) && !editArea.isOpera){
|
||||
editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)});
|
||||
use=true;
|
||||
}else if(letter=="Page down" && !AltPressed(e) && !editArea.isOpera){
|
||||
editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)});
|
||||
use=true;
|
||||
}else if(editArea.is_editable==false){
|
||||
// do nothing but also do nothing else (allow to navigate with page up and page down)
|
||||
return true;
|
||||
}else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){
|
||||
if(ShiftPressed(e))
|
||||
editArea.execCommand("invert_tab_selection");
|
||||
else
|
||||
editArea.execCommand("tab_selection");
|
||||
|
||||
use=true;
|
||||
if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) ) // opera && firefox mac can't cancel tabulation events...
|
||||
setTimeout("editArea.execCommand('focus');", 1);
|
||||
}else if(letter=="Entrer" && target_id=="textarea"){
|
||||
if(editArea.press_enter())
|
||||
use=true;
|
||||
}else if(letter=="Entrer" && target_id=="area_search"){
|
||||
editArea.execCommand("area_search");
|
||||
use=true;
|
||||
}else if(letter=="Esc"){
|
||||
editArea.execCommand("close_all_inline_popup", e);
|
||||
use=true;
|
||||
}else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){
|
||||
switch(low_letter){
|
||||
case "f":
|
||||
editArea.execCommand("area_search");
|
||||
use=true;
|
||||
break;
|
||||
case "r":
|
||||
editArea.execCommand("area_replace");
|
||||
use=true;
|
||||
break;
|
||||
case "q":
|
||||
editArea.execCommand("close_all_inline_popup", e);
|
||||
use=true;
|
||||
break;
|
||||
case "h":
|
||||
editArea.execCommand("change_highlight");
|
||||
use=true;
|
||||
break;
|
||||
case "g":
|
||||
setTimeout("editArea.execCommand('go_to_line');", 5); // the prompt stop the return false otherwise
|
||||
use=true;
|
||||
break;
|
||||
case "e":
|
||||
editArea.execCommand("show_help");
|
||||
use=true;
|
||||
break;
|
||||
case "z":
|
||||
use=true;
|
||||
editArea.execCommand("undo");
|
||||
break;
|
||||
case "y":
|
||||
use=true;
|
||||
editArea.execCommand("redo");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// check to disable the redo possibility if the textarea content change
|
||||
if(editArea.next.length > 0){
|
||||
setTimeout("editArea.check_redo();", 10);
|
||||
}
|
||||
|
||||
setTimeout("editArea.check_file_changes();", 10);
|
||||
|
||||
|
||||
if(use){
|
||||
// in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action
|
||||
if(editArea.isIE)
|
||||
e.keyCode=0;
|
||||
return false;
|
||||
}
|
||||
//alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e));
|
||||
|
||||
return true;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// return true if Alt key is pressed
|
||||
function AltPressed(e) {
|
||||
if (window.event) {
|
||||
return (window.event.altKey);
|
||||
} else {
|
||||
if(e.modifiers)
|
||||
return (e.altKey || (e.modifiers % 2));
|
||||
else
|
||||
return e.altKey;
|
||||
}
|
||||
};
|
||||
|
||||
// return true if Ctrl key is pressed
|
||||
function CtrlPressed(e) {
|
||||
if (window.event) {
|
||||
return (window.event.ctrlKey);
|
||||
} else {
|
||||
return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));
|
||||
}
|
||||
};
|
||||
|
||||
// return true if Shift key is pressed
|
||||
function ShiftPressed(e) {
|
||||
if (window.event) {
|
||||
return (window.event.shiftKey);
|
||||
} else {
|
||||
return (e.shiftKey || (e.modifiers>3));
|
||||
}
|
||||
};
|
||||
54
applications/admin/static/edit_area/langs/bg.js
Executable file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Bulgarian translation
|
||||
* Author: Valentin Hristov
|
||||
* Company: SOFTKIT Bulgarian
|
||||
* Site: http://www.softkit-bg.com
|
||||
*/
|
||||
editAreaLoader.lang["bg"]={
|
||||
new_document: "нов документ",
|
||||
search_button: "търсене и замяна",
|
||||
search_command: "търси следващия / отвори прозорец с търсачка",
|
||||
search: "търсене",
|
||||
replace: "замяна",
|
||||
replace_command: "замяна / отвори прозорец с търсачка",
|
||||
find_next: "намери следващия",
|
||||
replace_all: "замени всички",
|
||||
reg_exp: "реголярни изрази",
|
||||
match_case: "чуствителен към регистъра",
|
||||
not_found: "няма резултат.",
|
||||
occurrence_replaced: "замяната е осъществена.",
|
||||
search_field_empty: "Полето за търсене е празно",
|
||||
restart_search_at_begin: "До края на документа. Почни с началото.",
|
||||
move_popup: "премести прозореца с търсачката",
|
||||
font_size: "--Размер на шрифта--",
|
||||
go_to_line: "премени към реда",
|
||||
go_to_line_prompt: "премени към номера на реда:",
|
||||
undo: "отмени",
|
||||
redo: "върни",
|
||||
change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)",
|
||||
highlight: "превключване на оцветяване на синтаксиса включена/изключена",
|
||||
reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)",
|
||||
word_wrap: "режим на пренасяне на дълги редове",
|
||||
help: "за програмата",
|
||||
save: "съхрани",
|
||||
load: "зареди",
|
||||
line_abbr: "Стр",
|
||||
char_abbr: "Стлб",
|
||||
position: "Позиция",
|
||||
total: "Всичко",
|
||||
close_popup: "затвори прозореца",
|
||||
shortcuts: "Бързи клавиши",
|
||||
add_tab: "добави табулация в текста",
|
||||
remove_tab: "премахни табулацията в текста",
|
||||
about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове",
|
||||
toggle: "Превключи редактор",
|
||||
accesskey: "Бърз клавиш",
|
||||
tab: "Tab",
|
||||
shift: "Shift",
|
||||
ctrl: "Ctrl",
|
||||
esc: "Esc",
|
||||
processing: "Зареждане...",
|
||||
fullscreen: "на цял екран",
|
||||
syntax_selection: "--Синтаксис--",
|
||||
close_tab: "Затвори файла"
|
||||
};
|
||||
48
applications/admin/static/edit_area/langs/cs.js
Executable file
@@ -0,0 +1,48 @@
|
||||
editAreaLoader.lang["cs"]={
|
||||
new_document: "Nový dokument",
|
||||
search_button: "Najdi a nahraď",
|
||||
search_command: "Hledej další / otevři vyhledávací pole",
|
||||
search: "Hledej",
|
||||
replace: "Nahraď",
|
||||
replace_command: "Nahraď / otevři vyhledávací pole",
|
||||
find_next: "Najdi další",
|
||||
replace_all: "Nahraď vše",
|
||||
reg_exp: "platné výrazy",
|
||||
match_case: "vyhodnocené výrazy",
|
||||
not_found: "nenalezené.",
|
||||
occurrence_replaced: "výskyty nahrazené.",
|
||||
search_field_empty: "Pole vyhledávání je prázdné",
|
||||
restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
|
||||
move_popup: "Přesuň vyhledávací okno",
|
||||
font_size: "--Velikost textu--",
|
||||
go_to_line: "Přejdi na řádek",
|
||||
go_to_line_prompt: "Přejdi na řádek:",
|
||||
undo: "krok zpět",
|
||||
redo: "znovu",
|
||||
change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
|
||||
highlight: "Zvýrazňování syntaxe zap./vyp.",
|
||||
reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
|
||||
word_wrap: "toggle word wrapping mode",
|
||||
help: "O programu",
|
||||
save: "Uložit",
|
||||
load: "Otevřít",
|
||||
line_abbr: "Ř.",
|
||||
char_abbr: "S.",
|
||||
position: "Pozice",
|
||||
total: "Celkem",
|
||||
close_popup: "Zavřít okno",
|
||||
shortcuts: "Zkratky",
|
||||
add_tab: "Přidat tabulování textu",
|
||||
remove_tab: "Odtsranit tabulování textu",
|
||||
about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
|
||||
toggle: "Přepnout editor",
|
||||
accesskey: "Přístupová klávesa",
|
||||
tab: "Záložka",
|
||||
shift: "Shift",
|
||||
ctrl: "Ctrl",
|
||||
esc: "Esc",
|
||||
processing: "Zpracovávám ...",
|
||||
fullscreen: "Celá obrazovka",
|
||||
syntax_selection: "--vyber zvýrazňovač--",
|
||||
close_tab: "Close file"
|
||||
};
|
||||
48
applications/admin/static/edit_area/langs/de.js
Executable file
@@ -0,0 +1,48 @@
|
||||
editAreaLoader.lang["de"]={
|
||||
new_document: "Neues Dokument",
|
||||
search_button: "Suchen und Ersetzen",
|
||||
search_command: "Weitersuchen / öffne Suchfeld",
|
||||
search: "Suchen",
|
||||
replace: "Ersetzen",
|
||||
replace_command: "Ersetzen / öffne Suchfeld",
|
||||
find_next: "Weitersuchen",
|
||||
replace_all: "Ersetze alle Treffer",
|
||||
reg_exp: "reguläre Ausdrücke",
|
||||
match_case: "passt auf den Begriff<br />",
|
||||
not_found: "Nicht gefunden.",
|
||||
occurrence_replaced: "Die Vorkommen wurden ersetzt.",
|
||||
search_field_empty: "Leeres Suchfeld",
|
||||
restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
|
||||
move_popup: "Suchfenster bewegen",
|
||||
font_size: "--Schriftgröße--",
|
||||
go_to_line: "Gehe zu Zeile",
|
||||
go_to_line_prompt: "Gehe zu Zeilennummmer:",
|
||||
undo: "Rückgängig",
|
||||
redo: "Wiederherstellen",
|
||||
change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
|
||||
highlight: "Syntax Highlighting an- und ausschalten",
|
||||
reset_highlight: "Highlighting zurücksetzen (falls mit Text nicht konform)",
|
||||
word_wrap: "Toggle word wrapping mode",
|
||||
help: "Info",
|
||||
save: "Speichern",
|
||||
load: "Öffnen",
|
||||
line_abbr: "Ln",
|
||||
char_abbr: "Ch",
|
||||
position: "Position",
|
||||
total: "Gesamt",
|
||||
close_popup: "Popup schließen",
|
||||
shortcuts: "Shortcuts",
|
||||
add_tab: "Tab zum Text hinzufügen",
|
||||
remove_tab: "Tab aus Text entfernen",
|
||||
about_notice: "Bemerkung: Syntax Highlighting ist nur für kurze Texte",
|
||||
toggle: "Editor an- und ausschalten",
|
||||
accesskey: "Accesskey",
|
||||
tab: "Tab",
|
||||
shift: "Shift",
|
||||
ctrl: "Ctrl",
|
||||
esc: "Esc",
|
||||
processing: "In Bearbeitung...",
|
||||
fullscreen: "Full-Screen",
|
||||
syntax_selection: "--Syntax--",
|
||||
close_tab: "Close file"
|
||||
};
|
||||
48
applications/admin/static/edit_area/langs/dk.js
Executable file
@@ -0,0 +1,48 @@
|
||||
editAreaLoader.lang["dk"]={
|
||||
new_document: "nyt tomt dokument",
|
||||
search_button: "søg og erstat",
|
||||
search_command: "find næste / åben søgefelt",
|
||||
search: "søg",
|
||||
replace: "erstat",
|
||||
replace_command: "erstat / åben søgefelt",
|
||||
find_next: "find næste",
|
||||
replace_all: "erstat alle",
|
||||
reg_exp: "regular expressions",
|
||||
match_case: "forskel på store/små bogstaver<br />",
|
||||
not_found: "not found.",
|
||||
occurrence_replaced: "occurences replaced.",
|
||||
search_field_empty: "Search field empty",
|
||||
restart_search_at_begin: "End of area reached. Restart at begin.",
|
||||
move_popup: "flyt søgepopup",
|
||||
font_size: "--Skriftstørrelse--",
|
||||
go_to_line: "gå til linie",
|
||||
go_to_line_prompt: "gå til linienummer:",
|
||||
undo: "fortryd",
|
||||
redo: "gentag",
|
||||
change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)",
|
||||
highlight: "slå syntax highlight til/fra",
|
||||
reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
|
||||
word_wrap: "toggle word wrapping mode",
|
||||
help: "om",
|
||||
save: "gem",
|
||||
load: "hent",
|
||||
line_abbr: "Ln",
|
||||
char_abbr: "Ch",
|
||||
position: "Position",
|
||||
total: "Total",
|
||||
close_popup: "luk popup",
|
||||
shortcuts: "Genveje",
|
||||
add_tab: "tilføj tabulation til tekst",
|
||||
remove_tab: "fjern tabulation fra tekst",
|
||||
about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster",
|
||||
toggle: "Slå editor til / fra",
|
||||
accesskey: "Accesskey",
|
||||
tab: "Tab",
|
||||
shift: "Skift",
|
||||
ctrl: "Ctrl",
|
||||
esc: "Esc",
|
||||
processing: "Processing...",
|
||||
fullscreen: "fullscreen",
|
||||
syntax_selection: "--Syntax--",
|
||||
close_tab: "Close file"
|
||||
};
|
||||
48
applications/admin/static/edit_area/langs/en.js
Executable file
@@ -0,0 +1,48 @@
|
||||
editAreaLoader.lang["en"]={
|
||||
new_document: "new empty document",
|
||||
search_button: "search and replace",
|
||||
search_command: "search next / open search area",
|
||||
search: "search",
|
||||
replace: "replace",
|
||||
replace_command: "replace / open search area",
|
||||
find_next: "find next",
|
||||
replace_all: "replace all",
|
||||
reg_exp: "regular expressions",
|
||||
match_case: "match case",
|
||||
not_found: "not found.",
|
||||
occurrence_replaced: "occurences replaced.",
|
||||
search_field_empty: "Search field empty",
|
||||
restart_search_at_begin: "End of area reached. Restart at begin.",
|
||||
move_popup: "move search popup",
|
||||
font_size: "--Font size--",
|
||||
go_to_line: "go to line",
|
||||
go_to_line_prompt: "go to line number:",
|
||||
undo: "undo",
|
||||
redo: "redo",
|
||||
change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
|
||||
highlight: "toggle syntax highlight on/off",
|
||||
reset_highlight: "reset highlight (if desyncronized from text)",
|
||||
word_wrap: "toggle word wrapping mode",
|
||||
help: "about",
|
||||
save: "save",
|
||||
load: "load",
|
||||
line_abbr: "Ln",
|
||||
char_abbr: "Ch",
|
||||
position: "Position",
|
||||
total: "Total",
|
||||
close_popup: "close popup",
|
||||
shortcuts: "Shortcuts",
|
||||
add_tab: "add tabulation to text",
|
||||
remove_tab: "remove tabulation to text",
|
||||
about_notice: "Notice: syntax highlight function is only for small text",
|
||||
toggle: "Toggle editor",
|
||||
accesskey: "Accesskey",
|
||||
tab: "Tab",
|
||||
shift: "Shift",
|
||||
ctrl: "Ctrl",
|
||||
esc: "Esc",
|
||||
processing: "Processing...",
|
||||
fullscreen: "fullscreen",
|
||||
syntax_selection: "--Syntax--",
|
||||
close_tab: "Close file"
|
||||
};
|
||||
48
applications/admin/static/edit_area/langs/eo.js
Executable file
@@ -0,0 +1,48 @@
|
||||
editAreaLoader.lang["eo"]={
|
||||
new_document: "nova dokumento (vakigas la enhavon)",
|
||||
search_button: "serĉi / anstataŭigi",
|
||||
search_command: "pluserĉi / malfermi la serĉo-fenestron",
|
||||
search: "serĉi",
|
||||
replace: "anstataŭigi",
|
||||
replace_command: "anstataŭigi / malfermi la serĉo-fenestron",
|
||||
find_next: "serĉi",
|
||||
replace_all: "anstataŭigi ĉion",
|
||||
reg_exp: "regula esprimo",
|
||||
match_case: "respekti la usklecon",
|
||||
not_found: "ne trovita.",
|
||||
occurrence_replaced: "anstataŭigoj plenumitaj.",
|
||||
search_field_empty: "La kampo estas malplena.",
|
||||
restart_search_at_begin: "Fino de teksto ĝisrirata, ĉu daŭrigi el la komenco?",
|
||||
move_popup: "movi la serĉo-fenestron",
|
||||
font_size: "--Tipara grando--",
|
||||
go_to_line: "iri al la linio",
|
||||
go_to_line_prompt: "iri al la linio numero:",
|
||||
undo: "rezigni",
|
||||
redo: "refari",
|
||||
change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da ŝarĝo de la ĉeforgano)",
|
||||
highlight: "ebligi/malebligi la sintaksan kolorigon",
|
||||
reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",
|
||||
word_wrap: "toggle word wrapping mode",
|
||||
help: "pri",
|
||||
save: "registri",
|
||||
load: "ŝarĝi",
|
||||
line_abbr: "Ln",
|
||||
char_abbr: "Sg",
|
||||
position: "Pozicio",
|
||||
total: "Sumo",
|
||||
close_popup: "fermi la ŝprucfenestron",
|
||||
shortcuts: "Fulmoklavo",
|
||||
add_tab: "aldoni tabon en la tekston",
|
||||
remove_tab: "forigi tablon el la teksto",
|
||||
about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",
|
||||
toggle: "baskuligi la redaktilon",
|
||||
accesskey: "Fulmoklavo",
|
||||
tab: "Tab",
|
||||
shift: "Maj",
|
||||
ctrl: "Ktrl",
|
||||
esc: "Esk",
|
||||
processing: "ŝargante...",
|
||||
fullscreen: "plenekrane",
|
||||
syntax_selection: "--Sintakso--",
|
||||
close_tab: "Fermi la dosieron"
|
||||
};
|
||||