Commit bd036141 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '337133-jh-locale' into 'master'

Implement JH only locale and use promo_host

See merge request gitlab-org/gitlab!68573
parents 8fcaa836 92039271
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
- unless public_visibility_restricted? - unless public_visibility_restricted?
= link_to _("Explore"), explore_root_path = link_to _("Explore"), explore_root_path
= link_to _("Help"), help_path = link_to _("Help"), help_path
= link_to _("About GitLab"), "https://about.gitlab.com/" = link_to _("About GitLab"), "https://#{ApplicationHelper.promo_host}"
= footer_message = footer_message
# frozen_string_literal: true # frozen_string_literal: true
FastGettext.add_text_domain 'gitlab', translation_repositories = [
path: File.join(Rails.root, 'locale'), FastGettext::TranslationRepository.build(
type: :po, 'gitlab',
ignore_fuzzy: true 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_text_domain = 'gitlab'
FastGettext.default_locale = :en FastGettext.default_locale = :en
...@@ -99,7 +99,7 @@ RSpec.describe Nav::NewDropdownHelper do ...@@ -99,7 +99,7 @@ RSpec.describe Nav::NewDropdownHelper do
it 'has project menu item' do it 'has project menu item' do
expect(subject[:menu_sections]).to eq( expect(subject[:menu_sections]).to eq(
expected_menu_section( expected_menu_section(
title: 'GitLab', title: _('GitLab'),
menu_item: ::Gitlab::Nav::TopNavMenuItem.build( menu_item: ::Gitlab::Nav::TopNavMenuItem.build(
id: 'general_new_project', id: 'general_new_project',
title: 'New project/repository', title: 'New project/repository',
...@@ -117,7 +117,7 @@ RSpec.describe Nav::NewDropdownHelper do ...@@ -117,7 +117,7 @@ RSpec.describe Nav::NewDropdownHelper do
it 'has group menu item' do it 'has group menu item' do
expect(subject[:menu_sections]).to eq( expect(subject[:menu_sections]).to eq(
expected_menu_section( expected_menu_section(
title: 'GitLab', title: _('GitLab'),
menu_item: ::Gitlab::Nav::TopNavMenuItem.build( menu_item: ::Gitlab::Nav::TopNavMenuItem.build(
id: 'general_new_group', id: 'general_new_group',
title: 'New group', title: 'New group',
...@@ -135,7 +135,7 @@ RSpec.describe Nav::NewDropdownHelper do ...@@ -135,7 +135,7 @@ RSpec.describe Nav::NewDropdownHelper do
it 'has new snippet menu item' do it 'has new snippet menu item' do
expect(subject[:menu_sections]).to eq( expect(subject[:menu_sections]).to eq(
expected_menu_section( expected_menu_section(
title: 'GitLab', title: _('GitLab'),
menu_item: ::Gitlab::Nav::TopNavMenuItem.build( menu_item: ::Gitlab::Nav::TopNavMenuItem.build(
id: 'general_new_snippet', id: 'general_new_snippet',
title: 'New snippet', title: 'New snippet',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment