From 6a6313351513dbc0a1c88a5d7928f5c13aae1c99 Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Mon, 28 Jan 2019 12:08:54 +0200 Subject: Externalize strings from `/app/views/projects/pages_domains` --- app/views/projects/pages_domains/_form.html.haml | 13 ++++++------ app/views/projects/pages_domains/edit.html.haml | 4 ++-- app/views/projects/pages_domains/new.html.haml | 8 +++---- app/views/projects/pages_domains/show.html.haml | 27 ++++++++++++------------ 4 files changed, 25 insertions(+), 27 deletions(-) (limited to 'app') diff --git a/app/views/projects/pages_domains/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml index 0d848f7899c..b7b46c56c37 100644 --- a/app/views/projects/pages_domains/_form.html.haml +++ b/app/views/projects/pages_domains/_form.html.haml @@ -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.") diff --git a/app/views/projects/pages_domains/edit.html.haml b/app/views/projects/pages_domains/edit.html.haml index 342b1482df7..e11387ae742 100644 --- a/app/views/projects/pages_domains/edit.html.haml +++ b/app/views/projects/pages_domains/edit.html.haml @@ -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" diff --git a/app/views/projects/pages_domains/new.html.haml b/app/views/projects/pages_domains/new.html.haml index 94ad1470052..c7cefa87c76 100644 --- a/app/views/projects/pages_domains/new.html.haml +++ b/app/views/projects/pages_domains/new.html.haml @@ -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' diff --git a/app/views/projects/pages_domains/show.html.haml b/app/views/projects/pages_domains/show.html.haml index a8484187493..82147568981 100644 --- a/app/views/projects/pages_domains/show.html.haml +++ b/app/views/projects/pages_domains/show.html.haml @@ -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") -- cgit v1.2.1