Re: internationalization makemessage don't work

2012-02-28 Thread nicolas HERSOG
Hi everyone,

Thanks to you i found the problem. My template folder was conf via my
settings.py outsite my project folder.
So when i typed python manage.py makemessage -l  django didn't
parse my settings py in order to find the templates.
Now everything is ok

Thx to you :)
Nicolas

On Tue, Feb 28, 2012 at 12:03 AM, Diego Schulz  wrote:

> On Mon, Feb 27, 2012 at 7:19 PM, Denis Darii 
> wrote:
> > Of course, from the django
> > documentation(
> https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files
> ):
> >>
> >> The script should be run from one of two places:
> >>
> >> The root directory of your Django project.
> >> The root directory of your Django app.
> >>
> >> The script runs over your project source tree or your application source
> >> tree and pulls out all strings marked for translation.
> >
> >
> > So "The script runs over your project source tree or your application
> source
> > tree"...
> >
> >
> > On Mon, Feb 27, 2012 at 11:03 PM, nicolas HERSOG 
> wrote:
> >>
> >> 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 
> >> 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 
> >>> 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',
>  )
>
> I'm not completely sure about this, but I think you should try adding
> 'django.middleware.locale.LocaleMiddleware' to your MIDDLEWARE_CLASSES.
> You should pay attention to the order, though.
> LocaleMiddleware should be put after SessionMiddleware and before
> CommonMiddleware.
>
> Here's a snippet from a working example:
>
> MIDDLEWARE_CLASSES = (
>'django.contrib.sessions.middleware.SessionMiddleware',
>'django.middleware.locale.LocaleMiddleware',
>'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
>'django.contrib.auth.middleware.AuthenticationMiddleware',
>'django.contrib.messages.middleware.MessageMiddleware',
> # Uncomment the next line for simple clickjacking protection:
># 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
>
> diego
>
> --
> 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread Diego Schulz
On Mon, Feb 27, 2012 at 7:19 PM, Denis Darii  wrote:
> Of course, from the django
> documentation(https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files):
>>
>> The script should be run from one of two places:
>>
>> The root directory of your Django project.
>> The root directory of your Django app.
>>
>> The script runs over your project source tree or your application source
>> tree and pulls out all strings marked for translation.
>
>
> So "The script runs over your project source tree or your application source
> tree"...
>
>
> On Mon, Feb 27, 2012 at 11:03 PM, nicolas HERSOG  wrote:
>>
>> 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 
>> 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 
>>> 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',
 )

I'm not completely sure about this, but I think you should try adding
'django.middleware.locale.LocaleMiddleware' to your MIDDLEWARE_CLASSES.
You should pay attention to the order, though.
LocaleMiddleware should be put after SessionMiddleware and before
CommonMiddleware.

Here's a snippet from a working example:

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)


diego

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread Denis Darii
Of course, from the django documentation(
https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files
):

> The script should be run from one of two places:
>
>- The root directory of your Django project.
>- The root directory of your Django app.
>
> The script runs over your project source tree or your application source
> tree and pulls out all strings marked for translation.
>

So "The script runs over your project source tree or your application
source tree"...

On Mon, Feb 27, 2012 at 11:03 PM, nicolas HERSOG  wrote:

> 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 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 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 wrote:
>>>
 On Mon, Feb 27, 2012 at 1:36 PM, nicolas HERSOG wrote:

> Fun fact, I tried the command manage.py compilemessages, it takes
> loong 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
 

 --
 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this 

Re: internationalization makemessage don't work

2012-02-27 Thread nicolas HERSOG
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  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 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 wrote:
>>
>>> On Mon, Feb 27, 2012 at 1:36 PM, nicolas HERSOG wrote:
>>>
 Fun fact, I tried the command manage.py compilemessages, it takes
 loong 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
>>> 
>>>
>>> --
>>> 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+unsubscr...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread Denis Darii
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  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  wrote:
>
>> On Mon, Feb 27, 2012 at 1:36 PM, nicolas HERSOG wrote:
>>
>>> Fun fact, I tried the command manage.py compilemessages, it takes
>>> loong 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
>> 
>>
>> --
>> 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread nicolas HERSOG
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  wrote:

> On Mon, Feb 27, 2012 at 1:36 PM, nicolas HERSOG wrote:
>
>> Fun fact, I tried the command manage.py compilemessages, it takes
>> loong 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
> 
>
> --
> 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread Ian Clelland
On Mon, Feb 27, 2012 at 1:36 PM, nicolas HERSOG  wrote:

> Fun fact, I tried the command manage.py compilemessages, it takes
> loong 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


-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread nicolas HERSOG
Hi Diego, and thanks for your help :)

I've already created a /conf/locale folder at my root project.
Whenever i typed python manage.py makemessage -l  django add to
/conf/locale a new folder /LC_MESSAGE which contains a django.po
file.
When i vim this file I just notice translation key about
django-debug-toolbar.

I added the LOCALE_PATHS key in my settings.py but it didn't solve my
problem.

