Makemessages for an application installed in virtualenv

I installed the Django application for my virtualenv, and I would like to add additional translations to this application.

Can I import messages from an application installed in virtualenv into my django.po in my project folder locale/pt/LC_MESSAGES ?

Alternatively, should I translate a third-party application? If so, how can I use makemessages to generate messages in an application installed in virtualenv?

+6
source share
2 answers

In my project directory, I create a (temporary) symbolic link to the application in my virtual directory, and then run the makemessages command, for example:

../manage.py makemessages -l nl --symlinks

After creating the * .po files, I delete the symlink.

+4
source

You should probably add translations to a third-party application if they are common enough to be reused by other users.

You will need to install the fork of a third-party application repository with something like this (assuming git and GitHub):

 pip install -e git://github.com/{{ username }}/{{ reponame }}.git 

Commit and push your changes, then submit the transfer request to the source repository.

0
source

Source: https://habr.com/ru/post/950198/


All Articles