Comments (9)
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.
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.
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.
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.
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.
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.
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.
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.
From eschler on July 11, 2012 20:24:47
This issue was closed by revision r150.
from django-modeltranslation.
Related Issues (20)
- TabbedTranslationAdmin Issue HOT 6
- I can't delete webPage that contains a body translate HOT 5
- AttributeError: 'Multilingual[Model]QuerySet' object has no attribute 'name of @cached_property' HOT 1
- Django 4.2: update_or_create doesn't update translated fields HOT 15
- error in tabbed_translation_fields HOT 3
- How to properly dynamically add ModelForm fields? HOT 7
- Add a feature to translate the model.fields default value based on field language. HOT 5
- Translated JSONField now always returns str HOT 5
- Support for Subquery HOT 5
- Crash when a model with multi-table inheritance also has default ordering HOT 1
- Columns for all languages are added to table HOT 3
- please remove last reference to six on poetry.lock HOT 4
- MODELTRANSLATION_AUTO_POPULATE problem HOT 1
- Question ? : Original field does not contains the default language HOT 4
- Question about Indonesian language code HOT 1
- Fire event when JS is initiated HOT 1
- Typing support HOT 1
- sync_translation_fields vs makemigrations HOT 1
- Django 5 support? HOT 6
- AttributeError: 'str' object has no attribute 'mro'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-modeltranslation.