Hi Michael, thanks for your comment. Indeed, I should have been more clear.
The issue that is fixed is:
$ python -c 'print("foo" % "bar")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: not all arguments converted during string formatting
$ python -c 'print("foo".format("bar"))'
foo
But yes, if a translation has a incorrect number of {} it will still crash, so maybe its not worth
doing all the work and instead use the "Foo %(bar)s" % { "bar": "some-str" } approach where its
also ok to leave out a argument. I.e.
$ python -c 'print("foo" % {"bar": "bar"})'
foo
Hi Michael, thanks for your comment. Indeed, I should have been more clear.
The issue that is fixed is:
$ python -c 'print("foo" % "bar")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: not all arguments converted during string formatting
$ python -c 'print( "foo".format( "bar")) '
foo
But yes, if a translation has a incorrect number of {} it will still crash, so maybe its not worth
doing all the work and instead use the "Foo %(bar)s" % { "bar": "some-str" } approach where its
also ok to leave out a argument. I.e.
$ python -c 'print("foo" % {"bar": "bar"})'
foo