diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-10-18 12:37:11 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-10-18 12:37:11 +0000 |
commit | 4733570c3d710f3124718fa1173f3068eb932281 (patch) | |
tree | f4f61707a9b0b42912ad54c62f9880bc6fc1868c /app | |
parent | 852f6f79f26faa0e9c19599de6d7d9a795472b49 (diff) | |
parent | 939469cda3aa66e5cc68b6780f6ee8a8d6152d0f (diff) | |
download | gitlab-ce-4733570c3d710f3124718fa1173f3068eb932281.tar.gz |
Merge branch 'bvl-fix-locale-path' into 'master'
Render region codes for locale assets with an `_` instead of a `-`
Closes #39225
See merge request gitlab-org/gitlab-ce!14924
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/_head.html.haml | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8d02d5de5c3..4754a67450f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -309,4 +309,8 @@ module ApplicationHelper def show_new_repo? cookies["new_repo"] == "true" && body_data_page != 'projects:show' end + + def locale_path + asset_path("locale/#{Gitlab::I18n.locale}/app.js") + end end diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index f1b32274664..1597621fa78 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -37,7 +37,7 @@ - if content_for?(:library_javascripts) = yield :library_javascripts - = javascript_include_tag asset_path("locale/#{I18n.locale.to_s || I18n.default_locale.to_s}/app.js") unless I18n.locale == :en + = javascript_include_tag locale_path unless I18n.locale == :en = webpack_bundle_tag "webpack_runtime" = webpack_bundle_tag "common" = webpack_bundle_tag "main" |