Fun fact, I tried the command manage.py compilemessages, it takes loong
time to finish and parse all of my workspace in order to create translation
file xD.
All my home except my project :| ...

Nicolas


On Mon, Feb 27, 2012 at 10:14 PM, Diego Schulz  wrote:

> On Mon, Feb 27, 2012 at 5:45 AM, nicolas HERSOG 
> wrote:
> > Hi everyone,
> > Very thanks for yours answers!
> >
> > I added to the top of all my html files {% load i18n %} and typed in my
> root
> > directory :
> >
> > django-admin.py makemessages -l en
> >
> > Or :
> >
> > python manage.py makemessages -l en
> >
> > I tried both commands, first in my root directory and in my app but none
> of
> > this command work :/
> >
> > Any more tips or advices ?
> >
> > Very  thanks for your help :)
> >
> > Nicolas
> >
> >
> > On Mon, Feb 27, 2012 at 8:24 AM, Ian Clelland 
> wrote:
> >>
> >>
> >>
> >> On Sunday, February 26, 2012, nicolas HERSOG wrote:
> >>>
> >>> Hi folks !
> >>>
> >>> I'm trying for hours to internationalize my django website.
> >>>
> >>> I added to my settings.py this few lines :
> >>>
> >>> TIME_ZONE = 'Europe/Paris'
> >>> LANGUAGE_CODE = 'fr-FR'
> >>>
> >>> I added to all templates i want to translate the tag trans for the
> >>> sentence I want to  internationalize exemple :
> >>>
> >>> {% trans "article écrit :"%}
> >>> {% trans "Nom :"%}
> >>>
> >>> And then at my root project i run django-admin.py makemessages -l en
> >>
> >>
> >> Why are you running django-admin.py, rather than manage.py? manage.py
> >> knows how to fund your settings files, and import all of your apps and
> check
> >> all of your template dirs.
> >>
> >> Try first running "manage.py makemessages -l fr" (since I suspect that
> >> your site is already in French, you won't have to actually do anything
> with
> >> that po file right now, but it's good to have)
> >>
> >> Ian
> >>
> >>>
> >>> This command created a django.po file which contains the translations
> key
> >>> for django debug tool bar, but none key of my webapp.
> >>>
> >>> Did I do something wrong, or miss something ?
> >>>
>
> Do you already have a conf/locale/ directory in your project directory
> where .mo and .po files
> are located in their own directory? Example:
>
> conf/locale/en/LC_MESSAGES/django.mo
> conf/locale/en/LC_MESSAGES/django.po
> conf/locale/en-us/LC_MESSAGES/django.mo
> conf/locale/en-us/LC_MESSAGES/django.po
> conf/locale/es/LC_MESSAGES/django.mo
> conf/locale/es/LC_MESSAGES/django.po
> conf/locale/es-py/LC_MESSAGES/django.mo
> conf/locale/es-py/LC_MESSAGES/django.po
> ...
>
> Can you run manage.py makemessages and manage.py compilemessages
> without getting errors?
>
> Did you set the LOCALE_PATHS variable in the settings.py file?
>
> #SNIP
> LOCALE_PATHS = (
>   '/somewhere/in/your/filesystem/YourProject/conf/locale',
> )
> #
>
>
> diego
>
> >>> Thank you :)
> >>>
> >>> Nicolas
>
> --
> 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread Diego Schulz
On Mon, Feb 27, 2012 at 5:45 AM, nicolas HERSOG  wrote:
> Hi everyone,
> Very thanks for yours answers!
>
> I added to the top of all my html files {% load i18n %} and typed in my root
> directory :
>
> django-admin.py makemessages -l en
>
> Or :
>
> python manage.py makemessages -l en
>
> I tried both commands, first in my root directory and in my app but none of
> this command work :/
>
> Any more tips or advices ?
>
> Very  thanks for your help :)
>
> Nicolas
>
>
> On Mon, Feb 27, 2012 at 8:24 AM, Ian Clelland  wrote:
>>
>>
>>
>> On Sunday, February 26, 2012, nicolas HERSOG wrote:
>>>
>>> Hi folks !
>>>
>>> I'm trying for hours to internationalize my django website.
>>>
>>> I added to my settings.py this few lines :
>>>
>>> TIME_ZONE = 'Europe/Paris'
>>> LANGUAGE_CODE = 'fr-FR'
>>>
>>> I added to all templates i want to translate the tag trans for the
>>> sentence I want to  internationalize exemple :
>>>
>>> {% trans "article écrit :"%}
>>> {% trans "Nom :"%}
>>>
>>> And then at my root project i run django-admin.py makemessages -l en
>>
>>
>> Why are you running django-admin.py, rather than manage.py? manage.py
>> knows how to fund your settings files, and import all of your apps and check
>> all of your template dirs.
>>
>> Try first running "manage.py makemessages -l fr" (since I suspect that
>> your site is already in French, you won't have to actually do anything with
>> that po file right now, but it's good to have)
>>
>> Ian
>>
>>>
>>> This command created a django.po file which contains the translations key
>>> for django debug tool bar, but none key of my webapp.
>>>
>>> Did I do something wrong, or miss something ?
>>>

Do you already have a conf/locale/ directory in your project directory
where .mo and .po files
are located in their own directory? Example:

conf/locale/en/LC_MESSAGES/django.mo
conf/locale/en/LC_MESSAGES/django.po
conf/locale/en-us/LC_MESSAGES/django.mo
conf/locale/en-us/LC_MESSAGES/django.po
conf/locale/es/LC_MESSAGES/django.mo
conf/locale/es/LC_MESSAGES/django.po
conf/locale/es-py/LC_MESSAGES/django.mo
conf/locale/es-py/LC_MESSAGES/django.po
...

Can you run manage.py makemessages and manage.py compilemessages
without getting errors?

Did you set the LOCALE_PATHS variable in the settings.py file?

#SNIP
LOCALE_PATHS = (
   '/somewhere/in/your/filesystem/YourProject/conf/locale',
)
#


diego

>>> Thank you :)
>>>
>>> Nicolas

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-27 Thread nicolas HERSOG
Hi everyone,
Very thanks for yours answers!

I added to the top of all my html files {% load i18n %} and typed in my
root directory :

   -
   - django-admin.py makemessages -l en

Or :

   - python manage.py makemessages -l en

I tried both commands, first in my root directory and in my app but none of
this command work :/

Any more tips or advices ?

Very  thanks for your help :)

Nicolas

On Mon, Feb 27, 2012 at 8:24 AM, Ian Clelland  wrote:

>
>
> On Sunday, February 26, 2012, nicolas HERSOG wrote:
>
>> Hi folks !
>>
>> I'm trying for hours to internationalize my django website.
>>
>> I added to my settings.py this few lines :
>>
>> TIME_ZONE = 'Europe/Paris'
>> LANGUAGE_CODE = 'fr-FR'
>>
>> I added to all templates i want to translate the tag trans for the
>> sentence I want to  internationalize exemple :
>>
>> {% trans "article écrit :"%}
>> {% trans "Nom :"%}
>>
>> And then at my root project i run django-admin.py makemessages -l en
>
>
> Why are you running django-admin.py, rather than manage.py? manage.py
> knows how to fund your settings files, and import all of your apps and
> check all of your template dirs.
>
> Try first running "manage.py makemessages -l fr" (since I suspect that
> your site is already in French, you won't have to actually do anything with
> that po file right now, but it's good to have)
>
> Ian
>
>
>> This command created a django.po file which contains the translations key
>> for django debug tool bar, but none key of my webapp.
>>
>> Did I do something wrong, or miss something ?
>>
>> Thank you :)
>>
>> Nicolas
>>
>>
>>
>>  --
>> 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+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
> --
> Regards,
> Ian Clelland
> 
>
>  --
> 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-26 Thread Ian Clelland
On Sunday, February 26, 2012, nicolas HERSOG wrote:

> Hi folks !
>
> I'm trying for hours to internationalize my django website.
>
> I added to my settings.py this few lines :
>
> TIME_ZONE = 'Europe/Paris'
> LANGUAGE_CODE = 'fr-FR'
>
> I added to all templates i want to translate the tag trans for the
> sentence I want to  internationalize exemple :
>
> {% trans "article écrit :"%}
> {% trans "Nom :"%}
>
> And then at my root project i run django-admin.py makemessages -l en


Why are you running django-admin.py, rather than manage.py? manage.py knows
how to fund your settings files, and import all of your apps and check all
of your template dirs.

Try first running "manage.py makemessages -l fr" (since I suspect that your
site is already in French, you won't have to actually do anything with that
po file right now, but it's good to have)

Ian


> This command created a django.po file which contains the translations key
> for django debug tool bar, but none key of my webapp.
>
> Did I do something wrong, or miss something ?
>
> Thank you :)
>
> Nicolas
>
>
>
>  --
> 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 'django-users@googlegroups.com');>
> .
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com  'django-users%2bunsubscr...@googlegroups.com');>.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>


-- 
Regards,
Ian Clelland


-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: internationalization makemessage don't work

2012-02-26 Thread Diego Schulz
On Sun, Feb 26, 2012 at 2:22 PM, nicolas HERSOG  wrote:
> Hi folks !
>
> I'm trying for hours to internationalize my django website.
>
> I added to my settings.py this few lines :
>
> TIME_ZONE = 'Europe/Paris'
> LANGUAGE_CODE = 'fr-FR'
>
> I added to all templates i want to translate the tag trans for the sentence
> I want to  internationalize exemple :
>
> {% trans "article écrit :"%}
> {% trans "Nom :"%}
>
> And then at my root project i run django-admin.py makemessages -l en
>
> This command created a django.po file which contains the translations key
> for django debug tool bar, but none key of my webapp.
>
> Did I do something wrong, or miss something ?
>

{% load i18n %}

at the top of your template file?



> Thank you :)
>
> Nicolas
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.