I think I got in trouble for doing it inside the gettext call once. I believe I was told that it was important to do substitution after translation, which does make sense to me.