Commit 3966c998 authored by Michal Čihař's avatar Michal Čihař

Merge remote-tracking branch 'origin/master'

parents 606f38c5 258210e0
.gitignore export-ignore
.gitattributes export-ignore
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
repos/ repos/
*.mo *.mo
whoosh-index/ whoosh-index/
weblate-*.tar.*
...@@ -24,6 +24,8 @@ toolkit, for example: ...@@ -24,6 +24,8 @@ toolkit, for example:
.. seealso:: http://translate.sourceforge.net/wiki/toolkit/formats .. seealso:: http://translate.sourceforge.net/wiki/toolkit/formats
.. _project:
Project Project
------- -------
...@@ -36,6 +38,8 @@ project. ...@@ -36,6 +38,8 @@ project.
The project has only few attributes giving translators information about The project has only few attributes giving translators information about
project. project.
.. _subproject:
Subproject Subproject
---------- ----------
......
.. _config:
Configuration Configuration
------------- -------------
......
...@@ -13,6 +13,7 @@ Contents: ...@@ -13,6 +13,7 @@ Contents:
about about
usage usage
quick
install install
config config
admin admin
......
.. _install:
Installation instructions Installation instructions
========================= =========================
.. _requirements:
Requirements Requirements
------------ ------------
...@@ -29,6 +33,8 @@ default site name to match your domain. ...@@ -29,6 +33,8 @@ default site name to match your domain.
.. seealso:: :ref:`privileges` .. seealso:: :ref:`privileges`
.. _server:
Running server Running server
-------------- --------------
...@@ -81,6 +87,33 @@ The configuration for Lighttpd web server might look like following:: ...@@ -81,6 +87,33 @@ The configuration for Lighttpd web server might look like following::
"/favicon.ico" => "access 1 months", "/favicon.ico" => "access 1 months",
) )
Sample configuration for Apache
+++++++++++++++++++++++++++++++
Following configuration runs Weblate as WSGI, you need to have enable
mod_wsgi:
.. literalinclude:: ../scripts/apache.conf
.. _appliance:
Prebuilt appliance
------------------
Prebuilt appliance provides preconfigured Weblate running with MySQL database
as backend and Apache as webserver. However it comes with standard set of
passwords you will want to change:
======== ======== ======= ==================================================
Username Password Scope Description
======== ======== ======= ==================================================
root linux System Administrator account, use for local or SSH login
root MySQL MySQL administrator
weblate weblate MySQL Account in MySQL database for storing Weblate data
admin admin Weblate Weblate/Django admin user
======== ======== ======= ==================================================
The appliance is built using SUSE Studio and is based on openSUSE 12.1.
Upgrading Upgrading
--------- ---------
......
Quick starting guide
====================
.. note::
This is just a quick guide for installing and starting to use Weblate,
please check :ref:`install` for more detailed instructions.
Installing from sources
-----------------------
#. Install all required dependencies, see :ref:`requirements`.
#. Grab Weblate sources (either using Git or download a tarball) and unpack
them.
#. Edit :file:`settings.py` to match your setup. You will at least need to
configure database connection (possibly adding user and creating the
database). Check :ref:`config` for Weblate specific configuration options.
#. Build Django tables and initial data:
.. code-block:: sh
./manage.py syncdb
./manage.py setuplang
./manage.py setupgroups
./manage.py compilemessages # If you are using Git checkout
#. Configure webserver to serve Weblate, see :ref:`server`.
Using prebuilt appliance
------------------------
#. Download the appliance and start it. You need to choose format depending on
your target environment.
#. Everything should be set up immediatelly after boot, though you will want
to adjust some settings to improve security, see :ref:`appliance`.
Adding translation
------------------
#. Open admin interface (http://example.org/admin/) and create project you
want to translate. See :ref:`project` for more details.
#. Create subproject which is the real resource for translating - it points to
Git repository and selects which files to translate. See :ref:`subproject`
for more details.
#. Once above is completed (it can be lengthy process depending on size of
your Git repository and number of messages to translate), you can start
translating.
This diff is collapsed.
#
# VirtualHost for weblate
#
<VirtualHost *:80>
ServerAdmin admin@image.weblate.org
ServerName image.weblate.org
DocumentRoot /usr/share/weblate/media/
Alias /robots.txt /usr/share/weblate/media/robots.txt
Alias /favicon.ico /usr/share/weblate/media/favicon.ico
Alias /media/ /usr/share/weblate/media/
Alias /doc/ /usr/share/doc/packages/weblate/html/
Alias /static/admin /usr/share/python2.7/site-packages/django/contrib/admin/static/admin/
<Directory /usr/lib/python2.7/site-packages/django/contrib/admin/static/admin/>
Order deny,allow
Allow from all
</Directory>
<Directory /usr/share/weblate/media/>
Order deny,allow
Allow from all
</Directory>
<Directory /usr/share/doc/packages/weblate/html/>
Order deny,allow
Allow from all
</Directory>
<Directory /usr/share/weblate/scripts/>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /usr/share/weblate/scripts/django.wsgi
WSGIPassAuthorization On
</VirtualHost>
#!/bin/sh #!/bin/sh
set -e
if [ "x$1" = "x--help" -o "x$1" = "x-h" ] ; then if [ "x$1" = "x--help" -o "x$1" = "x-h" ] ; then
echo "Usage: ./scripts/create-release [--tag|TREE-ISH]" echo "Usage: ./scripts/create-release [--tag|TREE-ISH]"
exit 1 exit 1
fi fi
# Grab version
version=`python -c 'import trans; print trans.VERSION'` version=`python -c 'import trans; print trans.VERSION'`
namever=weblate-$version
# What are we going to build?
if [ -z "$1" ] ; then if [ -z "$1" ] ; then
rev=HEAD rev=HEAD
else else
if [ "x$1" = "x--tag" ] ; then if [ "x$1" = "x--tag" ] ; then
rev=weblate-$version rev=$namever
git tag -s $rev -m "Version $VERSION" git tag -s $rev -m "Version $VERSION"
else else
rev=$1 rev=$1
fi fi
fi fi
git archive --format=tar --prefix=weblate-$version/ $rev | xz > weblate-$version.tar.xz # Configure build dir
build_dir=build/weblate
mkdir -p $build_dir
# Export files
git archive --format=tar $rev | tar xf - -C $build_dir
cd $build_dir
# Compile po files
./manage.py compilemessages
# Cleanup possible byte compiled files (from above step)
find . -name '*.py[co]' -delete
cd ..
# Correct name of directory
mv weblate $namever
# Build tarballs
tar cf $namever.tar $namever
gzip < $namever.tar > ../$namever.tar.gz
bzip2 < $namever.tar > ../$namever.tar.bz2
xz < $namever.tar > ../$namever.tar.xz
# Remove build directory
cd ..
rm -rf build
#!/usr/bin/python
import os
import sys
sys.path.append('weblate-path')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment