summaryrefslogtreecommitdiff
path: root/app/views/projects/pages
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/pages')
-rw-r--r--app/views/projects/pages/_access.html.haml6
-rw-r--r--app/views/projects/pages/_destroy.haml10
-rw-r--r--app/views/projects/pages/_https_only.html.haml5
-rw-r--r--app/views/projects/pages/_list.html.haml19
-rw-r--r--app/views/projects/pages/_no_domains.html.haml5
-rw-r--r--app/views/projects/pages/_use.html.haml10
-rw-r--r--app/views/projects/pages/show.html.haml11
7 files changed, 35 insertions, 31 deletions
diff --git a/app/views/projects/pages/_access.html.haml b/app/views/projects/pages/_access.html.haml
index 7b6d46964a2..178f0acc5b9 100644
--- a/app/views/projects/pages/_access.html.haml
+++ b/app/views/projects/pages/_access.html.haml
@@ -1,11 +1,11 @@
- if @project.pages_deployed?
.card
.card-header
- Access pages
+ = s_('GitLabPages|Access pages')
.card-body
%p
%strong
- = _("Your pages are served under:")
+ = s_('GitLabPages|Your pages are served under:')
%p
= external_link(@project.pages_url, @project.pages_url)
@@ -14,4 +14,4 @@
%p
= external_link(domain.url, domain.url)
.card-footer.alert-primary
- = _("It may take up to 30 minutes before the site is available after the first deployment.")
+ = s_('GitLabPages|It may take up to 30 minutes before the site is available after the first deployment.')
diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml
index 138e2864bad..58dbbb5bcfc 100644
--- a/app/views/projects/pages/_destroy.haml
+++ b/app/views/projects/pages/_destroy.haml
@@ -1,12 +1,14 @@
- if @project.pages_deployed?
- if can?(current_user, :remove_pages, @project)
.card.border-danger
- .card-header.bg-danger.text-white Remove pages
+ .card-header.bg-danger.text-white
+ = s_('GitLabPages|Remove pages')
.errors-holder
.card-body
%p
- Removing pages will prevent them from being exposed to the outside world.
+ = s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.')
.form-actions
- = link_to 'Remove pages', project_pages_path(@project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove"
+ = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove"
- else
- .nothing-here-block Only project maintainers can remove pages
+ .nothing-here-block
+ = s_('GitLabPages|Only project maintainers can remove pages')
diff --git a/app/views/projects/pages/_https_only.html.haml b/app/views/projects/pages/_https_only.html.haml
index 74478ee011c..d8c4a5f0a5d 100644
--- a/app/views/projects/pages/_https_only.html.haml
+++ b/app/views/projects/pages/_https_only.html.haml
@@ -3,8 +3,9 @@
.form-check
= f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
= f.label :pages_https_only, class: pages_https_only_label_class do
- %strong Force HTTPS (requires valid certificates)
+ %strong
+ = s_('GitLabPages|Force HTTPS (requires valid certificates)')
- unless pages_https_only_disabled?
.prepend-top-10
- = f.submit 'Save', class: 'btn btn-success'
+ = f.submit s_('GitLabPages|Save'), class: 'btn btn-success'
diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml
index c4285e7f3d2..b05491f2c6e 100644
--- a/app/views/projects/pages/_list.html.haml
+++ b/app/views/projects/pages/_list.html.haml
@@ -8,20 +8,25 @@
- @domains.each do |domain|
%li.pages-domain-list-item.list-group-item.d-flex.justify-content-between
- if verification_enabled
- - tooltip, status = domain.unverified? ? [_('Unverified'), 'failed'] : [_('Verified'), 'success']
+ - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success']
.domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip }
= sprite_icon("status_#{status}", size: 16 )
.domain-name
= external_link(domain.url, domain.url)
- if domain.subject
%div
- %span.badge.badge-gray Certificate: #{domain.subject}
+ %span.badge.badge-gray
+ = s_('GitLabPages|Certificate: %{subject}') % { subject: domain.subject }
- if domain.expired?
- %span.badge.badge-danger Expired
+ %span.badge.badge-danger
+ = s_('GitLabPages|Expired')
%div
- = link_to 'Details', project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped"
- = link_to 'Remove', project_pages_domain_path(@project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
+ = link_to s_('GitLabPages|Details'), project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped"
+ = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
- if verification_enabled && domain.unverified?
%li.list-group-item.bs-callout-warning
- #{domain.domain} is not verified. To learn how to verify ownership, visit your
- #{link_to 'domain details', project_pages_domain_path(@project, domain)}.
+ - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
+ - details_link_end = '</a>'.html_safe
+ = s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain,
+ link_start: details_link_start,
+ link_end: details_link_end }
diff --git a/app/views/projects/pages/_no_domains.html.haml b/app/views/projects/pages/_no_domains.html.haml
index 8c93cf7a8ad..8d6e403b93a 100644
--- a/app/views/projects/pages/_no_domains.html.haml
+++ b/app/views/projects/pages/_no_domains.html.haml
@@ -1,7 +1,6 @@
- if can?(current_user, :update_pages, @project)
.card
.card-header
- Domains
+ = s_('GitLabPages|Domains')
.nothing-here-block
- Support for domains and certificates is disabled.
- Ask your system's administrator to enable it.
+ = s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.")
diff --git a/app/views/projects/pages/_use.html.haml b/app/views/projects/pages/_use.html.haml
index 988dabef3a0..ab44fd77e1e 100644
--- a/app/views/projects/pages/_use.html.haml
+++ b/app/views/projects/pages/_use.html.haml
@@ -1,10 +1,10 @@
- unless @project.pages_deployed?
.card.border-info
.card-header.bg-info.text-white
- Configure pages
+ = s_('GitLabPages|Configure pages')
.card-body
%p
- Learn how to upload your static site and have it served by
- GitLab by following the
- = succeed '.' do
- = link_to 'documentation on GitLab Pages', help_page_path('user/project/pages/index.md'), target: '_blank'
+ - link_start = "<a href='#{help_page_path('user/project/pages/index.md')}' target='_blank' rel='noopener noreferrer'>".html_safe
+ - link_end = '</a>'.html_safe
+ = s_('GitLabPages|Learn how to upload your static site and have it served by GitLab by following the %{link_start}documentation on GitLab Pages%{link_end}.').html_safe % { link_start: link_start,
+ link_end: link_end }
diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml
index 88ab486a248..0e1f281410a 100644
--- a/app/views/projects/pages/show.html.haml
+++ b/app/views/projects/pages/show.html.haml
@@ -1,17 +1,14 @@
- page_title 'Pages'
%h3.page-title.with-button
- Pages
+ = s_('GitLabPages|Pages')
- if can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https)
- = link_to new_project_pages_domain_path(@project), class: 'btn btn-success float-right', title: 'New Domain' do
- New Domain
+ = link_to new_project_pages_domain_path(@project), class: 'btn btn-success float-right', title: s_('GitLabPages|New Domain') do
+ = s_('GitLabPages|New Domain')
%p.light
- With GitLab Pages you can host your static websites on GitLab.
- Combined with the power of GitLab CI and the help of GitLab Runner
- you can deploy static pages for your individual projects, your user or your group.
-
+ = s_('GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group.')
- if Gitlab.config.pages.external_https
= render 'https_only'