Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#20695 closed Bug (fixed)

"django.contrib.humanize" Turkish Translation Error

Reported by: ruless@… 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 Claude Paroz, 11 years ago

Component: UncategorizedTranslations
Owner: changed from nobody to Claude Paroz
Status: newassigned
Triage Stage: UnreviewedAccepted

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.

comment:2 by Claude Paroz <claude@…>, 11 years ago

In 63b2155919c017591e70782fb0ad92167a160f30:

Added check when fetching and updating translations from Transifex

So as syntax errors in po files don't go unnoticed. Refs #20695.

comment:3 by Claude Paroz <claude@…>, 11 years ago

In 295a925ceffb0499614bfbe0fb657440b7cf5b9c:

[1.6.x] Added check when fetching and updating translations from Transifex

So as syntax errors in po files don't go unnoticed. Refs #20695.
Backport of 63b215591 from master.

comment:4 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 44df41e5fd151378aee2730c497f82e0db68666a:

[1.5.x] Fixed #20695 -- Fixed contrib.humanize translation syntax errors

Affected language: Mexican Spanish, Mongolian, Romanian, Turkish
Translations for 1.6 and master will be refetched from Transifex.
Thanks ruless at gmail.com for the report.

comment:5 by omat@…, 10 years ago

Version: 1.51.7-beta-2

This issue popped up again in the Django 1.7 beta 3.

comment:6 by omat@…, 10 years ago

Resolution: fixed
Status: closednew

comment:7 by omat@…, 10 years ago

Severity: NormalRelease blocker

comment:8 by Claude Paroz, 10 years ago

Status: newassigned

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 Sasha Romijn, 10 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 Claude Paroz, 10 years ago

Last time translations were refetched from Transifex, it was in the 1.6.x branch.

comment:11 by Tim Graham, 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 Aymeric Augustin, 10 years ago

Resolution: fixed
Status: assignedclosed

I agree, this problem will disappear by itself by the 1.7 release.

If I missed something, please reopen and explain what's needed.

Last edited 10 years ago by Aymeric Augustin (previous) (diff)

comment:13 by omat@…, 10 years ago

Version: 1.7-beta-21.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 Claude Paroz, 10 years ago

Yes, it will, but not magically, only when I'll push the updated translations.

Note: See TracTickets for help on using tickets.
Back to Top