Fix hard-coded test cases for configuring default language setting

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Related Issue: #31609 (closed)

Related JiHu MR: gitlab-jh/gitlab!112 (merged)

The current test cases consider the system language to be English (:en).

In a test containing character matching (such as with_message, has_content?), errors will be reported if the system language is modified to other language.

So, we want to fix hard-coded character matching test cases.

By the way, these values will affect the system language:

  • I18n.default_locale
  • I18n.locale
  • FastGettext.default_locale
  • FastGettext.set_locale
Edited by 🤖 GitLab Bot 🤖