Want to try amaGama? This will guide you through installing amaGama and its requirements.
amaGama requires the following dependencies:
There are also some dependencies that we strongly recommend to use, but are optional:
Consult the specifics for your operating system in order to get each above package installed successfully.
The use of virtualenvs allows to install all the requirements at specific versions without interfering with system-wide packages. To create a virtualenv just run:
$ mkvirtualenv amagama
There is no package for amaGama, so you will need to run it from a git checkout:
(amagama) $ git clone https://github.com/translate/amagama.git
(amagama) $ cd amagama
Then install the requirements:
(amagama) $ pip install -r requirements/recommended.txt
After installing the amaGama requirements, you can safely start amaGama installation.
amaGama requires a PostgreSQL database to store translations. So create an empty database, for example doing the following:
$ su root
# su postgres
$ createdb -E UTF-8 amagama
Note
You might see an error like:
createdb: database creation failed: ERROR: new encoding (UTF8) is
incompatible with the encoding of the template database (SQL_ASCII)
This could happen because the database was installed in the “C” locale. This might be fixed by doing the following:
$ createdb -E UTF-8 -T template0 amagama
The next step is to adjust amaGama settings to include the right database connection configuration, and perhaps change any other setting. Check the amaGama settings documentation in order to know how to do it.
Note
One simple change that you should most likely make on a toy installation is to set:
DB_HOST = "localhost"
This is a side effect of how Postgres is installed on Ubuntu and other systems.
Since amaGama is not installed we need to make accessible its commands:
$ export PATH=$(pwd)/bin:$PATH
$ export PYTHONPATH=$(pwd):$PYTHONPATH
The first step after editing the settings is to prepare database tables for each source language you will use (you can add more languages later):
$ amagama-manage initdb -s en -s fr
Now that you have managed to install amaGama you will probably want to know how to: