#20695 closed Bug (fixed)
"django.contrib.humanize" Turkish Translation Error
Reported by: | Owned by: | Claude Paroz | |
---|---|---|---|
Component: | Translations | Version: | 1.7-rc-1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When I use "naturaltime" templatetag with the datetimefield value it translates as "{u'count': 2} saat önce" whereas it should be "2 saat önce" so there's a problem with translation numerical values.
Here are my codes;
#settings.py
LANGUAGE_CODE = 'tr'
DJANGO_APPS = (
'django.contrib.humanize'
)
#models.py
pub_date = models.DateTimeField("Yayınlanma Tarihi", auto_now_add=True)
#views.py
def show_article(request, slug):
article = Article.objects.get(slug=slug)
return render(request, 'news/show_article.html', {'article': article})
#template.html
{{ article.pub_date|naturaltime }}
I'm a pretty new Django user but after discussing this issue with some experienced users on #django channel, they've told me to open a ticket about it. I hope this information is enough.
Change History (14)
comment:1 by , 11 years ago
Component: | Uncategorized → Translations |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 by , 11 years ago
Version: | 1.5 → 1.7-beta-2 |
---|
This issue popped up again in the Django 1.7 beta 3.
comment:6 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:7 by , 11 years ago
Severity: | Normal → Release blocker |
---|
comment:8 by , 11 years ago
Status: | new → assigned |
---|
That's right, translation updates and fixes in the 1.6.x stable branch have not been ported to 1.7.x/master.
comment:9 by , 11 years ago
I'm not entirely following this. If the fixed translations for master were refetched from Transifex 11 months ago, how come these fixes are not in 1.7.x/master already, as that was forked from master much more recently?
comment:10 by , 11 years ago
Last time translations were refetched from Transifex, it was in the 1.6.x branch.
comment:11 by , 10 years ago
Do we need to keep this ticket open? It seems like fetching translations is part of the normal release process.
comment:12 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I agree, this problem will disappear by itself by the 1.7 release.
If I missed something, please reopen and explain what's needed.
comment:13 by , 10 years ago
Version: | 1.7-beta-2 → 1.7-rc-1 |
---|
This problem still exists in the release candidate 1. Are you sure it will magically go away with the stable version?
comment:14 by , 10 years ago
Yes, it will, but not magically, only when I'll push the updated translations.
You are right, the Turkish translation po file for contrib.humanize contains syntax errors and does not pass
msgfmt -vc
.I've checked that the 2 offending strings are fixed in Transifex (we are safe for 1.6).
I'll update some of our scripts to not allow po files with errors. I will also backport the translation fix for 1.5, as it's a syntax error, not only a bad translation.