hi,
maybe this is a copy but i couldn't find the "original".
i have a model like this:
from django.db import models
from django.utils.translation import ugettext_lazy as _
# Create your models here.
class Thing(models.Model):
name = models.CharField(_('in model'),max_length=150)
class Admin:
pass
and in the root folder of my project (not my application) there is a conf/locale directory
after calling bin/make-messages.py in the root folder of my project there is a django.po like this:
julian@laptop:~/test/bug$ cat conf/locale/en-us/LC_MESSAGES/django.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-06 09:42+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: thing/models.py:6
msgid "in model"
msgstr "in django.po"
after installing that app and calling bin/compile-messages.py the label in the admin-inteface for the name-field is "in model" and not, as i should be, "in django.po". there is no locale/... directory in my application directoy; the documentation reads:
First, it looks for a locale directory in the application directory of the view that’s being called. If it finds a translation for the selected language, the translation will be installed.
there isn't a locale directory in the application directory, so this step should take affect, but it doesn't:
Next, it looks for a locale directory in the project directory. If it finds a translation, the translation will be installed.
where (in the second quote) locale directory should be conf/locale directory, additionally.