Re: Problem with translations

2013-09-05 Thread Doug
Follow-up: just for good measure could you tell me what you have in your 
settings for `LANGUAGE_CODE` and what languages you are trying to support? 
 If by some small chance you are trying to support a language not apart of this 
set , an 
issue could occur with threading.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problem with translations

2013-09-05 Thread Doug
I've found some other people with the same 
issue. 
 Looking at the 
source,
 
the issue is directly related to IOError, so your assumption sounds 
correct, django can not access nor read the files.  I don't believe this is 
a django specific issue but server config issue.

I hope this helps.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problem with translations

2013-08-26 Thread Andreas Kuhne
Has nobody heard of this issue before? It is rather disturbing and means
that our site crashes from time to time for some users.

Regards,

Andréas

2013/8/21 Andreas Kuhne 

> Hi,
>
> I am working on a website that is available in 10 different languages, and
> we have the translations working. If you want to see our website in french,
> you just add /fr to our url and it works fine.
>
> However we are getting a lot of :
>
>   File "middleware.py", line 83, in process_request
> translation.activate(request.locale_dict['language'])
>
>   File "env/lib/python2.6/site-packages/django/utils/translation/__init__.py",
> line 90, in activate
> return _trans.activate(language)
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py",
> line 183, in activate
> _active.value = translation(language)
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py",
> line 173, in translation
> current_translation = _fetch(language, fallback=default_translation)
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py",
> line 141, in _fetch
> res._info = res._info.copy()
>
> AttributeError: 'NoneType' object has no attribute '_info'
>
> These errors mostly occur when the user requests an ajax enabled update.
> As far as I can tell this error is related to the fact that django
> tranlsations can't open the .mo files for the specific locale. What I don't
> understand is that this happens maybe once every 2 days, so it doesn't
> happen all the time.
>
> The only resources I have found on the subject are regarding to completely
> missing .mo translation files (which is not the case here). I am leaning
> towards an issue with apache not being able to open the file, because of
> restrictions on the number of open files allowed, but I'm not sure. Has
> anyone any ideas on how to correct this issue? I should also say that it
> has never happened on our development machines.
>
> Regards,
>
> Andréas
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problem with translations

2013-08-21 Thread Andreas Kuhne
We are running nginx for static files and apache + mod_wsgi for the django
website.

Regards,

Andréas

2013/8/21 Mauro Rocco 

> Hi,
> That's strange.
> To me looks like the server from time to time can not access this files as
> you said.
> What you use in production Apache/ModWSGI ?
>
> Regards
>
>
> On Wednesday, August 21, 2013 2:57:51 PM UTC+2, Andréas Kühne wrote:
>>
>> Hi,
>>
>> I am working on a website that is available in 10 different languages,
>> and we have the translations working. If you want to see our website in
>> french, you just add /fr to our url and it works fine.
>>
>> However we are getting a lot of :
>>
>>   File "middleware.py", line 83, in process_request
>> translation.activate(request.l**ocale_dict['language'])
>>
>>   File 
>> "env/lib/python2.6/site-**packages/django/utils/**translation/__init__.py",
>> line 90, in activate
>> return _trans.activate(language)
>>
>>   File 
>> "env/lib/python2.6/site-**packages/django/utils/**translation/trans_real.py",
>> line 183, in activate
>> _active.value = translation(language)
>>
>>   File 
>> "env/lib/python2.6/site-**packages/django/utils/**translation/trans_real.py",
>> line 173, in translation
>> current_translation = _fetch(language, fallback=default_translation)
>>
>>   File 
>> "env/lib/python2.6/site-**packages/django/utils/**translation/trans_real.py",
>> line 141, in _fetch
>> res._info = res._info.copy()
>>
>> AttributeError: 'NoneType' object has no attribute '_info'
>>
>> These errors mostly occur when the user requests an ajax enabled update.
>> As far as I can tell this error is related to the fact that django
>> tranlsations can't open the .mo files for the specific locale. What I don't
>> understand is that this happens maybe once every 2 days, so it doesn't
>> happen all the time.
>>
>> The only resources I have found on the subject are regarding to
>> completely missing .mo translation files (which is not the case here). I am
>> leaning towards an issue with apache not being able to open the file,
>> because of restrictions on the number of open files allowed, but I'm not
>> sure. Has anyone any ideas on how to correct this issue? I should also say
>> that it has never happened on our development machines.
>>
>> Regards,
>>
>> Andréas
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problem with translations

2013-08-21 Thread Mauro Rocco
Hi,
That's strange.
To me looks like the server from time to time can not access this files as 
you said.
What you use in production Apache/ModWSGI ?

Regards

