Hello Jeroen, 2012/4/5 Jeroen van Rijn <jvr...@gmail.com>: > Wouldn't mocking _() work? I'm thinking this: > - The function doesn't actually need to work to build the .po files. It just > looks for _(). > - At the point where OCitySMap actually needs the translation, gettext will > have been imported and overwritten the mocked _() > - If in the former step the mocked _() persists in the instantiated class, > some meta programming could replace the class's pointer to the mock _() with > a pointer to the real function.
I would prefer keep things simple and not fiddle with Python objects. But one needs to test it to see if your proposed scheme works or not. Best regards, david