I assume it has to be this way, because I assume it does some kind of lookup to find the matching translation for the given string.  If one has done the substitution first, then each version of the string with a course_id and user_id substituted would need to be localized.  So if the whole thing is wrapped, I'm guessing it's mostly wrong.