On Wednesday, August 21, 2013 2:57:51 PM UTC+2, Andréas Kühne wrote:
>
> Hi,
>
> I am working on a website that is available in 10 different languages, and 
> we have the translations working. If you want to see our website in french, 
> you just add /fr to our url and it works fine.
>
> However we are getting a lot of :
>
>   File "middleware.py", line 83, in process_request
> translation.activate(request.locale_dict['language'])
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/__init__.py", 
> line 90, in activate
> return _trans.activate(language)
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py", 
> line 183, in activate
> _active.value = translation(language)
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py", 
> line 173, in translation
> current_translation = _fetch(language, fallback=default_translation)
>
>   File 
> "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py", 
> line 141, in _fetch
> res._info = res._info.copy()
>
> AttributeError: 'NoneType' object has no attribute '_info'
>
> These errors mostly occur when the user requests an ajax enabled update. 
> As far as I can tell this error is related to the fact that django 
> tranlsations can't open the .mo files for the specific locale. What I don't 
> understand is that this happens maybe once every 2 days, so it doesn't 
> happen all the time. 
>
> The only resources I have found on the subject are regarding to completely 
> missing .mo translation files (which is not the case here). I am leaning 
> towards an issue with apache not being able to open the file, because of 
> restrictions on the number of open files allowed, but I'm not sure. Has 
> anyone any ideas on how to correct this issue? I should also say that it 
> has never happened on our development machines. 
>
> Regards, 
>
> Andréas
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Problem with translations

2013-08-21 Thread Andreas Kuhne
Hi,

I am working on a website that is available in 10 different languages, and
we have the translations working. If you want to see our website in french,
you just add /fr to our url and it works fine.

However we are getting a lot of :

  File "middleware.py", line 83, in process_request
translation.activate(request.locale_dict['language'])

  File "env/lib/python2.6/site-packages/django/utils/translation/__init__.py",
line 90, in activate
return _trans.activate(language)

  File "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py",
line 183, in activate
_active.value = translation(language)

  File "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py",
line 173, in translation
current_translation = _fetch(language, fallback=default_translation)

  File "env/lib/python2.6/site-packages/django/utils/translation/trans_real.py",
line 141, in _fetch
res._info = res._info.copy()

AttributeError: 'NoneType' object has no attribute '_info'

These errors mostly occur when the user requests an ajax enabled update. As
far as I can tell this error is related to the fact that django
tranlsations can't open the .mo files for the specific locale. What I don't
understand is that this happens maybe once every 2 days, so it doesn't
happen all the time.

The only resources I have found on the subject are regarding to completely
missing .mo translation files (which is not the case here). I am leaning
towards an issue with apache not being able to open the file, because of
restrictions on the number of open files allowed, but I'm not sure. Has
anyone any ideas on how to correct this issue? I should also say that it
has never happened on our development machines.

Regards,

Andréas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Problem with translations

2011-08-17 Thread Isaac

Hi folks,

I'm having a problem with a single module and its translations.

This module has some lazy translation (the same as other modules), but 
in admin, it spreads an error.

Error is the following:

TemplateSyntaxError at /admin/tieredpricing/pricingtier/add/
Caught TypeError while rendering: Lazy object returned unexpected type.
Request Method:GET
Request URL:http://localhost:8000/admin/tieredpricing/pricingtier/add/
Django Version:1.3
Exception Type:TemplateSyntaxError
Exception Value:
Caught TypeError while rendering: Lazy object returned unexpected type.
Exception Location:
/usr/local/lib/python2.7/dist-packages/django/utils/functional.py in 
__wrapper__, line 197

Python Executable:/usr/bin/python
Python Version:2.7.1

In template 
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/includes/fieldset.html, 
error at line 6

Caught TypeError while rendering: Lazy object returned unexpected type.
1 
2{% if fieldset.name %}{{ fieldset.name }}{% endif %}
3{% if fieldset.description %}
4 {{ fieldset.description|safe }}
5{% endif %}
6{% for line in fieldset %}

At line 6.

Then I traced that error to its dispatcher, and I found the following:

at line 402 of file django/forms/forms.py there is the following line:
self.help_text = field.help_text or ''

my problem is that field.help_text must contain an unicode string (u'') 
and not that weird object that is containing,



I've found a way to solve it, and is to call __unicode__() function on 
that object, that explicitly gives me the right unicode string, but that 
code is django core, and I don't know if it's a django issue.


Can anybody help me plz?

Thanks in advance

--
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: Problem with translations

2011-01-03 Thread Karen Tracey
On Mon, Jan 3, 2011 at 3:05 AM, Isaac XxX  wrote:

> Recently, i've found a problem with i18n translations in Django.
>
> All my translations are located inside views functions, templates and some
> of them are in a file called forms.py (where i store some of my forms).
>
> The problem arise when I render that forms. First render time, seems that
> locale is applied, but next times the same locale is displayed again,
> without beign able to change it through locale selector. The rest of
> translations are behaving correctly. Any clue about what's happening with
> translations outside of views and templates files?
>
>
Forms would be a likely place where you will need to be using lazy
translation (
http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/#lazy-translation).
If you are not, that may be the problem.

Karen
-- 
http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Problem with translations

2011-01-03 Thread Isaac XxX
Recently, i've found a problem with i18n translations in Django.

All my translations are located inside views functions, templates and some
of them are in a file called forms.py (where i store some of my forms).

The problem arise when I render that forms. First render time, seems that
locale is applied, but next times the same locale is displayed again,
without beign able to change it through locale selector. The rest of
translations are behaving correctly. Any clue about what's happening with
translations outside of views and templates files?

Thank you in advance

Isaac

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.