Setup transifex in virtualenv


What is Transifex?

Transifex is an open source platform for localization. It is a service offering users with an easy-to-use interface to submit translations to various projects hosted on a number of hosting platform types.

What is virtualenv?

virtualenv is a tool to build isolated Python environments. It’s a great way to quickly test new libraries without cluttering your global site-packages or run multiple projects on the same machine which depend on a particular library but not the same version of the library.

How to install virtualenv?

You can install the virtualenv by running
easy_install virtualenv
or
pip install virtualenv


You can install easy_install using:
pip install setuptools

How to activate virtualenv?

Once you have successfully installed virtualenv, you can use it to create virtual environments by running:
virtualenv --no-site-packages site


Activate the virtualenv using:
source site/bin/activate
or
. site/bin/activate

How to install Transifex?

Now create a fork of Transifex from bitbucket, clone the repository and install
cd site
hg clone https://bitbucket.org/indifex/transifex
cd transifex

python setup.py develop

But the latest tip requires Django==1.3.1,so to upgrade django use:
pip install Django --upgrade

To install the other modules(if required) in virtualenv using:
pip install <module name>

To install the userprofile module from the http://transifex.org/files/deps/ use:
pip install http://trac.transifex.org/files/deps/userprofile-0.6.tar.gz

To install the django-piston, for creating application programming interface(APIs) use:
easy_install django-piston
or
easy_install http://trac.transifex.org/files/deps/django-piston-0.2.3-devel-r278.tar.gz

How to configure Transifex?

Now to install the server use:
cd transifex
./manage.py txcreatedirs                       #Create necessary directories
./manage.py syncdb                                     # Setup DB tables, create superuser
./manage.py migrate                                   # Setup more DB tables

While running ./mange.py migrate, it raised a resources migration error, for that I removed the respective the resource migration file from resources/migrations to succeed migration.

./manage.py txlanguages                          # Create a standard set of languages
./manage.py txcreatenoticetypes       # Create a standard set of notice types
./manage.py collectstatic                     #Copy all the addons files to the static dir
./manage.py runserver 8000                   #Start the development server

Now that the server‘s running, visit http://127.0.0.1:8000/ with your Web browser.

References

http://help.transifex.net/
http://www.arthurkoziel.com/2008/10/22/working-virtualenv/

Advertisements
9 comments
  1. I appreciate, cause I found just what I was looking for. You’ve ended my 4 day long hunt! God Bless you man. Have a great day. Bye

  2. Greeting there administrator, I truly required to actually give a quick mention to point out that in fact I loved your particular post. Thanks!

  3. Simply desire to say your article is as amazing. The clearness to your put up is just great and that i could think you are a professional in this subject. Well with your permission let me to clutch your feed to keep updated with forthcoming post. Thank you a million and please keep up the rewarding work.

  4. Bernard said:

    Very neat article.Much thanks again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: