Opened 2 years ago

Closed 13 months ago

Last modified 12 months ago

#20695 closed Bug (fixed)

"django.contrib.humanize" Turkish Translation Error

Reported by: ruless@… Owned by: claudep
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 Changed 2 years ago by claudep

  • Component changed from Uncategorized to Translations
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to claudep
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 2 years ago by Claude Paroz <claude@…>

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 Changed 2 years ago by Claude Paroz <claude@…>

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 Changed 2 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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 Changed 14 months ago by omat@…

  • Version changed from 1.5 to 1.7-beta-2

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

comment:6 Changed 14 months ago by omat@…

  • Resolution fixed deleted
  • Status changed from closed to new

comment:7 Changed 14 months ago by omat@…

  • Severity changed from Normal to Release blocker

comment:8 Changed 14 months ago by claudep

  • Status changed from new to 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 Changed 14 months ago by erikr

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 Changed 14 months ago by claudep

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

comment:11 Changed 14 months ago by timo

Do we need to keep this ticket open? It seems like fetching translations is part of the normal release process.

comment:12 Changed 13 months ago by aaugustin

  • Resolution set to fixed
  • Status changed from assigned to 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.

Last edited 13 months ago by aaugustin (previous) (diff)

comment:13 Changed 12 months ago by omat@…

  • Version changed from 1.7-beta-2 to 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 Changed 12 months ago by claudep

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