Use `#tr` instead of `#gsub`

`#tr` is more efficient than `#gsub` and can be used as a drop in
replacement in this context.
Merge pull request #17257 from Bounga/use_tr_instead_of_gsub_in_journey_scanner

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