Translations for the texts in the interface are provided in a set of
ped/LANG_oahpa/locale/fi/LC_MESSAGES/django.po ped/LANG_oahpa/locale/sme/LC_MESSAGES/django.po ped/LANG_oahpa/locale/no/LC_MESSAGES/django.po ped/LANG_oahpa/locale/en/LC_MESSAGES/django.po
The English file is needed for the names and strings that contain
Whenever the texts in the page are updated, the translations need to be checked and updated as well.
cd ped/oahpa python manage.py makemessages -a svn ci -m "new generated files" locale/fi/LC_MESSAGES/django.po ... etc. for the other files.
If the Oahpa installation uses virtualenv you might need to specify that
(Note: For this to work, your manage.py and your django installation
After that, work on the respective django.po files, and check them
After fixing the files update the official directory and compile the messages.
cd ped/oahpa/ svn up python manage.py compilemessages --ignore=env/*
If you are not allowed to compile the messages (the machine requires
rm -f locale/*/LC_MESSAGES/django.mo
Thereafter, repeate the compile message.
After the messages have been compiled, restart the server (exchange univ_oahpa with smaoahpa, kom_oahpa, etc):
sudo service univ_oahpa restart
This is an alias, to be written anywhere, for the command
Django has two locations for localisations, one is the "global" level, which contains
Creating a new localisation
Locate the site-packages directory for the version of python in use. The easiest way to locate
./manage.py shell >>> import django >>> django <module 'django' from '/usr/lib/python2.6/site-packages/django/__init__.pyc'>
In the directory that is returned, navigate to the locale directory
Then copy one of the existing folders to a new folder with the language code for the localisation.
cp -R nn sma
The project's settings.py file must be modified to include the localisation language, so that administrative
LANGUAGES = ( ('sma', 'South Sami'), ('no', 'Norwegian'), ('sv', 'Swedish'), ('en', 'English'), )
After completing these steps, it will be possible to work with and see local project-level localisation strings in