The actual script’s byte code only has the raw Apple Event codes. That is a Finder enumeration, so your application would need to load Finder’s scripting terminology in order to look up what that raw code is. An alternative would be to use something like if statements to set the text equivalents.
The script editors load application terminology when you target the app with a tell statement in order to provide various editor features, but outside the editor your script/app does not - all it sees is the raw syntax (like Script Debugger’s view option).