Skip to content

Consolidate Gitlab::I18n setup

Peter Leitzen requested to merge pl-gitlab-i18n-setup into master

What does this MR do and why?

Initialize FastGettext in a single initializer.

Moving setup logic into Gitlab::I18n makes it easier to extend it later. See #19484 and WIP !74391.

Screenshots or screen recordings

Language preference
Screenshot_from_2023-02-14_21-58-30

How to set up and validate locally

In Rails console:

Gitlab.I18n.locale # => "en"

Gitlab.I18n.locale = "de"

_(" or ") => # " oder "

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports