Git Product home page Git Product logo

Comments (9)

deschler avatar deschler commented on June 3, 2024

From eschler on June 19, 2010 20:55:33
Can't reproduce the problem. Just to get it right, when you use gettext like in the example below, it works for you?

from django.utils.translation import ugettext_lazy as _
title = models.CharField(_('Title'), max_length=255)

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From [email protected] on June 19, 2010 20:58:12
That is correct. However, with " CharField('Title, maxlength=255) " it shows nothing in the Edit form, in the Admin Interface.

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From [email protected] on June 19, 2010 21:00:40
I'm sorry, it looks like with CharField(u'Title', maxlength=255) works, but without the 'u' it does not, so I guess it's not a problem with only "gettext" strings.

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From eschler on June 28, 2010 21:33:25
Still haven't been able to reproduce this issue.

Please add some details about your setup. Django, Python, modeltranslation versions, operating system...

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From [email protected] on June 28, 2010 21:42:21
Mac OS X Snow Leopard, Python 2.6, Django 1.2.1, modeltranslation trunk.

I seem to have pinpointed the issue. It happens with strings that have special characters in them. For example:
conteudo = models.TextField(u'Conteúdo') works, but
conteudo = models.TextField('Conteúdo') shows no labels.
However, if the field is not registered in "translations.py" for translation, it shows labels with or without the "u".

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From eschler on June 28, 2010 22:16:05
Reproduced it now. Something seems to go wrong in _build_localized_verbose_name.

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From eschler on June 29, 2010 08:49:53
Weird, at work i can't reproduce the issue, even though i have the same setup like at home.

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From eschler on June 30, 2010 19:56:02
Let me just add here that the field doesn't even has to be registered for translation in order to get an empty string.

Say your models are defined like:

conteudo = models.TextField('Conteúdo')
foo = models.TextField('Foo')

And you register only "foo" for translation, then the fieldname of "conteudo" will still be empty.

from django-modeltranslation.

deschler avatar deschler commented on June 3, 2024

From eschler on July 11, 2012 20:24:47
This issue was closed by revision r150.

from django-modeltranslation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.