Читаю док-ю. Сделал новый проектик, чтобы попробовать попереводить. Но вот команда makemessages ничего не создаёт. Не могу сам понять почему. Папку locale создал везде, где можно, в надежде , что заработает.forms.py:
# -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext, ugettext_lazy as _
class FormForInter(forms.Form):
text = forms.CharField(label=_('Some text'),max_length=50, localize=True)
numbers = forms.IntegerField(label=_('some numbers'), localize=True)
date = forms.DateField(label=_('some date'), localize=True)
views.py:
def view_format(request):
data = None
if request.POST:
form = FormForInter(request.POST)
if form.is_valid():
data = form.cleaned_data
else:
form = FormForInter()
return render_to_response('myinter/languages.html', dict(form=form, data=data), context_instance=RequestContext(request))
settings.py:
LANGUAGE_CODE = 'ru'
USE_I18N = True
USE_L10N = True
USE_TZ = True
если запускаю команду в терминале python manage.py makemessages --all, выдаёт сообщение:Error: This script should be run from the Django SVN tree or your project or app tree. If you did indeed run it from the SVN checkout or your project or application, maybe you are just missing the conf/locale (in the django tree) or locale (for project and application) directory? It is not created automatically, you have to create it by hand if you want to enable i18n for your project or application.Да, тут сказано про то, откуда надо запускать скрипт и то , что должна быть создана папка locale вручную. Всё я сделал. Помогите пжлст разобраться, что мог упустить?
Updated 10 Nov. 2012, 15:22 by buddha.