提交 79948637 编写于 作者: K Kushal Pandya

Merge branch 'gt-externalize-app-views-projects-environments' into 'master'

Externalize strings from `/app/views/projects/environments`

See merge request gitlab-org/gitlab-ce!23210
- if environment.external_url && can?(current_user, :read_environment, environment) - if environment.external_url && can?(current_user, :read_environment, environment)
= link_to environment.external_url, target: '_blank', rel: 'noopener noreferrer', class: 'btn external-url has-tooltip qa-view-deployment', title: s_('Environments|Open live environment') do = link_to environment.external_url, target: '_blank', rel: 'noopener noreferrer', class: 'btn external-url has-tooltip qa-view-deployment', title: s_('Environments|Open live environment') do
= sprite_icon('external-link') = sprite_icon('external-link')
View deployment = _("View deployment")
.row.prepend-top-default.append-bottom-default .row.prepend-top-default.append-bottom-default
.col-lg-3 .col-lg-3
%h4.prepend-top-0 %h4.prepend-top-0
Environments = _("Environments")
%p %p
Environments allow you to track deployments of your application - link_to_read_more = link_to(_("Read more about environments"), help_page_path("ci/environments"))
= succeed "." do = _("Environments allow you to track deployments of your application %{link_to_read_more}.").html_safe % { link_to_read_more: link_to_read_more }
= link_to "Read more about environments", help_page_path("ci/environments")
= form_for [@project.namespace.becomes(Namespace), @project, @environment], html: { class: 'col-lg-9' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @environment], html: { class: 'col-lg-9' } do |f|
= form_errors(@environment) = form_errors(@environment)
.form-group .form-group
= f.label :name, 'Name', class: 'label-bold' = f.label :name, _('Name'), class: 'label-bold'
= f.text_field :name, required: true, class: 'form-control' = f.text_field :name, required: true, class: 'form-control'
.form-group .form-group
= f.label :external_url, 'External URL', class: 'label-bold' = f.label :external_url, _('External URL'), class: 'label-bold'
= f.url_field :external_url, class: 'form-control' = f.url_field :external_url, class: 'form-control'
.form-actions .form-actions
= f.submit 'Save', class: 'btn btn-success' = f.submit _('Save'), class: 'btn btn-save'
= link_to 'Cancel', project_environments_path(@project), class: 'btn btn-cancel' = link_to _('Cancel'), project_environments_path(@project), class: 'btn btn-cancel'
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
- return unless can?(current_user, :read_environment, environment) - return unless can?(current_user, :read_environment, environment)
= link_to environment_metrics_path(environment), title: 'See metrics', class: 'btn metrics-button' do = link_to environment_metrics_path(environment), title: _('See metrics'), class: 'btn metrics-button' do
= sprite_icon('chart') = sprite_icon('chart')
Monitoring = _("Monitoring")
- @no_container = true - @no_container = true
- page_title "Edit", @environment.name, "Environments" - page_title _("Edit"), @environment.name, _("Environments")
%div{ class: container_class } %div{ class: container_class }
%h3.page-title %h3.page-title
Edit environment = _('Edit environment')
%hr %hr
= render 'form' = render 'form'
- @no_container = true - @no_container = true
- page_title "Environments" - page_title _("Environments")
#environments-folder-list-view{ data: { endpoint: folder_project_environments_path(@project, @folder, format: :json), #environments-folder-list-view{ data: { endpoint: folder_project_environments_path(@project, @folder, format: :json),
"folder-name" => @folder, "folder-name" => @folder,
......
- @no_container = true - @no_container = true
- page_title "Environments" - page_title _("Environments")
- add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) - add_to_breadcrumbs(_("Pipelines"), project_pipelines_path(@project))
#environments-list-view{ data: { environments_data: environments_list_data, #environments-list-view{ data: { environments_data: environments_list_data,
"can-create-deployment" => can?(current_user, :create_deployment, @project).to_s, "can-create-deployment" => can?(current_user, :create_deployment, @project).to_s,
......
- @no_container = true - @no_container = true
- page_title "Metrics for environment", @environment.name - page_title _("Metrics for environment"), @environment.name
.prometheus-container{ class: container_class } .prometheus-container{ class: container_class }
#prometheus-graphs{ data: metrics_data(@project, @environment) } #prometheus-graphs{ data: metrics_data(@project, @environment) }
- @no_container = true - @no_container = true
- breadcrumb_title "Environments" - breadcrumb_title _("Environments")
- page_title 'New Environment' - page_title _("New Environment")
%div{ class: container_class } %div{ class: container_class }
%h3.page-title %h3.page-title
New environment = _("New environment")
%hr %hr
= render 'form' = render 'form'
- @no_container = true - @no_container = true
- add_to_breadcrumbs "Environments", project_environments_path(@project) - add_to_breadcrumbs _("Environments"), project_environments_path(@project)
- breadcrumb_title @environment.name - breadcrumb_title @environment.name
- page_title "Environments" - page_title _("Environments")
%div{ class: container_class } %div{ class: container_class }
- if can?(current_user, :stop_environment, @environment) - if can?(current_user, :stop_environment, @environment)
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
.modal-content .modal-content
.modal-header .modal-header
%h4.modal-title.d-flex.mw-100 %h4.modal-title.d-flex.mw-100
Stopping = s_("Environments|Stopping")
%span.has-tooltip.text-truncate.ml-1.mr-1.flex-fill{ title: @environment.name, data: { container: '#stop-environment-modal' } } %span.has-tooltip.text-truncate.ml-1.mr-1.flex-fill{ title: @environment.name, data: { container: '#stop-environment-modal' } }
= @environment.name = @environment.name
? ?
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
= render 'projects/environments/external_url', environment: @environment = render 'projects/environments/external_url', environment: @environment
= render 'projects/environments/metrics_button', environment: @environment = render 'projects/environments/metrics_button', environment: @environment
- if can?(current_user, :update_environment, @environment) - if can?(current_user, :update_environment, @environment)
= link_to 'Edit', edit_project_environment_path(@project, @environment), class: 'btn' = link_to _('Edit'), edit_project_environment_path(@project, @environment), class: 'btn'
- if can?(current_user, :stop_environment, @environment) - if can?(current_user, :stop_environment, @environment)
= button_tag class: 'btn btn-danger', type: 'button', data: { toggle: 'modal', = button_tag class: 'btn btn-danger', type: 'button', data: { toggle: 'modal',
target: '#stop-environment-modal' } do target: '#stop-environment-modal' } do
...@@ -52,21 +52,19 @@ ...@@ -52,21 +52,19 @@
.empty-state .empty-state
.text-content .text-content
%h4.state-title %h4.state-title
You don't have any deployments right now. = _("You don't have any deployments right now.")
%p.blank-state-text %p.blank-state-text
Define environments in the deploy stage(s) in = _("Define environments in the deploy stage(s) in <code>.gitlab-ci.yml</code> to track deployments here.").html_safe
%code .gitlab-ci.yml
to track deployments here.
.text-center .text-center
= link_to _("Read more"), help_page_path("ci/environments"), class: "btn btn-success" = link_to _("Read more"), help_page_path("ci/environments"), class: "btn btn-success"
- else - else
.table-holder .table-holder
.ci-table.environments{ role: 'grid' } .ci-table.environments{ role: 'grid' }
.gl-responsive-table-row.table-row-header{ role: 'row' } .gl-responsive-table-row.table-row-header{ role: 'row' }
.table-section.section-10{ role: 'columnheader' } ID .table-section.section-10{ role: 'columnheader' }= _('ID')
.table-section.section-30{ role: 'columnheader' } Commit .table-section.section-30{ role: 'columnheader' }= _('Commit')
.table-section.section-25{ role: 'columnheader' } Job .table-section.section-25{ role: 'columnheader' }= _('Job')
.table-section.section-15{ role: 'columnheader' } Created .table-section.section-15{ role: 'columnheader' }= _('Created')
= render @deployments = render @deployments
......
- @no_container = true - @no_container = true
- page_title "Terminal for environment", @environment.name - page_title _("Terminal for environment"), @environment.name
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= stylesheet_link_tag "xterm.css" = stylesheet_link_tag "xterm.css"
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.row .row
.col-sm-6 .col-sm-6
%h3.page-title %h3.page-title
Terminal for environment = _("Terminal for environment")
= @environment.name = @environment.name
.col-sm-6 .col-sm-6
......
...@@ -2211,6 +2211,9 @@ msgstr "" ...@@ -2211,6 +2211,9 @@ msgstr ""
msgid "Define a custom pattern with cron syntax" msgid "Define a custom pattern with cron syntax"
msgstr "" msgstr ""
msgid "Define environments in the deploy stage(s) in <code>.gitlab-ci.yml</code> to track deployments here."
msgstr ""
msgid "DelayedJobs|Are you sure you want to run %{jobName} immediately? Otherwise this job will run automatically after it's timer finishes." msgid "DelayedJobs|Are you sure you want to run %{jobName} immediately? Otherwise this job will run automatically after it's timer finishes."
msgstr "" msgstr ""
...@@ -2510,6 +2513,9 @@ msgstr "" ...@@ -2510,6 +2513,9 @@ msgstr ""
msgid "Edit application" msgid "Edit application"
msgstr "" msgstr ""
msgid "Edit environment"
msgstr ""
msgid "Edit files in the editor and commit changes here" msgid "Edit files in the editor and commit changes here"
msgstr "" msgstr ""
...@@ -2588,6 +2594,9 @@ msgstr "" ...@@ -2588,6 +2594,9 @@ msgstr ""
msgid "Environments" msgid "Environments"
msgstr "" msgstr ""
msgid "Environments allow you to track deployments of your application %{link_to_read_more}."
msgstr ""
msgid "Environments|An error occurred while fetching the environments." msgid "Environments|An error occurred while fetching the environments."
msgstr "" msgstr ""
...@@ -2657,6 +2666,9 @@ msgstr "" ...@@ -2657,6 +2666,9 @@ msgstr ""
msgid "Environments|Stop environment" msgid "Environments|Stop environment"
msgstr "" msgstr ""
msgid "Environments|Stopping"
msgstr ""
msgid "Environments|Updated" msgid "Environments|Updated"
msgstr "" msgstr ""
...@@ -2792,6 +2804,9 @@ msgstr "" ...@@ -2792,6 +2804,9 @@ msgstr ""
msgid "Explore public groups" msgid "Explore public groups"
msgstr "" msgstr ""
msgid "External URL"
msgstr ""
msgid "Facebook" msgid "Facebook"
msgstr "" msgstr ""
...@@ -3881,6 +3896,9 @@ msgstr "" ...@@ -3881,6 +3896,9 @@ msgstr ""
msgid "Metrics and profiling" msgid "Metrics and profiling"
msgstr "" msgstr ""
msgid "Metrics for environment"
msgstr ""
msgid "Metrics|Check out the CI/CD documentation on deploying to an environment" msgid "Metrics|Check out the CI/CD documentation on deploying to an environment"
msgstr "" msgstr ""
...@@ -4025,6 +4043,9 @@ msgstr "" ...@@ -4025,6 +4043,9 @@ msgstr ""
msgid "New Application" msgid "New Application"
msgstr "" msgstr ""
msgid "New Environment"
msgstr ""
msgid "New Group" msgid "New Group"
msgstr "" msgstr ""
...@@ -4057,6 +4078,9 @@ msgstr "" ...@@ -4057,6 +4078,9 @@ msgstr ""
msgid "New directory" msgid "New directory"
msgstr "" msgstr ""
msgid "New environment"
msgstr ""
msgid "New file" msgid "New file"
msgstr "" msgstr ""
...@@ -5133,6 +5157,9 @@ msgstr "" ...@@ -5133,6 +5157,9 @@ msgstr ""
msgid "Read more" msgid "Read more"
msgstr "" msgstr ""
msgid "Read more about environments"
msgstr ""
msgid "Read more about project permissions <strong>%{link_to_help}</strong>" msgid "Read more about project permissions <strong>%{link_to_help}</strong>"
msgstr "" msgstr ""
...@@ -5509,6 +5536,9 @@ msgstr "" ...@@ -5509,6 +5536,9 @@ msgstr ""
msgid "Secret" msgid "Secret"
msgstr "" msgstr ""
msgid "See metrics"
msgstr ""
msgid "Select" msgid "Select"
msgstr "" msgstr ""
...@@ -6086,6 +6116,9 @@ msgstr "" ...@@ -6086,6 +6116,9 @@ msgstr ""
msgid "Templates" msgid "Templates"
msgstr "" msgstr ""
msgid "Terminal for environment"
msgstr ""
msgid "Terms of Service Agreement and Privacy Policy" msgid "Terms of Service Agreement and Privacy Policy"
msgstr "" msgstr ""
...@@ -6897,6 +6930,9 @@ msgstr "" ...@@ -6897,6 +6930,9 @@ msgstr ""
msgid "View app" msgid "View app"
msgstr "" msgstr ""
msgid "View deployment"
msgstr ""
msgid "View file @ " msgid "View file @ "
msgstr "" msgstr ""
...@@ -7197,6 +7233,9 @@ msgstr "" ...@@ -7197,6 +7233,9 @@ msgstr ""
msgid "You don't have any authorized applications" msgid "You don't have any authorized applications"
msgstr "" msgstr ""
msgid "You don't have any deployments right now."
msgstr ""
msgid "You have no permissions" msgid "You have no permissions"
msgstr "" msgstr ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册