diff options
author | Tao Wang <twang2218@gmail.com> | 2018-06-13 16:30:40 +1000 |
---|---|---|
committer | Tao Wang <twang2218@gmail.com> | 2018-07-23 16:33:37 +1000 |
commit | dc157729b3407c265854b55cd90ec75dc50b20f2 (patch) | |
tree | ebec6e0046d54c8cce47f1b379577ebdbaa3b727 | |
parent | dc7b4b7bb97ead6fca1eefad5f56c8db5db00f93 (diff) | |
download | gitlab-ce-dc157729b3407c265854b55cd90ec75dc50b20f2.tar.gz |
i18n: externalize strings from 'app/views/layouts'
Signed-off-by: Tao Wang <twang2218@gmail.com>
29 files changed, 371 insertions, 232 deletions
diff --git a/app/views/layouts/_recaptcha_verification.html.haml b/app/views/layouts/_recaptcha_verification.html.haml index e6f87ddd383..3405fb9d5ef 100644 --- a/app/views/layouts/_recaptcha_verification.html.haml +++ b/app/views/layouts/_recaptcha_verification.html.haml @@ -1,10 +1,10 @@ - humanized_resource_name = spammable.class.model_name.human.downcase %h3.page-title - Anti-spam verification + = _('Anti-spam verification') %hr %p - #{"We detected potential spam in the #{humanized_resource_name}. Please solve the reCAPTCHA to proceed."} + = _("We detected potential spam in the %{humanized_resource_name}. Please solve the reCAPTCHA to proceed.") % { humanized_resource_name: humanized_resource_name } = render 'shared/recaptcha_form', spammable: spammable diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index 91f796adb2e..556ad8cf306 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -1,7 +1,7 @@ - if controller.controller_path =~ /^groups/ && @group.persisted? - - label = 'This group' + - label = _('This group') - if controller.controller_path =~ /^projects/ && @project.persisted? - - label = 'This project' + - label = _('This project') - if @group && @group.persisted? && @group.path - group_data_attrs = { group_path: j(@group.path), name: @group.name, issues_path: issues_group_path(j(@group.path)), mr_path: merge_requests_group_path(j(@group.path)) } - if @project && @project.persisted? @@ -13,21 +13,21 @@ .location-badge= label .search-input-wrap .dropdown{ data: { url: search_autocomplete_path } } - = search_field_tag 'search', nil, placeholder: 'Search', + = search_field_tag 'search', nil, placeholder: _('Search'), class: 'search-input dropdown-menu-toggle no-outline js-search-dashboard-options', spellcheck: false, tabindex: '1', autocomplete: 'off', data: { issues_path: issues_dashboard_path, mr_path: merge_requests_dashboard_path }, - aria: { label: 'Search' } + aria: { label: _('Search') } %button.hidden.js-dropdown-search-toggle{ type: 'button', data: { toggle: 'dropdown' } } .dropdown-menu.dropdown-select = dropdown_content do %ul %li.dropdown-menu-empty-item %a - Loading... + = _('Loading...') = dropdown_loading = sprite_icon('search', size: 16, css_class: 'search-icon') = sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input') diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 8595157a997..31259b8ac25 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -1,5 +1,5 @@ -- page_title "Admin Area" -- header_title "Admin Area", admin_root_path +- page_title _("Admin Area") +- header_title _("Admin Area"), admin_root_path - nav "admin" - @left_sidebar = true diff --git a/app/views/layouts/dashboard.html.haml b/app/views/layouts/dashboard.html.haml index cb96bcc2cf4..489ef245a4d 100644 --- a/app/views/layouts/dashboard.html.haml +++ b/app/views/layouts/dashboard.html.haml @@ -1,5 +1,5 @@ -- page_title "Dashboard" -- header_title "Dashboard", root_path unless header_title +- page_title _("Dashboard") +- header_title _("Dashboard"), root_path unless header_title - sidebar "dashboard" = render template: "layouts/application" diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml index 81f35615555..43bd07679ba 100644 --- a/app/views/layouts/devise.html.haml +++ b/app/views/layouts/devise.html.haml @@ -17,12 +17,11 @@ - if current_appearance&.description? = brand_text - else - %h3 Open source software to collaborate on code + %h3 + = _('Open source software to collaborate on code') %p - Manage Git repositories with fine-grained access controls that keep your code secure. - Perform code reviews and enhance collaboration with merge requests. - Each project can also have an issue tracker and a wiki. + = _('Manage Git repositories with fine-grained access controls that keep your code secure. Perform code reviews and enhance collaboration with merge requests. Each project can also have an issue tracker and a wiki.') - if Gitlab::CurrentSettings.sign_in_text.present? = markdown_field(Gitlab::CurrentSettings.current_application_settings, :sign_in_text) @@ -32,6 +31,6 @@ %hr.footer-fixed .container.footer-container .footer-links - = link_to "Explore", explore_root_path - = link_to "Help", help_path - = link_to "About GitLab", "https://about.gitlab.com/" + = link_to _("Explore"), explore_root_path + = link_to _("Help"), help_path + = link_to _("About GitLab"), "https://about.gitlab.com/" diff --git a/app/views/layouts/devise_empty.html.haml b/app/views/layouts/devise_empty.html.haml index 52805e0da73..663e5b24368 100644 --- a/app/views/layouts/devise_empty.html.haml +++ b/app/views/layouts/devise_empty.html.haml @@ -12,6 +12,6 @@ %hr .container .footer-links - = link_to "Explore", explore_root_path - = link_to "Help", help_path - = link_to "About GitLab", "https://about.gitlab.com/" + = link_to _("Explore"), explore_root_path + = link_to _("Help"), help_path + = link_to _("About GitLab"), "https://about.gitlab.com/" diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml index df65792be73..2ab9e55441b 100644 --- a/app/views/layouts/explore.html.haml +++ b/app/views/layouts/explore.html.haml @@ -1,5 +1,5 @@ -- page_title "Explore" +- page_title = _("Explore") - unless current_user - - header_title "Explore GitLab", explore_root_path + - header_title = _("Explore GitLab"), explore_root_path = render template: "layouts/application" diff --git a/app/views/layouts/group_settings.html.haml b/app/views/layouts/group_settings.html.haml index 66b115e36de..14c5f0ce04c 100644 --- a/app/views/layouts/group_settings.html.haml +++ b/app/views/layouts/group_settings.html.haml @@ -1,4 +1,4 @@ -- page_title "Settings" +- page_title = _("Settings") - nav "group" = render template: "layouts/group" diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 3aa8eb18bf3..97c04dda8cb 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -4,7 +4,7 @@ .header-content .title-container %h1.title - = link_to root_path, title: 'Dashboard', id: 'logo' do + = link_to root_path, title: _('Dashboard'), id: 'logo' do = brand_header_logo - logo_text = brand_header_logo_type - if logo_text.present? @@ -24,26 +24,26 @@ %li.nav-item.d-none.d-sm-none.d-md-block.m-auto = render 'layouts/search' unless current_controller?(:search) %li.nav-item.d-inline-block.d-sm-none.d-md-none - = link_to search_path, title: 'Search', aria: { label: "Search" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to search_path, title: _('Search'), aria: { label: _("Search") }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('search', size: 16) - if header_link?(:issues) = nav_link(path: 'dashboard#issues', html_options: { class: "user-counter" }) do - = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'dashboard-shortcuts-issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to assigned_issues_dashboard_path, title: _('Issues'), class: 'dashboard-shortcuts-issues', aria: { label: _("Issues") }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('issues', size: 16) - issues_count = assigned_issuables_count(:issues) %span.badge.badge-pill.issues-count{ class: ('hidden' if issues_count.zero?) } = number_with_delimiter(issues_count) - if header_link?(:merge_requests) = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter" }) do - = link_to assigned_mrs_dashboard_path, title: 'Merge requests', class: 'dashboard-shortcuts-merge_requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to assigned_mrs_dashboard_path, title: _('Merge requests'), class: 'dashboard-shortcuts-merge_requests', aria: { label: _("Merge requests") }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('git-merge', size: 16) - merge_requests_count = assigned_issuables_count(:merge_requests) %span.badge.badge-pill.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) } = number_with_delimiter(merge_requests_count) - if header_link?(:todos) = nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do - = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to dashboard_todos_path, title: _('Todos'), aria: { label: _("Todos") }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('todo-done', size: 16) %span.badge.badge-pill.todos-count{ class: ('hidden' if todos_pending_count.zero?) } = todos_count_format(todos_pending_count) @@ -56,16 +56,16 @@ = render 'layouts/header/current_user_dropdown' - if header_link?(:admin_impersonation) %li.nav-item.impersonation - = link_to admin_impersonation_path, class: 'nav-link impersonation-btn', method: :delete, title: "Stop impersonation", aria: { label: 'Stop impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do + = link_to admin_impersonation_path, class: 'nav-link impersonation-btn', method: :delete, title: _("Stop impersonation"), aria: { label: _('Stop impersonation') }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do = icon('user-secret') - if header_link?(:sign_in) %li.nav-item %div - - sign_in_text = allow_signup? ? 'Sign in / Register' : 'Sign in' + - sign_in_text = allow_signup? ? _('Sign in / Register') : _('Sign in') = link_to sign_in_text, new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in' %button.navbar-toggler.d-block.d-sm-none{ type: 'button' } - %span.sr-only Toggle navigation + %span.sr-only= _("Toggle navigation") = sprite_icon('more', size: 12, css_class: 'more-icon js-navbar-toggle-right') = sprite_icon('close', size: 12, css_class: 'close-icon js-navbar-toggle-left') diff --git a/app/views/layouts/header/_new_dropdown.haml b/app/views/layouts/header/_new_dropdown.haml index 792291bde75..e134f416c70 100644 --- a/app/views/layouts/header/_new_dropdown.haml +++ b/app/views/layouts/header/_new_dropdown.haml @@ -1,5 +1,5 @@ %li.header-new.dropdown - = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: "New...", ref: 'tooltip', aria: { label: "New..." }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do + = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: _("New..."), ref: 'tooltip', aria: { label: _("New...") }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do = sprite_icon('plus-square', size: 16) = sprite_icon('angle-down', css_class: 'caret-down') .dropdown-menu.dropdown-menu-right @@ -8,13 +8,14 @@ - create_group_project = can?(current_user, :create_projects, @group) - create_group_subgroup = can?(current_user, :create_subgroup, @group) - if create_group_project || create_group_subgroup - %li.dropdown-bold-header This group + %li.dropdown-bold-header + = _('This group') - if create_group_project %li.header-new-group-project - = link_to 'New project', new_project_path(namespace_id: @group.id) + = link_to _('New project'), new_project_path(namespace_id: @group.id) - if create_group_subgroup %li - = link_to 'New subgroup', new_group_path(parent_id: @group.id) + = link_to _('New subgroup'), new_group_path(parent_id: @group.id) %li.divider %li.dropdown-bold-header GitLab @@ -23,23 +24,24 @@ - merge_project = merge_request_source_project_for_project(@project) - create_project_snippet = can?(current_user, :create_project_snippet, @project) - if create_project_issue || merge_project || create_project_snippet - %li.dropdown-bold-header This project + %li.dropdown-bold-header + = _('This project') - if create_project_issue %li - = link_to 'New issue', new_project_issue_path(@project) + = link_to _('New issue'), new_project_issue_path(@project) - if merge_project %li - = link_to 'New merge request', project_new_merge_request_path(merge_project) + = link_to _('New merge request'), project_new_merge_request_path(merge_project) - if create_project_snippet %li.header-new-project-snippet - = link_to 'New snippet', new_project_snippet_path(@project) + = link_to _('New snippet'), new_project_snippet_path(@project) %li.divider %li.dropdown-bold-header GitLab - if current_user.can_create_project? %li - = link_to 'New project', new_project_path, class: 'qa-global-new-project-link' + = link_to _('New project'), new_project_path, class: 'qa-global-new-project-link' - if current_user.can_create_group? %li - = link_to 'New group', new_group_path + = link_to _('New group'), new_group_path %li - = link_to 'New snippet', new_snippet_path + = link_to _('New snippet'), new_snippet_path diff --git a/app/views/layouts/help.html.haml b/app/views/layouts/help.html.haml index 78927bfffcd..a913bea0c93 100644 --- a/app/views/layouts/help.html.haml +++ b/app/views/layouts/help.html.haml @@ -1,5 +1,5 @@ -- @breadcrumb_title = "Help" -- page_title "Help" -- header_title "Help", help_path +- @breadcrumb_title = _("Help") +- page_title _("Help") +- header_title _("Help"), help_path = render template: "layouts/application" diff --git a/app/views/layouts/koding.html.haml b/app/views/layouts/koding.html.haml index 22319bba745..45ccd38f687 100644 --- a/app/views/layouts/koding.html.haml +++ b/app/views/layouts/koding.html.haml @@ -1,5 +1,5 @@ -- page_title "Koding" -- page_description "Koding Dashboard" -- header_title "Koding", koding_path +- page_title _("Koding") +- page_description _("Koding Dashboard") +- header_title _("Koding"), koding_path = render template: "layouts/application" diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb index 8e20c4a4b2a..8e11174f8d7 100644 --- a/app/views/layouts/mailer.text.erb +++ b/app/views/layouts/mailer.text.erb @@ -1,4 +1,4 @@ <%= yield -%> -- <%# signature marker %> -You're receiving this email because of your account on <%= Gitlab.config.gitlab.host %>. +<%= _("You're receiving this email because of your account on %{host}.") % { host: Gitlab.config.gitlab.host } %> diff --git a/app/views/layouts/mailer/devise.html.haml b/app/views/layouts/mailer/devise.html.haml index 054b2c2fa26..beaaaa5cd68 100644 --- a/app/views/layouts/mailer/devise.html.haml +++ b/app/views/layouts/mailer/devise.html.haml @@ -3,17 +3,17 @@ %tr %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5c5c5c;" } %div - Everyone can contribute + = _('Everyone can contribute') %div - = link_to 'Blog', 'https://about.gitlab.com/blog/', style: "color:#3777b0;text-decoration:none;" + = link_to _('Blog'), 'https://about.gitlab.com/blog/', style: "color:#3777b0;text-decoration:none;" · - = link_to 'Twitter', 'https://twitter.com/gitlab', style: "color:#3777b0;text-decoration:none;" + = link_to _('Twitter'), 'https://twitter.com/gitlab', style: "color:#3777b0;text-decoration:none;" · - = link_to 'Facebook', 'https://www.facebook.com/gitlab/', style: "color:#3777b0;text-decoration:none;" + = link_to _('Facebook'), 'https://www.facebook.com/gitlab/', style: "color:#3777b0;text-decoration:none;" · - = link_to 'YouTube', 'https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg', style: "color:#3777b0;text-decoration:none;" + = link_to _('YouTube'), 'https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg', style: "color:#3777b0;text-decoration:none;" · - = link_to 'LinkedIn', 'https://www.linkedin.com/company/gitlab-com', style: "color:#3777b0;text-decoration:none;" + = link_to _('LinkedIn'), 'https://www.linkedin.com/company/gitlab-com', style: "color:#3777b0;text-decoration:none;" = render layout: 'layouts/mailer' do %tr diff --git a/app/views/layouts/nav/_breadcrumbs.html.haml b/app/views/layouts/nav/_breadcrumbs.html.haml index 002922e13f1..f53bd2b5e4d 100644 --- a/app/views/layouts/nav/_breadcrumbs.html.haml +++ b/app/views/layouts/nav/_breadcrumbs.html.haml @@ -5,7 +5,7 @@ .breadcrumbs-container - if defined?(@left_sidebar) = button_tag class: 'toggle-mobile-nav', type: 'button' do - %span.sr-only Open sidebar + %span.sr-only= _("Open sidebar") = icon ('bars') .breadcrumbs-links.js-title-container %ul.list-unstyled.breadcrumbs-list.js-breadcrumbs-list diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 4029287fc0e..a71a4b13a7e 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -2,7 +2,7 @@ - if dashboard_nav_link?(:projects) = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: { id: 'nav-projects-dropdown', class: "home dropdown header-projects qa-projects-dropdown" }) do %button{ type: 'button', data: { toggle: "dropdown" } } - Projects + = _('Projects') = sprite_icon('angle-down', css_class: 'caret-down') .dropdown-menu.frequent-items-dropdown-menu = render "layouts/nav/projects_dropdown/show" @@ -10,68 +10,68 @@ - if dashboard_nav_link?(:groups) = nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "home dropdown header-groups qa-groups-dropdown" }) do %button{ type: 'button', data: { toggle: "dropdown" } } - Groups + = _('Groups') = sprite_icon('angle-down', css_class: 'caret-down') .dropdown-menu.frequent-items-dropdown-menu = render "layouts/nav/groups_dropdown/show" - if dashboard_nav_link?(:activity) = nav_link(path: 'dashboard#activity', html_options: { class: "d-none d-lg-block d-xl-block" }) do - = link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: 'Activity' do - Activity + = link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: _('Activity') do + = _('Activity') - if dashboard_nav_link?(:milestones) = nav_link(controller: 'dashboard/milestones', html_options: { class: "d-none d-lg-block d-xl-block" }) do - = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: 'Milestones' do - Milestones + = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do + = _('Milestones') - if dashboard_nav_link?(:snippets) = nav_link(controller: 'dashboard/snippets', html_options: { class: "d-none d-lg-block d-xl-block" }) do - = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: 'Snippets' do - Snippets + = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do + = _('Snippets') - if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets]) %li.header-more.dropdown.d-lg-none.d-xl-none %a{ href: "#", data: { toggle: "dropdown" } } - More + = _('More') = sprite_icon('angle-down', css_class: 'caret-down') .dropdown-menu %ul - if dashboard_nav_link?(:activity) = nav_link(path: 'dashboard#activity') do - = link_to activity_dashboard_path, title: 'Activity' do - Activity + = link_to activity_dashboard_path, title: _('Activity') do + = _('Activity') - if dashboard_nav_link?(:milestones) = nav_link(controller: 'dashboard/milestones') do - = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: 'Milestones' do - Milestones + = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do + = _('Milestones') - if dashboard_nav_link?(:snippets) = nav_link(controller: 'dashboard/snippets') do - = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: 'Snippets' do - Snippets + = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do + = _('Snippets') -# Shortcut to Dashboard > Projects - if dashboard_nav_link?(:projects) %li.hidden - = link_to dashboard_projects_path, title: 'Projects', class: 'dashboard-shortcuts-projects' do - Projects + = link_to dashboard_projects_path, title: _('Projects'), class: 'dashboard-shortcuts-projects' do + = _('Projects') - if current_controller?('ide') %li.line-separator.d-none.d-sm-block = nav_link(controller: 'ide') do - = link_to '#', class: 'dashboard-shortcuts-web-ide', title: 'Web IDE' do - Web IDE + = link_to '#', class: 'dashboard-shortcuts-web-ide', title: _('Web IDE') do + = _('Web IDE') - if current_user.admin? || Gitlab::Sherlock.enabled? %li.line-separator.d-none.d-sm-block - if current_user.admin? = nav_link(controller: 'admin/dashboard') do - = link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: 'Admin area', aria: { label: "Admin area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin area'), aria: { label: _("Admin area") }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('admin', size: 18) - if Gitlab::Sherlock.enabled? %li - = link_to sherlock_transactions_path, class: 'admin-icon', title: 'Sherlock Transactions', + = link_to sherlock_transactions_path, class: 'admin-icon', title: _('Sherlock Transactions'), data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = icon('tachometer fw') diff --git a/app/views/layouts/nav/_explore.html.haml b/app/views/layouts/nav/_explore.html.haml index 50bde9d1754..7d18cd8978b 100644 --- a/app/views/layouts/nav/_explore.html.haml +++ b/app/views/layouts/nav/_explore.html.haml @@ -1,15 +1,15 @@ %ul.list-unstyled.navbar-sub-nav - if explore_nav_link?(:projects) = nav_link(path: ['dashboard#show', 'root#show', 'projects#trending', 'projects#starred', 'projects#index'], html_options: {class: 'home'}) do - = link_to explore_root_path, title: 'Projects', class: 'dashboard-shortcuts-projects' do - Projects + = link_to explore_root_path, title: _('Projects'), class: 'dashboard-shortcuts-projects' do + = _('Projects') - if explore_nav_link?(:groups) = nav_link(controller: [:groups, 'groups/milestones', 'groups/group_members']) do - = link_to explore_groups_path, title: 'Groups', class: 'dashboard-shortcuts-groups' do - Groups + = link_to explore_groups_path, title: _('Groups'), class: 'dashboard-shortcuts-groups' do + = _('Groups') - if explore_nav_link?(:snippets) = nav_link(controller: :snippets) do - = link_to explore_snippets_path, title: 'Snippets', class: 'dashboard-shortcuts-snippets' do - Snippets + = link_to explore_snippets_path, title: _('Snippets'), class: 'dashboard-shortcuts-snippets' do + = _('Snippets') %li - = link_to "Help", help_path, title: 'About GitLab CE' + = link_to _("Help"), help_path, title: _('About GitLab CE') diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index 4c73da4c75b..0047efa363d 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -1,142 +1,143 @@ .nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) } .nav-sidebar-inner-scroll .context-header - = link_to admin_root_path, title: 'Admin Overview' do + = link_to admin_root_path, title: _('Admin Overview') do .avatar-container.s40.settings-avatar = sprite_icon('admin', size: 24) - .sidebar-context-title Admin Area + .sidebar-context-title + = _('Admin Area') %ul.sidebar-top-level-items = nav_link(controller: %w(dashboard admin projects users groups jobs runners gitaly_servers cohorts conversational_development_index), html_options: {class: 'home'}) do = link_to admin_root_path, class: 'shortcuts-tree' do .nav-icon-container = sprite_icon('overview') %span.nav-item-name - Overview + = _('Overview') %ul.sidebar-sub-level-items = nav_link(controller: %w(dashboard admin projects users groups jobs runners gitaly_servers cohorts conversational_development_index), html_options: { class: "fly-out-top-item" } ) do = link_to admin_root_path do %strong.fly-out-top-item-name - #{ _('Overview') } + = _('Overview') %li.divider.fly-out-top-item = nav_link(controller: :dashboard, html_options: {class: 'home'}) do - = link_to admin_root_path, title: 'Overview' do + = link_to admin_root_path, title: _('Overview') do %span - Dashboard + = _('Dashboard') = nav_link(controller: [:admin, :projects]) do - = link_to admin_projects_path, title: 'Projects' do + = link_to admin_projects_path, title: _('Projects') do %span - Projects + = _('Projects') = nav_link(controller: :users) do - = link_to admin_users_path, title: 'Users' do + = link_to admin_users_path, title: _('Users') do %span - Users + = _('Users') = nav_link(controller: :groups) do - = link_to admin_groups_path, title: 'Groups' do + = link_to admin_groups_path, title: _('Groups') do %span - Groups + = _('Groups') = nav_link path: 'jobs#index' do - = link_to admin_jobs_path, title: 'Jobs' do + = link_to admin_jobs_path, title: _('Jobs') do %span - Jobs + = _('Jobs') = nav_link path: ['runners#index', 'runners#show'] do - = link_to admin_runners_path, title: 'Runners' do + = link_to admin_runners_path, title: _('Runners') do %span - Runners + = _('Runners') = nav_link(controller: :gitaly_servers) do = link_to admin_gitaly_servers_path, title: 'Gitaly Servers' do %span - Gitaly Servers + = _('Gitaly Servers') = nav_link path: 'cohorts#index' do - = link_to admin_cohorts_path, title: 'Cohorts' do + = link_to admin_cohorts_path, title: _('Cohorts') do %span - Cohorts + = _('Cohorts') = nav_link(controller: :conversational_development_index) do - = link_to admin_conversational_development_index_path, title: 'ConvDev Index' do + = link_to admin_conversational_development_index_path, title: _('ConvDev Index') do %span - ConvDev Index + = _('ConvDev Index') = nav_link(controller: %w(system_info background_jobs logs health_check requests_profiles)) do = link_to admin_system_info_path do .nav-icon-container = sprite_icon('monitor') %span.nav-item-name - Monitoring + = _('Monitoring') %ul.sidebar-sub-level-items = nav_link(controller: %w(system_info background_jobs logs health_check requests_profiles), html_options: { class: "fly-out-top-item" } ) do = link_to admin_system_info_path do %strong.fly-out-top-item-name - #{ _('Monitoring') } + = _('Monitoring') %li.divider.fly-out-top-item = nav_link(controller: :system_info) do - = link_to admin_system_info_path, title: 'System Info' do + = link_to admin_system_info_path, title: _('System Info') do %span - System Info + = _('System Info') = nav_link(controller: :background_jobs) do - = link_to admin_background_jobs_path, title: 'Background Jobs' do + = link_to admin_background_jobs_path, title: _('Background Jobs') do %span - Background Jobs + = _('Background Jobs') = nav_link(controller: :logs) do - = link_to admin_logs_path, title: 'Logs' do + = link_to admin_logs_path, title: _('Logs') do %span - Logs + = _('Logs') = nav_link(controller: :health_check) do - = link_to admin_health_check_path, title: 'Health Check' do + = link_to admin_health_check_path, title: _('Health Check') do %span - Health Check + = _('Health Check') = nav_link(controller: :requests_profiles) do - = link_to admin_requests_profiles_path, title: 'Requests Profiles' do + = link_to admin_requests_profiles_path, title: _('Requests Profiles') do %span - Requests Profiles + = _('Requests Profiles') = nav_link(controller: :broadcast_messages) do = link_to admin_broadcast_messages_path do .nav-icon-container = sprite_icon('messages') %span.nav-item-name - Messages + = _('Messages') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :broadcast_messages, html_options: { class: "fly-out-top-item" } ) do = link_to admin_broadcast_messages_path do %strong.fly-out-top-item-name - #{ _('Messages') } + = _('Messages') = nav_link(controller: [:hooks, :hook_logs]) do = link_to admin_hooks_path do .nav-icon-container = sprite_icon('hook') %span.nav-item-name - System Hooks + = _('System Hooks') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: [:hooks, :hook_logs], html_options: { class: "fly-out-top-item" } ) do = link_to admin_hooks_path do %strong.fly-out-top-item-name - #{ _('System Hooks') } + = _('System Hooks') = nav_link(controller: :applications) do = link_to admin_applications_path do .nav-icon-container = sprite_icon('applications') %span.nav-item-name - Applications + = _('Applications') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :applications, html_options: { class: "fly-out-top-item" } ) do = link_to admin_applications_path do %strong.fly-out-top-item-name - #{ _('Applications') } + = _('Applications') = nav_link(controller: :abuse_reports) do = link_to admin_abuse_reports_path do .nav-icon-container = sprite_icon('slight-frown') %span.nav-item-name - Abuse Reports + = _('Abuse Reports') %span.badge.badge-pill.count= number_with_delimiter(AbuseReport.count(:all)) %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" } ) do = link_to admin_abuse_reports_path do %strong.fly-out-top-item-name - #{ _('Abuse Reports') } + = _('Abuse Reports') %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(AbuseReport.count(:all)) - if akismet_enabled? @@ -145,71 +146,71 @@ .nav-icon-container = sprite_icon('spam') %span.nav-item-name - Spam Logs + = _('Spam Logs') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :spam_logs, html_options: { class: "fly-out-top-item" } ) do = link_to admin_spam_logs_path do %strong.fly-out-top-item-name - #{ _('Spam Logs') } + = _('Spam Logs') = nav_link(controller: :deploy_keys) do = link_to admin_deploy_keys_path do .nav-icon-container = sprite_icon('key') %span.nav-item-name - Deploy Keys + = _('Deploy Keys') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :deploy_keys, html_options: { class: "fly-out-top-item" } ) do = link_to admin_deploy_keys_path do %strong.fly-out-top-item-name - #{ _('Deploy Keys') } + = _('Deploy Keys') = nav_link(controller: :services) do = link_to admin_application_settings_services_path do .nav-icon-container = sprite_icon('template') %span.nav-item-name - Service Templates + = _('Service Templates') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :services, html_options: { class: "fly-out-top-item" } ) do = link_to admin_application_settings_services_path do %strong.fly-out-top-item-name - #{ _('Service Templates') } + = _('Service Templates') = nav_link(controller: :labels) do = link_to admin_labels_path do .nav-icon-container = sprite_icon('labels') %span.nav-item-name - Labels + = _('Labels') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :labels, html_options: { class: "fly-out-top-item" } ) do = link_to admin_labels_path do %strong.fly-out-top-item-name - #{ _('Labels') } + = _('Labels') = nav_link(controller: :appearances) do = link_to admin_appearances_path do .nav-icon-container = sprite_icon('appearance') %span.nav-item-name - Appearance + = _('Appearance') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :appearances, html_options: { class: "fly-out-top-item" } ) do = link_to admin_appearances_path do %strong.fly-out-top-item-name - #{ _('Appearance') } + = _('Appearance') = nav_link(controller: :application_settings) do = link_to admin_application_settings_path do .nav-icon-container = sprite_icon('settings') %span.nav-item-name - Settings + = _('Settings') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :application_settings, html_options: { class: "fly-out-top-item" } ) do = link_to admin_application_settings_path do %strong.fly-out-top-item-name - #{ _('Settings') } + = _('Settings') = render 'shared/sidebar_toggle_button' diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index 39a033337ff..0a3b5ec7eea 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -17,24 +17,24 @@ .nav-icon-container = sprite_icon('project') %span.nav-item-name - Overview + = _('Overview') %ul.sidebar-sub-level-items = nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups'], html_options: { class: "fly-out-top-item" } ) do = link_to group_path(@group) do %strong.fly-out-top-item-name - #{ _('Overview') } + = _('Overview') %li.divider.fly-out-top-item = nav_link(path: ['groups#show', 'groups#subgroups'], html_options: { class: 'home' }) do - = link_to group_path(@group), title: 'Group details' do + = link_to group_path(@group), title: _('Group details') do %span - Details + = _('Details') - if group_sidebar_link?(:activity) = nav_link(path: 'groups#activity') do - = link_to activity_group_path(@group), title: 'Activity' do + = link_to activity_group_path(@group), title: _('Activity') do %span - Activity + = _('Activity') - if group_sidebar_link?(:issues) = nav_link(path: issues_sub_menu_items) do @@ -42,21 +42,21 @@ .nav-icon-container = sprite_icon('issues') %span.nav-item-name - Issues + = _('Issues') %span.badge.badge-pill.count= number_with_delimiter(issues_count) %ul.sidebar-sub-level-items = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do = link_to issues_group_path(@group) do %strong.fly-out-top-item-name - #{ _('Issues') } + = _('Issues') %span.badge.badge-pill.count.issue_counter.fly-out-badge= number_with_delimiter(issues_count) %li.divider.fly-out-top-item = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do - = link_to issues_group_path(@group), title: 'List' do + = link_to issues_group_path(@group), title: _('List') do %span - List + = _('List') - if group_sidebar_link?(:boards) = nav_link(path: ['boards#index', 'boards#show']) do @@ -66,15 +66,15 @@ - if group_sidebar_link?(:labels) = nav_link(path: 'labels#index') do - = link_to group_labels_path(@group), title: 'Labels' do + = link_to group_labels_path(@group), title: _('Labels') do %span - Labels + = _('Labels') - if group_sidebar_link?(:milestones) = nav_link(path: 'milestones#index') do - = link_to group_milestones_path(@group), title: 'Milestones' do + = link_to group_milestones_path(@group), title: _('Milestones') do %span - Milestones + = _('Milestones') - if group_sidebar_link?(:merge_requests) = nav_link(path: 'groups#merge_requests') do @@ -82,13 +82,13 @@ .nav-icon-container = sprite_icon('git-merge') %span.nav-item-name - Merge Requests + = _('Merge Requests') %span.badge.badge-pill.count= number_with_delimiter(merge_requests_count) %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do = link_to merge_requests_group_path(@group) do %strong.fly-out-top-item-name - #{ _('Merge Requests') } + = _('Merge Requests') %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count) - if group_sidebar_link?(:group_members) @@ -97,12 +97,12 @@ .nav-icon-container = sprite_icon('users') %span.nav-item-name - Members + = _('Members') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(path: 'group_members#index', html_options: { class: "fly-out-top-item" } ) do = link_to group_group_members_path(@group) do %strong.fly-out-top-item-name - #{ _('Members') } + = _('Members') - if group_sidebar_link?(:settings) = nav_link(path: group_nav_link_paths) do @@ -110,17 +110,17 @@ .nav-icon-container = sprite_icon('settings') %span.nav-item-name - Settings + = _('Settings') %ul.sidebar-sub-level-items = nav_link(path: %w[groups#projects groups#edit badges#index ci_cd#show], html_options: { class: "fly-out-top-item" } ) do = link_to edit_group_path(@group) do %strong.fly-out-top-item-name - #{ _('Settings') } + = _('Settings') %li.divider.fly-out-top-item = nav_link(path: 'groups#edit') do - = link_to edit_group_path(@group), title: 'General' do + = link_to edit_group_path(@group), title: _('General') do %span - General + = _('General') = nav_link(controller: :badges) do = link_to group_settings_badges_path(@group), title: _('Project Badges') do @@ -129,13 +129,13 @@ = nav_link(path: 'groups#projects') do - = link_to projects_group_path(@group), title: 'Projects' do + = link_to projects_group_path(@group), title: _('Projects') do %span - Projects + = _('Projects') = nav_link(controller: :ci_cd) do - = link_to group_settings_ci_cd_path(@group), title: 'CI / CD' do + = link_to group_settings_ci_cd_path(@group), title: _('CI / CD') do %span - CI / CD + = _('CI / CD') = render 'shared/sidebar_toggle_button' diff --git a/app/views/layouts/nav/sidebar/_profile.html.haml b/app/views/layouts/nav/sidebar/_profile.html.haml index 6cbd163dd41..94863a3460d 100644 --- a/app/views/layouts/nav/sidebar/_profile.html.haml +++ b/app/views/layouts/nav/sidebar/_profile.html.haml @@ -1,7 +1,7 @@ .nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) } .nav-sidebar-inner-scroll .context-header - = link_to profile_path, title: 'Profile Settings' do + = link_to profile_path, title: _('Profile Settings') do .avatar-container.s40.settings-avatar = sprite_icon('user', size: 24) .sidebar-context-title User Settings @@ -11,145 +11,145 @@ .nav-icon-container = sprite_icon('profile') %span.nav-item-name - Profile + = _('Profile') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(path: 'profiles#show', html_options: { class: "fly-out-top-item" } ) do = link_to profile_path do %strong.fly-out-top-item-name - #{ _('Profile') } + = _('Profile') = nav_link(controller: [:accounts, :two_factor_auths]) do = link_to profile_account_path do .nav-icon-container = sprite_icon('account') %span.nav-item-name - Account + = _('Account') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: [:accounts, :two_factor_auths], html_options: { class: "fly-out-top-item" } ) do = link_to profile_account_path do %strong.fly-out-top-item-name - #{ _('Account') } + = _('Account') - if Gitlab::CurrentSettings.user_oauth_applications? = nav_link(controller: 'oauth/applications') do = link_to applications_profile_path do .nav-icon-container = sprite_icon('applications') %span.nav-item-name - Applications + = _('Applications') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: 'oauth/applications', html_options: { class: "fly-out-top-item" } ) do = link_to applications_profile_path do %strong.fly-out-top-item-name - #{ _('Applications') } + = _('Applications') = nav_link(controller: :chat_names) do = link_to profile_chat_names_path do .nav-icon-container = sprite_icon('comment') %span.nav-item-name - Chat + = _('Chat') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :chat_names, html_options: { class: "fly-out-top-item" } ) do = link_to profile_chat_names_path do %strong.fly-out-top-item-name - #{ _('Chat') } + = _('Chat') = nav_link(controller: :personal_access_tokens) do = link_to profile_personal_access_tokens_path do .nav-icon-container = sprite_icon('token') %span.nav-item-name - Access Tokens + = _('Access Tokens') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :personal_access_tokens, html_options: { class: "fly-out-top-item" } ) do = link_to profile_personal_access_tokens_path do %strong.fly-out-top-item-name - #{ _('Access Tokens') } + = _('Access Tokens') = nav_link(controller: :emails) do = link_to profile_emails_path do .nav-icon-container = sprite_icon('mail') %span.nav-item-name - Emails + = _('Emails') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :emails, html_options: { class: "fly-out-top-item" } ) do = link_to profile_emails_path do %strong.fly-out-top-item-name - #{ _('Emails') } + = _('Emails') - if current_user.allow_password_authentication? = nav_link(controller: :passwords) do = link_to edit_profile_password_path do .nav-icon-container = sprite_icon('lock') %span.nav-item-name - Password + = _('Password') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :passwords, html_options: { class: "fly-out-top-item" } ) do = link_to edit_profile_password_path do %strong.fly-out-top-item-name - #{ _('Password') } + = _('Password') = nav_link(controller: :notifications) do = link_to profile_notifications_path do .nav-icon-container = sprite_icon('notifications') %span.nav-item-name - Notifications + = _('Notifications') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :notifications, html_options: { class: "fly-out-top-item" } ) do = link_to profile_notifications_path do %strong.fly-out-top-item-name - #{ _('Notifications') } + = _('Notifications') = nav_link(controller: :keys) do = link_to profile_keys_path do .nav-icon-container = sprite_icon('key') %span.nav-item-name - SSH Keys + = _('SSH Keys') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :keys, html_options: { class: "fly-out-top-item" } ) do = link_to profile_keys_path do %strong.fly-out-top-item-name - #{ _('SSH Keys') } + = _('SSH Keys') = nav_link(controller: :gpg_keys) do = link_to profile_gpg_keys_path do .nav-icon-container = sprite_icon('key-2') %span.nav-item-name - GPG Keys + = _('GPG Keys') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :gpg_keys, html_options: { class: "fly-out-top-item" } ) do = link_to profile_gpg_keys_path do %strong.fly-out-top-item-name - #{ _('GPG Keys') } + = _('GPG Keys') = nav_link(controller: :preferences) do = link_to profile_preferences_path do .nav-icon-container = sprite_icon('preferences') %span.nav-item-name - Preferences + = _('Preferences') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :preferences, html_options: { class: "fly-out-top-item" } ) do = link_to profile_preferences_path do %strong.fly-out-top-item-name - #{ _('Preferences') } + = _('Preferences') = nav_link(controller: :active_sessions) do = link_to profile_active_sessions_path do .nav-icon-container = sprite_icon('monitor-lines') %span.nav-item-name - Active Sessions + = _('Active Sessions') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :active_sessions, html_options: { class: "fly-out-top-item" } ) do = link_to profile_active_sessions_path do %strong.fly-out-top-item-name - #{ _('Active Sessions') } + = _('Active Sessions') = nav_link(path: 'profiles#audit_log') do = link_to audit_log_profile_path do .nav-icon-container = sprite_icon('log') %span.nav-item-name - Authentication log + = _('Authentication log') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(path: 'profiles#audit_log', html_options: { class: "fly-out-top-item" } ) do = link_to audit_log_profile_path do %strong.fly-out-top-item-name - #{ _('Authentication Log') } + = _('Authentication Log') = render 'shared/sidebar_toggle_button' diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 33de74dbaa2..0ec61df1f0a 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -105,7 +105,7 @@ = number_with_delimiter(@project.open_issues_count(current_user)) %li.divider.fly-out-top-item = nav_link(controller: :issues, action: :index) do - = link_to project_issues_path(@project), title: 'Issues' do + = link_to project_issues_path(@project), title: _('Issues') do %span = _('List') @@ -115,14 +115,14 @@ = boards_link_text = nav_link(controller: :labels) do - = link_to project_labels_path(@project), title: 'Labels' do + = link_to project_labels_path(@project), title: _('Labels') do %span = _('Labels') = render_if_exists 'projects/sidebar/issues_service_desk' = nav_link(controller: :milestones) do - = link_to project_milestones_path(@project), title: 'Milestones', class: 'qa-milestones-link' do + = link_to project_milestones_path(@project), title: _('Milestones'), class: 'qa-milestones-link' do %span = _('Milestones') - if project_nav_tab? :external_issue_tracker @@ -172,25 +172,25 @@ %li.divider.fly-out-top-item - if project_nav_tab? :pipelines = nav_link(path: ['pipelines#index', 'pipelines#show']) do - = link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do + = link_to project_pipelines_path(@project), title: _('Pipelines'), class: 'shortcuts-pipelines' do %span = _('Pipelines') - if project_nav_tab? :builds = nav_link(controller: [:jobs, :artifacts]) do - = link_to project_jobs_path(@project), title: 'Jobs', class: 'shortcuts-builds' do + = link_to project_jobs_path(@project), title: _('Jobs'), class: 'shortcuts-builds' do %span = _('Jobs') - if project_nav_tab? :pipelines = nav_link(controller: :pipeline_schedules) do - = link_to pipeline_schedules_path(@project), title: 'Schedules', class: 'shortcuts-builds' do + = link_to pipeline_schedules_path(@project), title: _('Schedules'), class: 'shortcuts-builds' do %span = _('Schedules') - if @project.feature_available?(:builds, current_user) && !@project.empty_repo? = nav_link(path: 'pipelines#charts') do - = link_to charts_project_pipelines_path(@project), title: 'Charts', class: 'shortcuts-pipelines-charts' do + = link_to charts_project_pipelines_path(@project), title: _('Charts'), class: 'shortcuts-pipelines-charts' do %span = _('Charts') @@ -242,7 +242,7 @@ %p= _('Allows you to add and manage Kubernetes clusters.') %p = _('Protip:') - = link_to 'Auto DevOps', help_page_path('topics/autodevops/index.md') + = link_to _('Auto DevOps'), help_page_path('topics/autodevops/index.md') %span= _('uses Kubernetes clusters to deploy your code!') %hr %button.btn.btn-create.btn-sm.dismiss-feature-highlight{ type: 'button' } @@ -305,11 +305,11 @@ = _('Settings') %li.divider.fly-out-top-item = nav_link(path: %w[projects#edit]) do - = link_to edit_project_path(@project), title: 'General' do + = link_to edit_project_path(@project), title: _('General') do %span = _('General') = nav_link(controller: :project_members) do - = link_to project_project_members_path(@project), title: 'Members' do + = link_to project_project_members_path(@project), title: _('Members') do %span = _('Members') - if can_edit @@ -319,21 +319,21 @@ = _('Badges') - if can_edit = nav_link(controller: [:integrations, :services, :hooks, :hook_logs]) do - = link_to project_settings_integrations_path(@project), title: 'Integrations' do + = link_to project_settings_integrations_path(@project), title: _('Integrations') do %span = _('Integrations') = nav_link(controller: :repository) do - = link_to project_settings_repository_path(@project), title: 'Repository' do + = link_to project_settings_repository_path(@project), title: _('Repository') do %span = _('Repository') - if @project.feature_available?(:builds, current_user) = nav_link(controller: :ci_cd) do - = link_to project_settings_ci_cd_path(@project), title: 'CI / CD' do + = link_to project_settings_ci_cd_path(@project), title: _('CI / CD') do %span = _('CI / CD') - if @project.pages_available? = nav_link(controller: :pages) do - = link_to project_pages_path(@project), title: 'Pages' do + = link_to project_pages_path(@project), title: _('Pages') do %span = _('Pages') @@ -341,7 +341,7 @@ - else = nav_link(controller: :project_members) do - = link_to project_settings_members_path(@project), title: 'Members', class: 'shortcuts-tree' do + = link_to project_settings_members_path(@project), title: _('Members'), class: 'shortcuts-tree' do .nav-icon-container = sprite_icon('users') %span.nav-item-name @@ -356,41 +356,41 @@ -# Shortcut to Project > Activity %li.hidden - = link_to activity_project_path(@project), title: 'Activity', class: 'shortcuts-project-activity' do + = link_to activity_project_path(@project), title: _('Activity'), class: 'shortcuts-project-activity' do %span - Activity + = _('Activity') -# Shortcut to Repository > Graph (formerly, Network) - if project_nav_tab? :network %li.hidden - = link_to project_network_path(@project, current_ref), title: 'Network', class: 'shortcuts-network' do - Graph + = link_to project_network_path(@project, current_ref), title: _('Network'), class: 'shortcuts-network' do + = _('Graph') -# Shortcut to Repository > Charts (formerly, top-nav item "Graphs") - unless @project.empty_repo? %li.hidden - = link_to charts_project_graph_path(@project, current_ref), title: 'Charts', class: 'shortcuts-repository-charts' do - Charts + = link_to charts_project_graph_path(@project, current_ref), title: _('Charts'), class: 'shortcuts-repository-charts' do + = _('Charts') -# Shortcut to Issues > New Issue - if project_nav_tab?(:issues) %li.hidden = link_to new_project_issue_path(@project), class: 'shortcuts-new-issue' do - Create a new issue + = _('Create a new issue') -# Shortcut to Pipelines > Jobs - if project_nav_tab? :builds %li.hidden - = link_to project_jobs_path(@project), title: 'Jobs', class: 'shortcuts-builds' do - Jobs + = link_to project_jobs_path(@project), title: _('Jobs'), class: 'shortcuts-builds' do + = _('Jobs') -# Shortcut to commits page - if project_nav_tab? :commits %li.hidden - = link_to project_commits_path(@project), title: 'Commits', class: 'shortcuts-commits' do - Commits + = link_to project_commits_path(@project), title: _('Commits'), class: 'shortcuts-commits' do + = _('Commits') -# Shortcut to issue boards - if project_nav_tab?(:issues) %li.hidden - = link_to 'Issue Boards', project_boards_path(@project), title: 'Issue Boards', class: 'shortcuts-issue-boards' + = link_to _('Issue Boards'), project_boards_path(@project), title: _('Issue Boards'), class: 'shortcuts-issue-boards' diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index ab8b1271212..31e02f1ee19 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -14,13 +14,12 @@ %br - if @target_url - if @reply_by_email - Reply to this email directly or - #{link_to "view it on GitLab", @target_url}. + = _('Reply to this email directly or %{view_it_on_gitlab}.') % { view_it_on_gitlab: link_to(_("view it on GitLab"), @target_url) } - else - #{link_to "View it on GitLab", @target_url}. + #{link_to _("View it on GitLab"), @target_url}. %br -# Don't link the host in the line below, one link in the email is easier to quickly click than two. - You're receiving this email because #{notification_reason_text(@reason)}. + = _("You're receiving this email because %{reason}.") % { reason: notification_reason_text(@reason) } If you'd like to receive fewer emails, you can - if @labels_url adjust your #{link_to 'label subscriptions', @labels_url}. diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 67aa05b655c..7aca64663e0 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -1,5 +1,5 @@ -- page_title "User Settings" -- header_title "User Settings", profile_path unless header_title +- page_title _("User Settings") +- header_title _("User Settings"), profile_path unless header_title - sidebar "dashboard" - nav "profile" - @left_sidebar = true diff --git a/app/views/layouts/project_settings.html.haml b/app/views/layouts/project_settings.html.haml index 4bc94bd132d..93214c2a674 100644 --- a/app/views/layouts/project_settings.html.haml +++ b/app/views/layouts/project_settings.html.haml @@ -1,4 +1,4 @@ -- page_title "Settings" +- page_title _("Settings") - nav "project" = render template: "layouts/project" diff --git a/app/views/layouts/search.html.haml b/app/views/layouts/search.html.haml index fd4c7ad21a7..dd4b9e45207 100644 --- a/app/views/layouts/search.html.haml +++ b/app/views/layouts/search.html.haml @@ -1,4 +1,4 @@ -- page_title "Search" -- header_title "Search", search_path +- page_title _("Search") +- header_title _("Search"), search_path = render template: "layouts/application" diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml index 849075a0ba5..6418500d5d1 100644 --- a/app/views/layouts/snippets.html.haml +++ b/app/views/layouts/snippets.html.haml @@ -1,4 +1,4 @@ -- header_title "Snippets", snippets_path +- header_title _("Snippets"), snippets_path - content_for :page_specific_javascripts do - if @snippet && current_user diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 75b88a2cb2f..6755c281a53 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -240,6 +240,12 @@ msgstr "" msgid "A user with write access to the source branch selected this option" msgstr "" +msgid "About GitLab" +msgstr "" + +msgid "About GitLab CE" +msgstr "" + msgid "About auto deploy" msgstr "" @@ -312,6 +318,15 @@ msgstr "" msgid "Add users to group" msgstr "" +msgid "Admin Area" +msgstr "" + +msgid "Admin Overview" +msgstr "" + +msgid "Admin area" +msgstr "" + msgid "AdminArea|Stop all jobs" msgstr "" @@ -504,6 +519,9 @@ msgstr "" msgid "Anonymous" msgstr "" +msgid "Anti-spam verification" +msgstr "" + msgid "Any" msgstr "" @@ -597,6 +615,9 @@ msgstr "" msgid "Authentication Log" msgstr "" +msgid "Authentication log" +msgstr "" + msgid "Author" msgstr "" @@ -621,6 +642,9 @@ msgstr "" msgid "Authors: %{authors}" msgstr "" +msgid "Auto DevOps" +msgstr "" + msgid "Auto DevOps enabled" msgstr "" @@ -678,6 +702,9 @@ msgstr "" msgid "Average per day: %{average}" msgstr "" +msgid "Background Jobs" +msgstr "" + msgid "Background color" msgstr "" @@ -765,6 +792,9 @@ msgstr "" msgid "Bitbucket import" msgstr "" +msgid "Blog" +msgstr "" + msgid "Boards" msgstr "" @@ -1529,6 +1559,9 @@ msgstr "" msgid "ClusterIntegration|sign up" msgstr "" +msgid "Cohorts" +msgstr "" + msgid "Collapse" msgstr "" @@ -1755,6 +1788,9 @@ msgstr "" msgid "Control the display of third party offers." msgstr "" +msgid "ConvDev Index" +msgstr "" + msgid "Copy URL to clipboard" msgstr "" @@ -1791,6 +1827,9 @@ msgstr "" msgid "Create a new branch and merge request" msgstr "" +msgid "Create a new issue" +msgstr "" + msgid "Create a personal access token on your account to pull or push via %{protocol}." msgstr "" @@ -1917,6 +1956,9 @@ msgstr "" msgid "CycleAnalyticsStage|Test" msgstr "" +msgid "Dashboard" +msgstr "" + msgid "DashboardProjects|All" msgstr "" @@ -2396,6 +2438,9 @@ msgstr "" msgid "Every week (Sundays at 4:00am)" msgstr "" +msgid "Everyone can contribute" +msgstr "" + msgid "Expand" msgstr "" @@ -2405,6 +2450,9 @@ msgstr "" msgid "Expand sidebar" msgstr "" +msgid "Explore" +msgstr "" + msgid "Explore GitLab" msgstr "" @@ -2420,6 +2468,9 @@ msgstr "" msgid "Explore public groups" msgstr "" +msgid "Facebook" +msgstr "" + msgid "Failed" msgstr "" @@ -2671,6 +2722,9 @@ msgstr "" msgid "Group avatar" msgstr "" +msgid "Group details" +msgstr "" + msgid "Group info:" msgstr "" @@ -2994,6 +3048,9 @@ msgstr "" msgid "Koding" msgstr "" +msgid "Koding Dashboard" +msgstr "" + msgid "Kubernetes" msgstr "" @@ -3116,6 +3173,9 @@ msgstr "" msgid "Leave the \"File type\" and \"Delivery method\" options on their default values." msgstr "" +msgid "LinkedIn" +msgstr "" + msgid "List" msgstr "" @@ -3152,9 +3212,15 @@ msgstr "" msgid "Locked to current projects" msgstr "" +msgid "Logs" +msgstr "" + msgid "Make sure you're logged into the account that owns the projects you'd like to import." msgstr "" +msgid "Manage Git repositories with fine-grained access controls that keep your code secure. Perform code reviews and enhance collaboration with merge requests. Each project can also have an issue tracker and a wiki." +msgstr "" + msgid "Manage access" msgstr "" @@ -3335,6 +3401,9 @@ msgstr "" msgid "Monitoring" msgstr "" +msgid "More" +msgstr "" + msgid "More actions" msgstr "" @@ -3377,6 +3446,9 @@ msgstr "" msgid "Nav|Sign out and sign in with a different account" msgstr "" +msgid "Network" +msgstr "" + msgid "New" msgstr "" @@ -3451,6 +3523,9 @@ msgstr "" msgid "New tag" msgstr "" +msgid "New..." +msgstr "" + msgid "No" msgstr "" @@ -3631,6 +3706,12 @@ msgstr "" msgid "Open in Xcode" msgstr "" +msgid "Open sidebar" +msgstr "" + +msgid "Open source software to collaborate on code" +msgstr "" + msgid "OpenedNDaysAgo|Opened" msgstr "" @@ -3931,6 +4012,9 @@ msgstr "" msgid "Profile" msgstr "" +msgid "Profile Settings" +msgstr "" + msgid "Profiles|Account scheduled for removal." msgstr "" @@ -4261,6 +4345,9 @@ msgstr "" msgid "Remove project" msgstr "" +msgid "Reply to this email directly or %{view_it_on_gitlab}." +msgstr "" + msgid "Repository" msgstr "" @@ -4282,6 +4369,9 @@ msgstr "" msgid "Request Access" msgstr "" +msgid "Requests Profiles" +msgstr "" + msgid "Require all users to accept Terms of Service and Privacy Policy when they access GitLab." msgstr "" @@ -4530,6 +4620,9 @@ msgstr "" msgid "Shared Runners" msgstr "" +msgid "Sherlock Transactions" +msgstr "" + msgid "Show command" msgstr "" @@ -4559,6 +4652,12 @@ msgstr[1] "" msgid "Side-by-side" msgstr "" +msgid "Sign in" +msgstr "" + +msgid "Sign in / Register" +msgstr "" + msgid "Sign out" msgstr "" @@ -4772,6 +4871,9 @@ msgstr "" msgid "Status" msgstr "" +msgid "Stop impersonation" +msgstr "" + msgid "Stop this environment" msgstr "" @@ -4805,6 +4907,9 @@ msgstr "" msgid "System Hooks" msgstr "" +msgid "System Info" +msgstr "" + msgid "Tag (%{tag_count})" msgid_plural "Tags (%{tag_count})" msgstr[0] "" @@ -5044,6 +5149,9 @@ msgstr "" msgid "This directory" msgstr "" +msgid "This group" +msgstr "" + msgid "This group does not provide any group Runners yet." msgstr "" @@ -5333,12 +5441,18 @@ msgstr "" msgid "Todo" msgstr "" +msgid "Todos" +msgstr "" + msgid "Toggle Sidebar" msgstr "" msgid "Toggle discussion" msgstr "" +msgid "Toggle navigation" +msgstr "" + msgid "Toggle sidebar" msgstr "" @@ -5375,6 +5489,9 @@ msgstr "" msgid "Try again" msgstr "" +msgid "Twitter" +msgstr "" + msgid "Unable to load the diff. %{button_try_again}" msgstr "" @@ -5464,6 +5581,9 @@ msgstr "" msgid "Use your global notification setting" msgstr "" +msgid "User Settings" +msgstr "" + msgid "User and IP Rate Limits" msgstr "" @@ -5497,6 +5617,9 @@ msgstr "" msgid "View group labels" msgstr "" +msgid "View it on GitLab" +msgstr "" + msgid "View jobs" msgstr "" @@ -5539,6 +5662,9 @@ msgstr "" msgid "Want to see the data? Please ask an administrator for access." msgstr "" +msgid "We detected potential spam in the %{humanized_resource_name}. Please solve the reCAPTCHA to proceed." +msgstr "" + msgid "We don't have enough data to show this stage." msgstr "" @@ -5812,9 +5938,18 @@ msgstr "" msgid "You'll need to use different branch names to get a valid comparison." msgstr "" +msgid "You're receiving this email because %{reason}." +msgstr "" + +msgid "You're receiving this email because of your account on %{host}." +msgstr "" + msgid "You're receiving this email because of your account on %{host}. %{manage_notifications_link} · %{help_link}" msgstr "" +msgid "YouTube" +msgstr "" + msgid "Your Groups" msgstr "" @@ -6130,6 +6265,9 @@ msgstr "" msgid "uses Kubernetes clusters to deploy your code!" msgstr "" +msgid "view it on GitLab" +msgstr "" + msgid "with %{additions} additions, %{deletions} deletions." msgstr "" diff --git a/qa/qa/page/menu/side.rb b/qa/qa/page/menu/side.rb index c14a835c2c9..354ccec2a5a 100644 --- a/qa/qa/page/menu/side.rb +++ b/qa/qa/page/menu/side.rb @@ -5,8 +5,8 @@ module QA view 'app/views/layouts/nav/sidebar/_project.html.haml' do element :settings_item element :settings_link, 'link_to edit_project_path' - element :repository_link, "title: 'Repository'" - element :pipelines_settings_link, "title: 'CI / CD'" + element :repository_link, "title: _('Repository')" + element :pipelines_settings_link, "title: _('CI / CD')" element :operations_kubernetes_link, "title: _('Kubernetes')" element :issues_link, /link_to.*shortcuts-issues/ element :issues_link_text, "Issues" @@ -14,7 +14,7 @@ module QA element :merge_requests_link_text, "Merge Requests" element :top_level_items, '.sidebar-top-level-items' element :operations_section, "class: 'shortcuts-operations'" - element :activity_link, "title: 'Activity'" + element :activity_link, "title: _('Activity')" element :wiki_link_text, "Wiki" element :milestones_link end diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index 1d3dad4cda0..c751b472535 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -14,7 +14,7 @@ module QA view 'app/views/layouts/header/_new_dropdown.haml' do element :new_menu_toggle - element :new_issue_link, "link_to 'New issue', new_project_issue_path(@project)" + element :new_issue_link, "link_to _('New issue'), new_project_issue_path(@project)" end view 'app/views/shared/_ref_switcher.html.haml' do |