﻿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
29986	ngettext_lazy result doesn't support `.format`	patrick	nobody	"I was trying to use `ngettext_lazy` in combination with `str.format` and I discovered that it doesn't actually work,
here's a test script that you can try with latest django:

{{{
import os

os.environ.setdefault(""DJANGO_SETTINGS_MODULE"", ""translation.settings"")

import django  # noqa

django.setup()

from django.utils.translation import ugettext_lazy, ngettext_lazy  # noqa

singular_string = ugettext_lazy(""this {name} will be translated"")
plural_string = ngettext_lazy(
    singular=""{total} string will be translated"",
    plural=""{total} strings will be translated"",
    number=""total"",
)

a = singular_string.format(name=""string"")

b = plural_string.format(total=2)

print()

print(""a:"", a)
print(""b:"", b)

}}}

This is the output:

{{{
~/D/p/django-ngettext-lazy pipenv run python example.py

a: this string will be translated
b:
}}}

EDIT: added a patch here:

https://github.com/django/django/pull/10691
"	Bug	closed	Internationalization	2.1	Normal	fixed	translations		Ready for checkin	1	0	0	0	0	0
