Skip to content

Commit

Permalink
Add a central location for translation files
Browse files Browse the repository at this point in the history
  • Loading branch information
mjumbewu committed Aug 1, 2016
1 parent b08367c commit dfa7956
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions doc/CONFIG.md
Expand Up @@ -331,10 +331,10 @@ would like to be translatable with `{{#_}}` and `{{/_}}`. For example:

<h2>{{#_}}About{{/_}}</h2>

To generate a translation template, run the following from your flavor
To generate a translation template, run the following from the *src*
directory:

<project_src_root>/manage.py flavormessages --locale en_US
./manage.py flavormessages --locale en

Do this for each language you want your map to be available in. For the
locale, use a locale name as specified in Django's documentation:
Expand All @@ -343,9 +343,9 @@ https://docs.djangoproject.com/en/dev/topics/i18n/#term-locale-name
Once your messages files are generated, fill in any translations that should
be made. If you leave a translation blank, the original string will be used.

To apply your translations, run the following from your flavor directory:
To apply your translations, run the following from your *src* directory:

<project_src_root>/manage.py compilemessages
./manage.py compilemessages

That's it! The compilemessages task is run automatically for the DotCloud
deployments. For Heroku, you'll have to check the resulting *.mo* files in to
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions src/project/settings.py
Expand Up @@ -2,7 +2,7 @@
import datetime
import os.path

HERE = os.path.abspath(os.path.join(os.path.dirname(__file__)))
HERE = os.path.dirname(__file__)

DEBUG = True
TEMPLATE_DEBUG = DEBUG
Expand Down Expand Up @@ -371,6 +371,7 @@
# Help Django find any translation files.

LOCALE_PATHS = (
os.path.join(HERE, '..', 'conf', 'locale'),
os.path.join(HERE, '..', 'sa_web', 'locale'),
os.path.join(HERE, '..', 'flavors', flavor, 'locale'),
)
Expand Down Expand Up @@ -436,5 +437,3 @@
#

CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend'


0 comments on commit dfa7956

Please sign in to comment.