[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-12 Thread Abdellah Chelli
عبدالله شلي (Abdellah Chelli) added the comment: Mapping works too, I don't know how I didn't get it. Thank you Eric. Ex: gettext.ngettext("%(package)d package", "%(package)d packages", countInstall) % { 'package': countInstall} https://bugs.launch

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Abdellah Chelli
عبدالله شلي (Abdellah Chelli) added the comment: The full example: === import gettext gettext.bindtextdomain("pygettext_test","./locale") gettext.textdomain("pygettext_test") _=gettext.gettext n_=gettext.ngettext n1=1 n2=3 print n_("there is %i command"

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Abdellah Chelli
عبدالله شلي (Abdellah Chelli) added the comment: 'One hour' % {'n': 3} / mapping will not work gettext replaces the string for each language. str.format works well. The problem we couldn't submit a bug to change the code for all packages using it. I think it'

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Abdellah Chelli
New submission from عبدالله شلي (Abdellah Chelli) : c/printf accepts this: n=1; printf("One hour.", n); in other hand python/print rises an error: n=1 print "One hour." % n Exactly the % formatting operation. (TypeError: not all arguments converted during string formatti