Looks like it will demand a lot of work to implement the format proposed by
fundawang. The correct solution would be (using bogdano's example):
>>> m={"foo":"sape", "bar":"grimpa"}
>>> smart._("Some people call %(foo)s as %(bar)s") % m
u'Some people call sape as grimpa'
So it would need to create a dict mapping for each string that uses more than
one var. It's doable, but would require quite some work on rewriting a lot of
code, and rechecking all the translation files.
Anyone agree with fundawang's suggestion? Does it really brings any advantage
over the current way?
|