Skip to content

Use an absolute path for locale path in FastGettext config

Rubén Dávila requested to merge use-absolute-path-for-gettext-config into master

What does this MR do?

It uses an absolute path for the FastGettext config.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Unicorn was unable to start after a fresh installation through Omnibus, here are the logs:

==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
RuntimeError: path locale could not be found!
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext/translation_repository/base.rb:43:in `find_files_in_locale_folders'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext/translation_repository/po.rb:12:in `find_and_store_files'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext/translation_repository/mo.rb:23:in `reload'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext/translation_repository/mo.rb:11:in `initialize'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext/translation_repository.rb:13:in `new'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext/translation_repository.rb:13:in `build'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/fast_gettext-1.4.0/lib/fast_gettext.rb:28:in `add_text_domain'
  /opt/gitlab/embedded/service/gitlab-rails/config/initializers/fast_gettext.rb:1:in `<top (required)>'

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports