Re: i18N with templates in separate directory

2008-09-10 Thread timc3

Never really looked in manage.py but I did after my question, I see it
just hooks in to django and doesn't really do much itself - so it
doesn't need upgrading.

I got fed up of trying to get this to work so I moved my templates
directory so I have the following structure.

code/
-mysite/
--mysitetemplates/
--mysiteapp1/
--mysiteapp2/
--locale/
--settings.py
--manage.py
-mysitestaticmedia/

I can't say that I like doing it like this, it doesn't seem as clean,
but I get the correct django.po file.

If you have the same problem I suggest you move your template
directory.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18N with templates in separate directory

2008-09-09 Thread timc3

 > Shouldn't you run it from the mysite/ directory? Even further, now
that I think
> about it, you should can simplify things by simply manually
> creating the mysite/locale directory  and then doing
>
> mysite $ python manage.py makemesages -l se
>
> (just tested it and it works)

It works for me, but it doesn't use the templates. It just creates for
all the views, none of my templates have been seen.

> (manage.py is functionally equivalent to django-admin.py but
> it knows it should use the settings.py file located in the
> same directory).

Shouldn't it pick up the fact that I have configured:

LOCALE_PATHS = (
'/Volumes/Development/code/mysitetemplates',
)

> > And the django.po file has longer paths to everything.
>
> The paths in the PO file comments have no effect.
>

Ok I didn't know that.

Do I have to upgrade manage.py?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18N with templates in separate directory

2008-09-08 Thread Ramiro Morales

On Mon, Sep 8, 2008 at 12:53 PM, timc3 <[EMAIL PROTECTED]> wrote:
>
>> I'd say that for being able to scan you project's locale/ subdir
>> (althouth this isn´t obvious from the docs) and the dirs listed in
>> LOCALE_PATHS you need specify the Python module path of
>> your settings file with the --settings command line switch
>> as explained in:
>>
>> http://docs.djangoproject.com/en/dev/topics/i18n/#using-translations-...
>>
>> You might also want to take a look at
>>
>> http://docs.djangoproject.com/en/dev/topics/i18n/#message-files
>>
>> (Yes, we need to refactor and enhance that document.)
>>
>
> When I run it from the directory above and putting in --
> settings=mysite/settings I get the django.po file created, but two
> problems (perhaps). The locale directory is on the same level as the
> template and site directory:
>
> code/
> -mysite/
> --mysiteapp1/
> --mysiteapp2/
> --settings.py
> --manage.py
> -mysitetemplates/
> -mysitestaticmedia/
> -locale/

Shouldn't you run it from the mysite/ directory? Even further, now that I think
about it, you should can simplify things by simply manually
creating the mysite/locale directory  and then doing

mysite $ python manage.py makemesages -l se

(just tested it and it works)

(manage.py is functionally equivalent to django-admin.py but
it knows it should use the settings.py file located in the
same directory).

>
> And the django.po file has longer paths to everything.

The paths in the PO file comments have no effect.

HTH,

-- 
 Ramiro Morales

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18N with templates in separate directory

2008-09-08 Thread timc3

> I'd say that for being able to scan you project's locale/ subdir
> (althouth this isn´t obvious from the docs) and the dirs listed in
> LOCALE_PATHS you need specify the Python module path of
> your settings file with the --settings command line switch
> as explained in:
>
> http://docs.djangoproject.com/en/dev/topics/i18n/#using-translations-...
>
> You might also want to take a look at
>
> http://docs.djangoproject.com/en/dev/topics/i18n/#message-files
>
> (Yes, we need to refactor and enhance that document.)
>

When I run it from the directory above and putting in --
settings=mysite/settings I get the django.po file created, but two
problems (perhaps). The locale directory is on the same level as the
template and site directory:

code/
-mysite/
--mysiteapp1/
--mysiteapp2/
--settings.py
--manage.py
-mysitetemplates/
-mysitestaticmedia/
-locale/

And the django.po file has longer paths to everything. Is this
intended and correct behaviour?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---