Use `#tr` instead of `#gsub` in Journey scanner

`#tr` is more efficient than `#gsub` and can be used as a drop in
replacement in this context.

enhance #17220