﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21408	Fallback to timesince produces erroneous translations in naturaltime	676c7473@…	Maximilian Merz	"The [[https://docs.djangoproject.com/en/dev/ref/contrib/humanize/#naturaltime|naturaltime]] filter in `django.contrib.humanize` composes strings for days, weeks, months, and years from the words ""ago"" and ""in"" and the output of the built-in [[https://docs.djangoproject.com/en/dev/ref/templates/builtins/#timesince|timesince]] filter. See here, where `delta` is to be supplied by `timesince`:

{{{
#: templatetags/humanize.py:190
#, python-format
msgctxt ""naturaltime""
msgid ""%(delta)s ago""
msgstr ""vor %(delta)s""
}}}

This produces erroneous translations in German (and probably other inflectional languages, too).

""3 days, 12 hours ago"" is translated by Django as

{{{
vor 3 Tage, 12 Stunden
}}}

but the correct translation is (with dative inflection)

{{{
vor 3 Tagen, 12 Stunden
}}}

""3 Tage"" is correct for `timesince`, but for `naturaltime` it must become ""3 Tagen"". Unfortunately, the assumption that these translations can simply be pieced together from translated bits in timesince.py is mistaken.

I apologise if this isn't the right channel. I'd be glad to help, but so far I haven't seen a good way to avoid duplicating translations.
"	Bug	closed	Internationalization	dev	Normal	fixed	i18n l10n translation		Ready for checkin	1	0	0	0	0	0
