The Divvun and Giellatekno teams build language technology aimed at minority and indigenous languages
These, along with necessary version numbers are documented in requirements.txt, however, a subset of these are important for developers to be aware of and work with:
There are of course, other important libraries, but those listed above are the most critical. They are also very easy for developers unfamiliar with them to pick up.
Of secondary interest are the Flask modules:
Create a virtualenv, run it and initialize from requirements.txt
Create a secret key
python -c "import os ; print os.urandom(24)" > secret_key`
Initialize and install the database.
python manage.py init_db
python manage.py install_media -f ../data/sma_media.xml
python manage.py append_lexical_data -f ../data/n_smanob_test.xml
The latter only installs/updates definitions for existing words from the first step, if you want to just install everything, use:
python manage.py install_lexicon -f ../data/n_smanob.xml
python manage.py prepare_json
Extracting is a little tricky. Mind the dot at the end, as we need the current directory too.
pybabel extract -F babel.cfg -o translations/messages.pot ../sma-client/ .
pybabel init -i translations/messages.pot -d translations -l sma
pybabel init -i translations/messages.pot -d translations -l no
pybabel init -i translations/messages.pot -d translations -l sv
etc
pybabel extract -F babel.cfg -o translations/messages.pot ../sma-client/ .
pybabel update -i translations/messages.pot -d translations
pybabel compile -d translations
In order to use the transifex client, you need two things:
src/media-serv/.tx/config
Transifex Documentation: http://support.transifex.com/customer/portal/articles/1000855-configuring-the-client
The short of it is to copy all this, and replace the password. If more is necessary, refer to docs. Token must be left blank.
[https://www.transifex.com]
hostname = https://www.transifex.com
password = yourpasswordgoeshere!
token =
username = aajegebot
Once the virtualenv is enabled properly, this should mean that the transifex command line client is available to use. Typically, all you should need to be concerned with for fetching new translations is:
tx pull
A specific language can be specified also:
tx pull -l sma
tx pull --language sma
After updating translation strings in messages.pot, send them to the server for translators to start working:
tx push --source
If you have made modifications locally to any of the translation files,
you will need to include the --translations
flag.
Further documentation on the command line tool’s various options is here:
http://support.transifex.com/customer/portal/articles/960804-overview
* http://support.transifex.com/customer/portal/topics/440187-transifex-client/articles
* `tx --help`
This is somewhat of a TODO:. There are several managment scripts for various tasks that will need to be unified at some point. Currently: