Externalize strings from /app/views/projects/pages_domains

This commit is contained in:
George Tsiolis 2019-01-28 12:08:54 +02:00
parent 49c12f9b0f
commit 6a63133515
6 changed files with 84 additions and 27 deletions

View file

@ -6,25 +6,24 @@
.form-group.row
= f.label :domain, class: 'col-form-label col-sm-2' do
Domain
= _("Domain")
.col-sm-10
= f.text_field :domain, required: true, autocomplete: 'off', class: 'form-control', disabled: @domain.persisted?
- if Gitlab.config.pages.external_https
.form-group.row
= f.label :certificate, class: 'col-form-label col-sm-2' do
Certificate (PEM)
= _("Certificate (PEM)")
.col-sm-10
= f.text_area :certificate, rows: 5, class: 'form-control'
%span.help-inline Upload a certificate for your domain with all intermediates
%span.help-inline= _("Upload a certificate for your domain with all intermediates")
.form-group.row
= f.label :key, class: 'col-form-label col-sm-2' do
Key (PEM)
= _("Key (PEM)")
.col-sm-10
= f.text_area :key, rows: 5, class: 'form-control'
%span.help-inline Upload a private key for your certificate
%span.help-inline= _("Upload a private key for your certificate")
- else
.nothing-here-block
Support for custom certificates is disabled.
Ask your system's administrator to enable it.
= _("Support for custom certificates is disabled. Ask your system's administrator to enable it.")

View file

@ -1,4 +1,4 @@
- add_to_breadcrumbs "Pages", project_pages_path(@project)
- add_to_breadcrumbs _("Pages"), project_pages_path(@project)
- breadcrumb_title @domain.domain
- page_title @domain.domain
%h3.page-title
@ -8,4 +8,4 @@
= form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'fieldset-form' } do |f|
= render 'form', { f: f }
.form-actions
= f.submit 'Save Changes', class: "btn btn-success"
= f.submit _('Save Changes'), class: "btn btn-success"

View file

@ -1,12 +1,12 @@
- add_to_breadcrumbs "Pages", project_pages_path(@project)
- page_title 'New Pages Domain'
- add_to_breadcrumbs _("Pages"), project_pages_path(@project)
- page_title _('New Pages Domain')
%h3.page-title
New Pages Domain
= _("New Pages Domain")
%hr.clearfix
%div
= form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'fieldset-form' } do |f|
= render 'form', { f: f }
.form-actions
= f.submit 'Create New Domain', class: "btn btn-success"
= f.submit _('Create New Domain'), class: "btn btn-success"
.float-right
= link_to _('Cancel'), project_pages_path(@project), class: 'btn btn-cancel'

View file

@ -1,6 +1,6 @@
- add_to_breadcrumbs "Pages", project_pages_path(@project)
- add_to_breadcrumbs _("Pages"), project_pages_path(@project)
- breadcrumb_title @domain.domain
- page_title "#{@domain.domain}", 'Pages Domains'
- page_title "#{@domain.domain}", _('Pages Domains')
- dns_record = "#{@domain.domain} CNAME #{@domain.project.pages_subdomain}.#{Settings.pages.host}."
- verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled?
@ -9,37 +9,37 @@
= content_for :flash_message do
.alert.alert-warning
.container-fluid.container-limited
This domain is not verified. You will need to verify ownership before access is enabled.
= _("This domain is not verified. You will need to verify ownership before access is enabled.")
%h3.page-title.with-button
= link_to 'Edit', edit_project_pages_domain_path(@project, @domain), class: 'btn btn-success float-right'
Pages Domain
= link_to _('Edit'), edit_project_pages_domain_path(@project, @domain), class: 'btn btn-success float-right'
= _("Pages Domain")
.table-holder
%table.table
%tr
%td
Domain
= _("Domain")
%td
= link_to @domain.url do
= @domain.url
= icon('external-link')
%tr
%td
DNS
= _("DNS")
%td
.input-group
= text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true
.input-group-append
= clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block')
%p.form-text.text-muted
To access this domain create a new DNS record
= _("To access this domain create a new DNS record")
- if verification_enabled
- verification_record = "#{@domain.verification_domain} TXT #{@domain.keyed_verification_code}"
%tr
%td
Verification status
= _("Verification status")
%td
= form_tag verify_project_pages_domain_path(@project, @domain) do
.status-badge
@ -53,17 +53,16 @@
.input-group-append
= clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block')
%p.form-text.text-muted
- help_link = help_page_path('user/project/pages/getting_started_part_three.md', anchor: 'dns-txt-record')
To #{link_to 'verify ownership', help_link} of your domain,
add the above key to a TXT record within to your DNS configuration.
- link_to_help = link_to(_('verify ownership'), help_page_path('user/project/pages/getting_started_part_three.md', anchor: 'dns-txt-record'))
= _("To %{link_to_help} of your domain, add the above key to a TXT record within to your DNS configuration.").html_safe % { link_to_help: link_to_help }
%tr
%td
Certificate
= _("Certificate")
%td
- if @domain.certificate_text
%pre
= @domain.certificate_text
- else
.light
missing
= _("missing")

View file

@ -0,0 +1,5 @@
---
title: Externalize strings from `/app/views/projects/pages_domains`
merge_request: 24723
author: George Tsiolis
type: other

View file

@ -1254,6 +1254,12 @@ msgstr ""
msgid "Cannot modify managed Kubernetes cluster"
msgstr ""
msgid "Certificate"
msgstr ""
msgid "Certificate (PEM)"
msgstr ""
msgid "Change permissions"
msgstr ""
@ -2234,6 +2240,9 @@ msgstr ""
msgid "Create New Directory"
msgstr ""
msgid "Create New Domain"
msgstr ""
msgid "Create a new branch"
msgstr ""
@ -2384,6 +2393,9 @@ msgstr ""
msgid "CycleAnalyticsStage|Test"
msgstr ""
msgid "DNS"
msgstr ""
msgid "Dashboard"
msgstr ""
@ -3981,6 +3993,9 @@ msgstr ""
msgid "June"
msgstr ""
msgid "Key (PEM)"
msgstr ""
msgid "Kubernetes"
msgstr ""
@ -4557,6 +4572,9 @@ msgstr[1] ""
msgid "New Label"
msgstr ""
msgid "New Pages Domain"
msgstr ""
msgid "New Pipeline Schedule"
msgstr ""
@ -4934,6 +4952,12 @@ msgstr ""
msgid "Pages"
msgstr ""
msgid "Pages Domain"
msgstr ""
msgid "Pages Domains"
msgstr ""
msgid "Pagination|Last »"
msgstr ""
@ -6075,6 +6099,9 @@ msgstr ""
msgid "Save"
msgstr ""
msgid "Save Changes"
msgstr ""
msgid "Save application"
msgstr ""
@ -6767,6 +6794,9 @@ msgstr ""
msgid "Suggested change"
msgstr ""
msgid "Support for custom certificates is disabled. Ask your system's administrator to enable it."
msgstr ""
msgid "Switch branch/tag"
msgstr ""
@ -7079,6 +7109,9 @@ msgstr ""
msgid "This directory"
msgstr ""
msgid "This domain is not verified. You will need to verify ownership before access is enabled."
msgstr ""
msgid "This group"
msgstr ""
@ -7407,9 +7440,15 @@ msgstr ""
msgid "Titles and Filenames"
msgstr ""
msgid "To %{link_to_help} of your domain, add the above key to a TXT record within to your DNS configuration."
msgstr ""
msgid "To GitLab"
msgstr ""
msgid "To access this domain create a new DNS record"
msgstr ""
msgid "To add an SSH key you need to %{generate_link_start}generate one%{link_end} or use an %{existing_link_start}existing key%{link_end}."
msgstr ""
@ -7647,6 +7686,12 @@ msgstr ""
msgid "Upload New File"
msgstr ""
msgid "Upload a certificate for your domain with all intermediates"
msgstr ""
msgid "Upload a private key for your certificate"
msgstr ""
msgid "Upload file"
msgstr ""
@ -7764,6 +7809,9 @@ msgstr ""
msgid "Various settings that affect GitLab performance."
msgstr ""
msgid "Verification status"
msgstr ""
msgid "Verified"
msgstr ""
@ -8367,6 +8415,9 @@ msgid_plural "merge requests"
msgstr[0] ""
msgstr[1] ""
msgid "missing"
msgstr ""
msgid "mrWidget| Please restore it or use a different %{missingBranchName} branch"
msgstr ""
@ -8664,6 +8715,9 @@ msgstr ""
msgid "uses Kubernetes clusters to deploy your code!"
msgstr ""
msgid "verify ownership"
msgstr ""
msgid "view it on GitLab"
msgstr ""