summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-18 10:29:18 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-18 13:10:35 +0200
commit939469cda3aa66e5cc68b6780f6ee8a8d6152d0f (patch)
treefb3639c1f23922bf073479f591ad3c52ecdba206 /app/helpers
parentf69b54682fc1770a73c528032b1a86f3e7d547a1 (diff)
downloadgitlab-ce-939469cda3aa66e5cc68b6780f6ee8a8d6152d0f.tar.gz
Build the locale path with an `_` instead of a `-`
The locale code is turned into an asset path with an underscore instead of a dash. The language codes are transformed by `I18n.locale` into a code with a dash. But the resources for translating are always stored in a path using a `_` separating the language and the region code.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 4 insertions, 0 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