fix up translation comment checks after Ruff format (#16814)
Follow up to #16803
Summary of the issue:
Ruff formatting python code in #16803 caused our translation comments to lose association with translation strings
This causes our scons check to fail.
Description of user facing changes
None
Description of development approach
Move translation comments to reassociated them.