From 0c0cf54d1386c6a64174a21d60d4fe2ef701c9c2 Mon Sep 17 00:00:00 2001 From: Tao Wang Date: Thu, 14 Jun 2018 22:27:45 +1000 Subject: [PATCH] i18n: externalize strings from 'app/views/projects/deploy_keys' Signed-off-by: Tao Wang --- .../projects/deploy_keys/_form.html.haml | 10 ++++----- .../projects/deploy_keys/_index.html.haml | 8 +++---- app/views/projects/deploy_keys/edit.html.haml | 8 +++---- locale/gitlab.pot | 21 +++++++++++++++++++ 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/app/views/projects/deploy_keys/_form.html.haml b/app/views/projects/deploy_keys/_form.html.haml index f8ab0c1ec54d00..def303c82fec1a 100644 --- a/app/views/projects/deploy_keys/_form.html.haml +++ b/app/views/projects/deploy_keys/_form.html.haml @@ -8,17 +8,17 @@ = f.text_area :key, class: "form-control", rows: 5, required: true .form-group.row %p.light.append-bottom-0 - Paste a machine public key here. Read more about how to generate it - = link_to "here", help_page_path("ssh/README") + - link_to_here = link_to(_("here"), help_page_path("ssh/README")) + = _("Paste a machine public key here. Read more about how to generate it %{link_to_here}").html_safe % { link_to_here: link_to_here } = f.fields_for :deploy_keys_projects do |deploy_keys_project_form| .form-group.row = deploy_keys_project_form.label :can_push do = deploy_keys_project_form.check_box :can_push - %strong Write access allowed + %strong= _("Write access allowed") .form-group.row %p.light.append-bottom-0 - Allow this key to push to repository as well? (Default only allows pull access.) + = _("Allow this key to push to repository as well? (Default only allows pull access.)") .form-group.row - = f.submit "Add key", class: "btn-create btn" + = f.submit _("Add key"), class: "btn-create btn" diff --git a/app/views/projects/deploy_keys/_index.html.haml b/app/views/projects/deploy_keys/_index.html.haml index 6905c541e8b8e3..a1a8c8d858575a 100644 --- a/app/views/projects/deploy_keys/_index.html.haml +++ b/app/views/projects/deploy_keys/_index.html.haml @@ -2,14 +2,14 @@ %section.qa-deploy-keys-settings.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 - Deploy Keys + = _("Deploy Keys") %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = expanded ? _('Collapse') : _('Expand') %p - Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one. + = _("Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.") .settings-content %h5.prepend-top-0 - Create a new deploy key for this project + = _("Create a new deploy key for this project") = render @deploy_keys.form_partial_path %hr #js-deploy-keys{ data: { endpoint: project_deploy_keys_path(@project), project_id: @project.id } } diff --git a/app/views/projects/deploy_keys/edit.html.haml b/app/views/projects/deploy_keys/edit.html.haml index e009b6fef0e2e8..d8f7b1acf6d4fa 100644 --- a/app/views/projects/deploy_keys/edit.html.haml +++ b/app/views/projects/deploy_keys/edit.html.haml @@ -1,10 +1,10 @@ -- page_title 'Edit Deploy Key' -%h3.page-title Edit Deploy Key +- page_title _('Edit Deploy Key') +%h3.page-title= _("Edit Deploy Key") %hr %div = form_for [@project.namespace.becomes(Namespace), @project, @deploy_key], html: { class: 'js-requires-input' } do |f| = render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key } .form-actions - = f.submit 'Save changes', class: 'btn-save btn' - = link_to 'Cancel', project_settings_repository_path(@project), class: 'btn btn-cancel' + = f.submit _('Save changes'), class: 'btn-save btn' + = link_to _('Cancel'), project_settings_repository_path(@project), class: 'btn btn-cancel' diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0ea8789d6cbfc5..5286c65b572c68 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -402,6 +402,9 @@ msgstr "" msgid "Add additional text to appear in all email communications. %{character_limit} character limit" msgstr "" +msgid "Add key" +msgstr "" + msgid "Add new application" msgstr "" @@ -522,6 +525,9 @@ msgstr "" msgid "Allow requests to the local network from hooks and services." msgstr "" +msgid "Allow this key to push to repository as well? (Default only allows pull access.)" +msgstr "" + msgid "Allows you to add and manage Kubernetes clusters." msgstr "" @@ -2235,6 +2241,9 @@ msgstr "" msgid "Create a new branch and merge request" msgstr "" +msgid "Create a new deploy key for this project" +msgstr "" + msgid "Create a new issue" msgstr "" @@ -2444,6 +2453,9 @@ msgstr[1] "" msgid "Deploy Keys" msgstr "" +msgid "Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one." +msgstr "" + msgid "DeployKeys|+%{count} others" msgstr "" @@ -2687,6 +2699,9 @@ msgstr "" msgid "Edit" msgstr "" +msgid "Edit Deploy Key" +msgstr "" + msgid "Edit Label" msgstr "" @@ -5056,6 +5071,9 @@ msgstr "" msgid "Password" msgstr "" +msgid "Paste a machine public key here. Read more about how to generate it %{link_to_here}" +msgstr "" + msgid "Paste your public SSH key, which is usually contained in the file '~/.ssh/id_rsa.pub' and begins with 'ssh-rsa'. Don't use your private SSH key." msgstr "" @@ -7695,6 +7713,9 @@ msgstr "" msgid "Withdraw Access Request" msgstr "" +msgid "Write access allowed" +msgstr "" + msgid "Yes" msgstr "" -- GitLab