I don't remember exactly why, but I don't think that the gettext call works after-the-fact. I believe it has to be called with the actual string as its argument, because replacement happens in some weird pre-processing step before the code gets executed as actual python code.