diff options
-rw-r--r-- | app/assets/javascripts/pipelines/components/empty_state.vue | 47 | ||||
-rw-r--r-- | app/assets/javascripts/pipelines/pipelines_bundle.js | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/images.scss | 7 | ||||
-rw-r--r-- | app/views/dashboard/todos/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/clusters/_empty_state.html.haml | 6 | ||||
-rw-r--r-- | app/views/shared/empty_states/_issues.html.haml | 21 | ||||
-rw-r--r-- | app/views/shared/empty_states/_labels.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/empty_states/_merge_requests.html.haml | 17 | ||||
-rw-r--r-- | config/no_todos_messages.yml | 6 | ||||
-rw-r--r-- | spec/features/dashboard/todos/todos_spec.rb | 2 |
10 files changed, 72 insertions, 53 deletions
diff --git a/app/assets/javascripts/pipelines/components/empty_state.vue b/app/assets/javascripts/pipelines/components/empty_state.vue index 0eaac8dd64f..78322f30685 100644 --- a/app/assets/javascripts/pipelines/components/empty_state.vue +++ b/app/assets/javascripts/pipelines/components/empty_state.vue @@ -1,36 +1,41 @@ <script> -export default { - props: { - helpPagePath: { - type: String, - required: true, + export default { + props: { + helpPagePath: { + type: String, + required: true, + }, + emptyStateSvgPath: { + type: String, + required: true, + }, }, - emptyStateSvgPath: { - type: String, - required: true, - }, - }, -}; + }; </script> - <template> <div class="row empty-state js-empty-state"> <div class="col-xs-12"> - <div class="svg-content"> - <img :src="emptyStateSvgPath"/> + <div class="svg-content svg-250"> + <img :src="emptyStateSvgPath" /> </div> </div> - <div class="col-xs-12 text-center"> + <div class="col-xs-12"> <div class="text-content"> - <h4>Build with confidence</h4> + <h4 class="text-center"> + {{ s__("Pipelines|Build with confidence") }} + </h4> <p> - Continous Integration can help catch bugs by running your tests automatically, - while Continuous Deployment can help you deliver code to your product environment. + {{ s__("Pipelines|Continous Integration can help catch bugs by running your tests automatically, while Continuous Deployment can help you deliver code to your product environment.") }} </p> - <a :href="helpPagePath" class="btn btn-info"> - Get started with Pipelines - </a> + <div class="text-center"> + <a + :href="helpPagePath" + class="btn btn-info" + > + {{ s__("Pipelines|Get started with Pipelines") }} + </a> + </div> </div> </div> </div> diff --git a/app/assets/javascripts/pipelines/pipelines_bundle.js b/app/assets/javascripts/pipelines/pipelines_bundle.js index 923d9bfb248..3e4b6eeb5bf 100644 --- a/app/assets/javascripts/pipelines/pipelines_bundle.js +++ b/app/assets/javascripts/pipelines/pipelines_bundle.js @@ -1,6 +1,9 @@ import Vue from 'vue'; import PipelinesStore from './stores/pipelines_store'; import pipelinesComponent from './components/pipelines.vue'; +import Translate from '../vue_shared/translate'; + +Vue.use(Translate); document.addEventListener('DOMContentLoaded', () => new Vue({ el: '#pipelines-list-vue', diff --git a/app/assets/stylesheets/framework/images.scss b/app/assets/stylesheets/framework/images.scss index 78a8e57ddbb..aa2d30a3cef 100644 --- a/app/assets/stylesheets/framework/images.scss +++ b/app/assets/stylesheets/framework/images.scss @@ -19,6 +19,13 @@ max-width: 425px; width: 100%; } + + &.svg-250 { + img, + svg { + width: 250px; + } + } } @mixin svg-size($size) { diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index a5686002328..20ca6ec969a 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -83,12 +83,12 @@ You're all done! - elsif current_user.todos.any? .todos-all-done - .svg-content + .svg-content.svg-250 = image_tag 'illustrations/todos_all_done.svg' - if todos_filter_empty? %h4.text-center = Gitlab.config.gitlab.no_todos_messages.sample - %p.text-center + %p Are you looking for things to do? Take a look at = succeed "," do = link_to "the opened issues", issues_dashboard_path @@ -104,7 +104,7 @@ = image_tag 'illustrations/todos_empty.svg' .todos-empty-content %h4 - Todos let you see what you should do next. + Todos let you see what you should do next %p When an issue or merge request is assigned to you, or when you %strong diff --git a/app/views/projects/clusters/_empty_state.html.haml b/app/views/projects/clusters/_empty_state.html.haml index e629cc58b06..b525f4efc83 100644 --- a/app/views/projects/clusters/_empty_state.html.haml +++ b/app/views/projects/clusters/_empty_state.html.haml @@ -1,12 +1,12 @@ .row.empty-state .col-xs-12 .svg-content= image_tag 'illustrations/clusters_empty.svg' - .col-xs-12.text-center + .col-xs-12 .text-content - %h4= s_('ClusterIntegration|Integrate cluster automation') + %h4.text-center= s_('ClusterIntegration|Integrate cluster automation') - link_to_help_page = link_to(s_('ClusterIntegration|Learn more about Clusters'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') %p= s_('ClusterIntegration|Clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page} - %p + .text-center = link_to s_('ClusterIntegration|Add cluster'), new_project_cluster_path(@project), class: 'btn btn-success' diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml index de26fa8bbf3..e039a73cd3b 100644 --- a/app/views/shared/empty_states/_issues.html.haml +++ b/app/views/shared/empty_states/_issues.html.haml @@ -6,18 +6,21 @@ .col-xs-12 .svg-content = image_tag 'illustrations/issues.svg' - .col-xs-12.text-center + .col-xs-12 .text-content - if has_button && current_user %h4 - The Issue Tracker is the place to add things that need to be improved or solved in a project + = _("The Issue Tracker is the place to add things that need to be improved or solved in a project") %p - Issues can be bugs, tasks or ideas to be discussed. - Also, issues are searchable and filterable. - - if project_select_button - = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue', type: :issues - - else - = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link' + = _("Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.") + .text-center + - if project_select_button + = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue', type: :issues + - else + = link_to 'New issue', button_path, class: 'btn btn-success', title: 'New issue', id: 'new_issue_link' - else + %h4.text-center= _("There are no issues to show") + %p + = _("The Issue Tracker is the place to add things that need to be improved or solved in a project. You can register or sign in to create issues for this project.") .text-center - %h4 There are no issues to show. + = link_to _('Register / Sign In'), new_user_session_path, class: 'btn btn-success' diff --git a/app/views/shared/empty_states/_labels.html.haml b/app/views/shared/empty_states/_labels.html.haml index a65634dce53..04db9de3606 100644 --- a/app/views/shared/empty_states/_labels.html.haml +++ b/app/views/shared/empty_states/_labels.html.haml @@ -2,10 +2,10 @@ .col-xs-12 .svg-content = image_tag 'illustrations/labels.svg' - .col-xs-12.text-center + .col-xs-12 .text-content - %h4 Labels can be applied to issues and merge requests to categorize them. - %p You can also star a label to make it a priority label. + %h4= _("Labels can be applied to issues and merge requests to categorize them.") + %p= _("You can also star a label to make it a priority label.") - if can?(current_user, :admin_label, @project) - = link_to 'New label', new_project_label_path(@project), class: 'btn btn-new', title: 'New label', id: 'new_label_link' - = link_to 'Generate a default set of labels', generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: 'Generate a default set of labels', id: 'generate_labels_link' + = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-new', title: _('New label'), id: 'new_label_link' + = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link' diff --git a/app/views/shared/empty_states/_merge_requests.html.haml b/app/views/shared/empty_states/_merge_requests.html.haml index 67f906903e9..2edf3557df4 100644 --- a/app/views/shared/empty_states/_merge_requests.html.haml +++ b/app/views/shared/empty_states/_merge_requests.html.haml @@ -6,17 +6,18 @@ .col-xs-12 .svg-content = image_tag 'illustrations/merge_requests.svg' - .col-xs-12.text-center + .col-xs-12 .text-content - if has_button %h4 - Merge requests are a place to propose changes you've made to a project and discuss those changes with others. + = _("Merge requests are a place to propose changes you've made to a project and discuss those changes with others") %p - Interested parties can even contribute by pushing commits if they want to. - - if project_select_button - = render 'shared/new_project_item_select', path: 'merge_requests/new', label: 'New merge request', type: :merge_requests - - else - = link_to 'New merge request', button_path, class: 'btn btn-new', title: 'New merge request', id: 'new_merge_request_link' + = _("Interested parties can even contribute by pushing commits if they want to.") + .text-center + - if project_select_button + = render 'shared/new_project_item_select', path: 'merge_requests/new', label: _('New merge request'), type: :merge_requests + - else + = link_to _('New merge request'), button_path, class: 'btn btn-new', title: _('New merge request'), id: 'new_merge_request_link' - else %h4.text-center - There are no merge requests to show. + = _("There are no merge requests to show") diff --git a/config/no_todos_messages.yml b/config/no_todos_messages.yml index 264a975b614..da721a9b6e6 100644 --- a/config/no_todos_messages.yml +++ b/config/no_todos_messages.yml @@ -3,9 +3,9 @@ # # If you come up with a fun one, please feel free to contribute it to GitLab! # https://about.gitlab.com/contributing/ ---- -- Good job! Looks like you don't have any todos left. +--- +- Good job! Looks like you don't have any todos left - Isn't an empty todo list beautiful? - Give yourself a pat on the back! - Nothing left to do, high five! -- Henceforth you shall be known as "Todo Destroyer". +- Henceforth you shall be known as "Todo Destroyer" diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index 6f916078b1a..94133c62b5c 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -13,7 +13,7 @@ feature 'Dashboard Todos' do end it 'shows "All done" message' do - expect(page).to have_content 'Todos let you see what you should do next.' + expect(page).to have_content 'Todos let you see what you should do next' end end |