Fixed #23788 (2) -- Improved gettext version checker

Thanks Tim Graham for the report and initial patch.
I'd like if you used `assertRaisesMessage` here to verify this is the `CommandError` we expected. Otherwise looks good, thanks!