Welcome to mirror list, hosted at ThFree Co, Russian Federation.

001_fast_gettext.rb « initializers_before_autoloader « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 76a1dafd2d830932e0a860d4b3d1fe0c8616d67e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

translation_repositories = [
  FastGettext::TranslationRepository.build(
    'gitlab',
    path: File.join(Rails.root, 'locale'),
    type: :po,
    ignore_fuzzy: true
  )
]

Gitlab.jh do
  translation_repositories.unshift(
    FastGettext::TranslationRepository.build(
      'gitlab',
      path: File.join(Rails.root, 'jh', 'locale'),
      type: :po,
      ignore_fuzzy: true
    )
  )
end

FastGettext.add_text_domain(
  'gitlab',
  type: :chain,
  chain: translation_repositories,
  ignore_fuzzy: true
)

FastGettext.default_text_domain = 'gitlab'
FastGettext.default_locale = :en