summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-09-05 18:22:20 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-09-05 18:22:20 +0100
commit5dd1d5782e748382cfef14a87efbdcea3b8bbbb2 (patch)
tree74af8e32f943de71df41ebb391c9fa981a387136
parentfd428a2c1f5a73e6555bbc3584a3f3d40946f7f8 (diff)
downloadgitlab-ce-5dd1d5782e748382cfef14a87efbdcea3b8bbbb2.tar.gz
Fixes the Cookie path
Prepares for i18n
-rw-r--r--app/assets/javascripts/user_callout.js2
-rw-r--r--app/views/shared/_auto_devops_callout.html.haml12
-rw-r--r--lib/gitlab/gon_helper.rb2
3 files changed, 7 insertions, 9 deletions
diff --git a/app/assets/javascripts/user_callout.js b/app/assets/javascripts/user_callout.js
index eab6cee0886..6165d97f425 100644
--- a/app/assets/javascripts/user_callout.js
+++ b/app/assets/javascripts/user_callout.js
@@ -22,7 +22,7 @@ export default class UserCallout {
const $currentTarget = $(e.currentTarget);
if (this.options.setCalloutPerProject) {
- Cookies.set(this.cookieName, 'true', { expires: 365, path: gon.project_url });
+ Cookies.set(this.cookieName, 'true', { expires: 365, path: gon.project_path });
} else {
Cookies.set(this.cookieName, 'true', { expires: 365 });
}
diff --git a/app/views/shared/_auto_devops_callout.html.haml b/app/views/shared/_auto_devops_callout.html.haml
index d0b61282d20..ab377d32915 100644
--- a/app/views/shared/_auto_devops_callout.html.haml
+++ b/app/views/shared/_auto_devops_callout.html.haml
@@ -6,12 +6,10 @@
.svg-container
= custom_icon('icon_autodevops')
.user-callout-copy
- %h4
- Auto DevOps (Beta)
+ %h4= _('Auto DevOps (Beta)')
+ %p= _('Auto DevOps can be activated for this project. It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.')
%p
- Auto DevOps can be activated for this project. It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.
- %p
- Learn more in the
- = link_to 'Auto DevOps documentation', help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
+ #{s_('Learn more in the')}
+ = link_to _('Auto DevOps documentation'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
- = link_to 'Enable in settings', project_settings_ci_cd_path(@project), class: 'btn btn-primary js-close-callout'
+ = link_to _('Enable in settings'), project_settings_ci_cd_path(@project), class: 'btn btn-primary js-close-callout'
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index c8564951a24..6a80162e373 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -30,7 +30,7 @@ module Gitlab
end
def add_gon_project_variables
- gon.project_url = project_url(project)
+ gon.project_path = project_path(project)
end
end
end