Cannot pass TranslationString as mapping value to TranslationString
Closed this issue · 3 comments
The Problem is that there is no way to embedd translated strings inside a translated string. Thus something like _('${foo}', mapping={'foo': _('bar')}) does not work.
This problem arises in frameworks like pyramid where the actual translation of the strings is handled later and not where the translated string is defined thus making it hard to build up translated strings programmatically.
One example we had was a superclass that defines some rules for a game and then a subclass that would have liked to extend those rules by adding to them. But I haven't yet found a way to get those translated strings to combine correctly.
This is actually not a duplicate, the behaviour is slightly different.
I'm wrong - this is a duplicate.