Monday, February 27, 2012

Re: internationalization makemessage don't work

I've already tried this, django created LC_MESSAGE folder in locale, but this folder is empty (no django.po file is generated :/)

I'm guessing if the problem is not the way i tagged the things to translate ...
I added to all the html files i wanted to translate the tag {% load i18n %} and all the strings i wanted to translate are between {%trans "myStringToTranslate" %}

Is the fact that my /template folder is not in the same path than m apps may be a problem ?


On Mon, Feb 27, 2012 at 10:58 PM, Denis Darii <denis.darii@gmail.com> wrote:
Hi Nicolas.
Try to run makemessages script from the root directory of your Django app, so:

$ cd /your/app/path/
$ mkdir locale
$ django-admin.py makemessages -l en



On Mon, Feb 27, 2012 at 10:54 PM, nicolas HERSOG <n.hersog@gmail.com> wrote:
Yes, I have my app in INSTALLED_APPS and I also have added this key in my settings : 

USE_I18N = True
USE_L10N = True

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'debug_toolbar.middleware.DebugToolbarMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.contrib.messages.context_processors.messages'
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'registration',
    'mySUPERAPP',
    'debug_toolbar',
    'django.contrib.admin',
    'captcha',
)

Did I miss something in MIDDLEWARE_CLASSES for exemple ?

Ty all :)

Nicolas


On Mon, Feb 27, 2012 at 10:45 PM, Ian Clelland <clelland@gmail.com> wrote:
On Mon, Feb 27, 2012 at 1:36 PM, nicolas HERSOG <n.hersog@gmail.com> wrote:
Fun fact, I tried the command manage.py compilemessages, it takes loooooong time to finish and parse all of my workspace in order to create translation file xD.
All my home except my project :| ...


Does your INSTALLED_APPS setting contain the apps that should be translated?


--
Regards,
Ian Clelland
<clelland@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
This e-mail and any file transmitted with it is intended only for the person or entity to which is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment