From 884f16809adc909cfed7606ffffd366167016f5a Mon Sep 17 00:00:00 2001 From: Tao Wang Date: Thu, 14 Jun 2018 17:17:54 +1000 Subject: [PATCH] i18n: externalize strings from 'app/views/projects/blob' Signed-off-by: Tao Wang --- app/views/projects/blob/_breadcrumb.html.haml | 8 +- app/views/projects/blob/_editor.html.haml | 6 +- app/views/projects/blob/_new_dir.html.haml | 2 +- app/views/projects/blob/_remove.html.haml | 8 +- .../projects/blob/_render_error.html.haml | 2 +- .../blob/_template_selectors.html.haml | 16 +- .../projects/blob/_viewer_switcher.html.haml | 4 +- app/views/projects/blob/edit.html.haml | 15 +- app/views/projects/blob/new.html.haml | 8 +- app/views/projects/blob/preview.html.haml | 2 +- app/views/projects/blob/show.html.haml | 6 +- .../blob/viewers/_changelog.html.haml | 5 +- .../blob/viewers/_contributing.html.haml | 4 +- .../viewers/_dependency_manager.html.haml | 7 +- .../projects/blob/viewers/_download.html.haml | 2 +- .../projects/blob/viewers/_empty.html.haml | 2 +- .../blob/viewers/_gitlab_ci_yml.html.haml | 6 +- .../viewers/_gitlab_ci_yml_loading.html.haml | 4 +- .../projects/blob/viewers/_license.html.haml | 6 +- .../projects/blob/viewers/_loading.html.haml | 2 +- .../blob/viewers/_loading_auxiliary.html.haml | 2 +- .../projects/blob/viewers/_readme.html.haml | 5 +- .../blob/viewers/_route_map.html.haml | 6 +- .../blob/viewers/_route_map_loading.html.haml | 4 +- .../projects/blob/viewers/_sketch.html.haml | 2 +- .../projects/blob/viewers/_stl.html.haml | 6 +- locale/gitlab.pot | 162 ++++++++++++++++++ qa/qa/page/file/show.rb | 2 +- 28 files changed, 230 insertions(+), 74 deletions(-) diff --git a/app/views/projects/blob/_breadcrumb.html.haml b/app/views/projects/blob/_breadcrumb.html.haml index a4fb5f6ba88435..ea1ffc8da0c2f5 100644 --- a/app/views/projects/blob/_breadcrumb.html.haml +++ b/app/views/projects/blob/_breadcrumb.html.haml @@ -24,14 +24,14 @@ -# only show normal/blame view links for text files - if blob.readable_text? - if blame - = link_to 'Normal view', project_blob_path(@project, @id), + = link_to _('Normal view'), project_blob_path(@project, @id), class: 'btn' - else - = link_to 'Blame', project_blame_path(@project, @id), + = link_to _('Blame'), project_blame_path(@project, @id), class: 'btn js-blob-blame-link' unless blob.empty? - = link_to 'History', project_commits_path(@project, @id), + = link_to _('History'), project_commits_path(@project, @id), class: 'btn' - = link_to 'Permalink', project_blob_path(@project, + = link_to _('Permalink'), project_blob_path(@project, tree_join(@commit.sha, @path)), class: 'btn js-data-file-blob-permalink-url' diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 8560b72fe85b2b..522509d76a4252 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -13,17 +13,17 @@ - if current_action?(:new) || current_action?(:create) %span.editor-file-name \/ - = text_field_tag 'file_name', params[:file_name], placeholder: "File name", + = text_field_tag 'file_name', params[:file_name], placeholder: _("File name"), required: true, class: 'form-control new-file-name js-file-path-name-input' .float-right.file-buttons = button_tag class: 'soft-wrap-toggle btn', type: 'button', tabindex: '-1' do %span.no-wrap = custom_icon('icon_no_wrap') - No wrap + = _("No wrap") %span.soft-wrap = custom_icon('icon_soft_wrap') - Soft wrap + = _("Soft wrap") .encoding-selector = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2', tabindex: '-1' diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml index 6f3a691518bde1..9193ae46f08c49 100644 --- a/app/views/projects/blob/_new_dir.html.haml +++ b/app/views/projects/blob/_new_dir.html.haml @@ -16,6 +16,6 @@ .form-actions = submit_tag _("Create directory"), class: 'btn btn-create' - = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" + = link_to _("Cancel"), '#', class: "btn btn-cancel", "data-dismiss" => "modal" = render 'shared/projects/edit_information' diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml index f80bae5c88c017..c7ed9387023d26 100644 --- a/app/views/projects/blob/_remove.html.haml +++ b/app/views/projects/blob/_remove.html.haml @@ -2,15 +2,15 @@ .modal-dialog .modal-content .modal-header - %h3.page-title Delete #{@blob.name} + %h3.page-title= _("Delete %{name}") % { name: @blob.name } %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } %span{ "aria-hidden": true } × .modal-body = form_tag project_blob_path(@project, @id), method: :delete, class: 'js-delete-blob-form js-quick-submit js-requires-input' do - = render 'shared/new_commit_form', placeholder: "Delete #{@blob.name}" + = render 'shared/new_commit_form', placeholder: _("Delete %{name}") % { name: @blob.name } .form-group.row .offset-sm-2.col-sm-10 - = button_tag 'Delete file', class: 'btn btn-remove btn-remove-file' - = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" + = button_tag _('Delete file'), class: 'btn btn-remove btn-remove-file' + = link_to _("Cancel"), '#', class: "btn btn-cancel", "data-dismiss" => "modal" diff --git a/app/views/projects/blob/_render_error.html.haml b/app/views/projects/blob/_render_error.html.haml index 9eef6cafd04c95..62e7286c92acc8 100644 --- a/app/views/projects/blob/_render_error.html.haml +++ b/app/views/projects/blob/_render_error.html.haml @@ -1,6 +1,6 @@ .file-content.code .nothing-here-block - The #{viewer.switcher_title} could not be displayed because #{blob_render_error_reason(viewer)}. + = _("The %{title} could not be displayed because %{viewer}.") % { title: viewer.switcher_title, viewer: blob_render_error_reason(viewer) } You can = blob_render_error_options(viewer).to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index 5b0924274961cc..febfd9e3c6aa2b 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -1,17 +1,17 @@ .template-selectors-menu .templates-selectors-label - Template + = _("Template") .template-selector-dropdowns-wrap .template-type-selector.js-template-type-selector-wrap.hidden - = dropdown_tag("Choose type", options: { toggle_class: 'js-template-type-selector', title: "Choose a template type" } ) + = dropdown_tag(_("Choose type"), options: { toggle_class: 'js-template-type-selector', title: _("Choose a template type") } ) .license-selector.js-license-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag("Apply a license template", options: { toggle_class: 'js-license-selector', title: "Apply a license", filter: true, placeholder: "Filter", data: { data: licenses_for_select, project: @project.name, fullname: @project.namespace.human_name } } ) + = dropdown_tag(_("Apply a license template"), options: { toggle_class: 'js-license-selector', title: _("Apply a license"), filter: true, placeholder: _("Filter"), data: { data: licenses_for_select, project: @project.name, fullname: @project.namespace.human_name } } ) .gitignore-selector.js-gitignore-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag("Apply a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Apply a template", filter: true, placeholder: "Filter", data: { data: gitignore_names } } ) + = dropdown_tag(_("Apply a .gitignore template"), options: { toggle_class: 'js-gitignore-selector', title: _("Apply a template"), filter: true, placeholder: _("Filter"), data: { data: gitignore_names } } ) .gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag("Apply a GitLab CI Yaml template", options: { toggle_class: 'js-gitlab-ci-yml-selector', title: "Apply a template", filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls } } ) + = dropdown_tag(_("Apply a GitLab CI Yaml template"), options: { toggle_class: 'js-gitlab-ci-yml-selector', title: _("Apply a template"), filter: true, placeholder: _("Filter"), data: { data: gitlab_ci_ymls } } ) .dockerfile-selector.js-dockerfile-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag("Apply a Dockerfile template", options: { toggle_class: 'js-dockerfile-selector', title: "Apply a template", filter: true, placeholder: "Filter", data: { data: dockerfile_names } } ) + = dropdown_tag(_("Apply a Dockerfile template"), options: { toggle_class: 'js-dockerfile-selector', title: _("Apply a template"), filter: true, placeholder: _("Filter"), data: { data: dockerfile_names } } ) .template-selectors-undo-menu.hidden - %span.text-info Template applied - %button.btn.btn-sm.btn-info Undo + %span.text-info= _('Template applied') + %button.btn.btn-sm.btn-info= _('Undo') diff --git a/app/views/projects/blob/_viewer_switcher.html.haml b/app/views/projects/blob/_viewer_switcher.html.haml index 6a521069418e79..0c730ba575ec0e 100644 --- a/app/views/projects/blob/_viewer_switcher.html.haml +++ b/app/views/projects/blob/_viewer_switcher.html.haml @@ -3,10 +3,10 @@ - rich_viewer = blob.rich_viewer .btn-group.js-blob-viewer-switcher{ role: "group" } - - simple_label = "Display #{simple_viewer.switcher_title}" + - simple_label = _("Display %{simple_viewer}") % { simple_viewer: simple_viewer.switcher_title } %button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }> = icon(simple_viewer.switcher_icon) - - rich_label = "Display #{rich_viewer.switcher_title}" + - rich_label = _("Display %{rich_viewer}") % { rich_viewer: rich_viewer.switcher_title } %button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }> = icon(rich_viewer.switcher_icon) diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 27cf040da7cc89..38bc3e9ed983c0 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -1,24 +1,23 @@ -- breadcrumb_title "Repository" +- breadcrumb_title _("Repository") - @no_container = true -- page_title "Edit", @blob.path, @ref +- page_title _("Edit"), @blob.path, @ref - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/ace.js') %div{ class: container_class } - if @conflict .alert.alert-danger - Someone edited the file the same time you did. Please check out - = link_to "the file", project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer' - and make sure your changes will not unintentionally remove theirs. + - link_to_the_file = link_to(_("the file"), project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer') + = _("Someone edited the file the same time you did. Please check out %{link_to_the_file} and make sure your changes will not unintentionally remove theirs.").html_safe % { link_to_the_file: link_to_the_file } .editor-title-row %h3.page-title.blob-edit-page-title - Edit file + = _("Edit file") = render 'template_selectors' .file-editor %ul.nav-links.no-bottom.js-edit-mode.nav.nav-tabs %li.active = link_to '#editor' do - Write + = _("Write") %li = link_to '#preview', 'data-preview-url' => project_preview_blob_path(@project, @id) do @@ -26,7 +25,7 @@ = form_tag(project_update_blob_path(@project, @id), method: :put, class: 'js-quick-submit js-requires-input js-edit-blob-form', data: blob_editor_paths) do = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data - = render 'shared/new_commit_form', placeholder: "Update #{@blob.name}" + = render 'shared/new_commit_form', placeholder: _("Update %{name}") % { name: @blob.name } = hidden_field_tag 'last_commit_sha', @last_commit_sha = hidden_field_tag 'content', '', id: "file-content" = hidden_field_tag 'from_merge_request_iid', params[:from_merge_request_iid] diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 39442564a2b14c..f1908de23eba6b 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,15 +1,15 @@ -- breadcrumb_title "Repository" -- page_title "New File", @path.presence, @ref +- breadcrumb_title _("Repository") +- page_title _("New File"), @path.presence, @ref - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/ace.js') .editor-title-row %h3.page-title.blob-new-page-title - New file + = _("New file") = render 'template_selectors' .file-editor = form_tag(project_create_blob_path(@project, @id), method: :post, class: 'js-edit-blob-form js-new-blob-form js-quick-submit js-requires-input', data: blob_editor_paths) do = render 'projects/blob/editor', ref: @ref - = render 'shared/new_commit_form', placeholder: "Add new file" + = render 'shared/new_commit_form', placeholder: _("Add new file") = hidden_field_tag 'content', '', id: 'file-content' = render 'projects/commit_button', ref: @ref, diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml index da2cef17e8a4ef..cbde7e401f7a3d 100644 --- a/app/views/projects/blob/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml @@ -18,4 +18,4 @@ %td.new_line.diff-line-num %td.line_content{ class: "#{line.type}" }= diff_line_content(line.text) - else - .nothing-here-block No changes. + .nothing-here-block= _("No changes.") diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index a0b0384d78d25d..4fc3d2f78e6cfd 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -1,4 +1,4 @@ -- breadcrumb_title "Repository" +- breadcrumb_title _("Repository") - @no_container = true - page_title @blob.path, @ref @@ -15,5 +15,5 @@ - if can_modify_blob?(@blob) = render 'projects/blob/remove' - - title = "Replace #{@blob.name}" - = render 'projects/blob/upload', title: title, placeholder: title, button_title: 'Replace file', form_path: project_update_blob_path(@project, @id), method: :put + - title = _("Replace %{name}") % { name: @blob.name } + = render 'projects/blob/upload', title: title, placeholder: title, button_title: _('Replace file'), form_path: project_update_blob_path(@project, @id), method: :put diff --git a/app/views/projects/blob/viewers/_changelog.html.haml b/app/views/projects/blob/viewers/_changelog.html.haml index 46e3e7f798a7db..c9f34988e68dfd 100644 --- a/app/views/projects/blob/viewers/_changelog.html.haml +++ b/app/views/projects/blob/viewers/_changelog.html.haml @@ -1,4 +1,3 @@ = icon('history fw') -= succeed '.' do - To find the state of this project's repository at the time of any of these versions, check out - = link_to "the tags", project_tags_path(viewer.project) +- link_to_tags = link_to(_("the tags"), project_tags_path(viewer.project)) += _("To find the state of this project's repository at the time of any of these versions, check out %{link_to_tags}.").html_safe % { link_to_tags: link_to_tags } diff --git a/app/views/projects/blob/viewers/_contributing.html.haml b/app/views/projects/blob/viewers/_contributing.html.haml index c78f04c9c7c80f..0a68f58fbd0b61 100644 --- a/app/views/projects/blob/viewers/_contributing.html.haml +++ b/app/views/projects/blob/viewers/_contributing.html.haml @@ -1,9 +1,9 @@ = icon('book fw') -After you've reviewed these contribution guidelines, you'll be all set to += _("After you've reviewed these contribution guidelines, you'll be all set to") - options = contribution_options(viewer.project) - if options.any? = succeed '.' do = options.to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe - else - contribute to this project. + = _("contribute to this project.") diff --git a/app/views/projects/blob/viewers/_dependency_manager.html.haml b/app/views/projects/blob/viewers/_dependency_manager.html.haml index 87aa7c1dbf8deb..6ca1b81371ebac 100644 --- a/app/views/projects/blob/viewers/_dependency_manager.html.haml +++ b/app/views/projects/blob/viewers/_dependency_manager.html.haml @@ -1,11 +1,10 @@ = icon('cubes fw') = succeed '.' do - This project manages its dependencies using - %strong= viewer.manager_name + = _("This project manages its dependencies using %{manager_name}").html_safe % { manager_name: viewer.manager_name } - if viewer.package_name - and defines a #{viewer.package_type} named + = _("and defines a %{package_type} named") % { package_type: viewer.package_type } %strong< = link_to_if viewer.package_url.present?, viewer.package_name, viewer.package_url, target: '_blank', rel: 'noopener noreferrer' -= link_to 'Learn more', viewer.manager_url, target: '_blank', rel: 'noopener noreferrer' += link_to _('Learn more'), viewer.manager_url, target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/projects/blob/viewers/_download.html.haml b/app/views/projects/blob/viewers/_download.html.haml index fda4b9c92cd9e0..53eeec7344a1a5 100644 --- a/app/views/projects/blob/viewers/_download.html.haml +++ b/app/views/projects/blob/viewers/_download.html.haml @@ -4,4 +4,4 @@ %h1.light = sprite_icon('download') %h4 - Download (#{number_to_human_size(viewer.blob.raw_size)}) + = _("Download (%{size})") % { size: number_to_human_size(viewer.blob.raw_size) } diff --git a/app/views/projects/blob/viewers/_empty.html.haml b/app/views/projects/blob/viewers/_empty.html.haml index a293a8de231dbb..c15dabc9111f5d 100644 --- a/app/views/projects/blob/viewers/_empty.html.haml +++ b/app/views/projects/blob/viewers/_empty.html.haml @@ -1,3 +1,3 @@ .file-content.code .nothing-here-block - Empty file + = _("Empty file") diff --git a/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml b/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml index 5be7cc7f25a8a9..5499e2e4ea8390 100644 --- a/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml +++ b/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml @@ -1,9 +1,9 @@ - if viewer.valid?(@project, @commit.sha) = icon('check fw') - This GitLab CI configuration is valid. + = _("This GitLab CI configuration is valid.") - else = icon('warning fw') - This GitLab CI configuration is invalid: + = _("This GitLab CI configuration is invalid:") = viewer.validation_message(@project, @commit.sha) -= link_to 'Learn more', help_page_path('ci/yaml/README') += link_to _('Learn more'), help_page_path('ci/yaml/README') diff --git a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml index 10cbf6a2f7a5b4..05a5e0902d7da9 100644 --- a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml @@ -1,4 +1,4 @@ = icon('spinner spin fw') -Validating GitLab CI configuration… += _("Validating GitLab CI configuration…") -= link_to 'Learn more', help_page_path('ci/yaml/README') += link_to _('Learn more'), help_page_path('ci/yaml/README') diff --git a/app/views/projects/blob/viewers/_license.html.haml b/app/views/projects/blob/viewers/_license.html.haml index fb9d0b99d09ca6..7bac2703a6d2e6 100644 --- a/app/views/projects/blob/viewers/_license.html.haml +++ b/app/views/projects/blob/viewers/_license.html.haml @@ -1,8 +1,6 @@ - license = viewer.license = icon('balance-scale fw') -This project is licensed under the -= succeed '.' do - %strong= license.name += _("This project is licensed under the %{license_name}.") % { license_name: license.name } -= link_to 'Learn more', license.url, target: '_blank', rel: 'noopener noreferrer' += link_to _('Learn more'), license.url, target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/projects/blob/viewers/_loading.html.haml b/app/views/projects/blob/viewers/_loading.html.haml index 120c0540335aba..a7062e5246e2a0 100644 --- a/app/views/projects/blob/viewers/_loading.html.haml +++ b/app/views/projects/blob/viewers/_loading.html.haml @@ -1,2 +1,2 @@ .text-center.prepend-top-default.append-bottom-default - = icon('spinner spin 2x', 'aria-hidden' => 'true', 'aria-label' => 'Loading content…') + = icon('spinner spin 2x', 'aria-hidden' => 'true', 'aria-label' => _('Loading content…')) diff --git a/app/views/projects/blob/viewers/_loading_auxiliary.html.haml b/app/views/projects/blob/viewers/_loading_auxiliary.html.haml index c7dc9e3250a3f2..87c85149d372d7 100644 --- a/app/views/projects/blob/viewers/_loading_auxiliary.html.haml +++ b/app/views/projects/blob/viewers/_loading_auxiliary.html.haml @@ -1,2 +1,2 @@ = icon('spinner spin fw') -Analyzing file… += _("Analyzing file…") diff --git a/app/views/projects/blob/viewers/_readme.html.haml b/app/views/projects/blob/viewers/_readme.html.haml index d8492abc638b34..2068d92578b868 100644 --- a/app/views/projects/blob/viewers/_readme.html.haml +++ b/app/views/projects/blob/viewers/_readme.html.haml @@ -1,4 +1,3 @@ = icon('info-circle fw') -= succeed '.' do - To learn more about this project, read - = link_to "the wiki", get_project_wiki_path(viewer.project) +- link_to_wiki = link_to(_("the wiki"), get_project_wiki_path(viewer.project)) += _("To learn more about this project, read %{link_to_wiki}.").html_safe % { link_to_wiki: link_to_wiki } diff --git a/app/views/projects/blob/viewers/_route_map.html.haml b/app/views/projects/blob/viewers/_route_map.html.haml index 6d6bd79bc3c5a4..e3ac745adc47ff 100644 --- a/app/views/projects/blob/viewers/_route_map.html.haml +++ b/app/views/projects/blob/viewers/_route_map.html.haml @@ -1,9 +1,9 @@ - if viewer.valid? = icon('check fw') - This Route Map is valid. + = _("This Route Map is valid.") - else = icon('warning fw') - This Route Map is invalid: + = _("This Route Map is invalid:") = viewer.validation_message -= link_to 'Learn more', help_page_path('ci/environments', anchor: 'go-directly-from-source-files-to-public-pages-on-the-environment') += link_to _('Learn more'), help_page_path('ci/environments', anchor: 'go-directly-from-source-files-to-public-pages-on-the-environment') diff --git a/app/views/projects/blob/viewers/_route_map_loading.html.haml b/app/views/projects/blob/viewers/_route_map_loading.html.haml index a5f73fb0197b2c..fcfc53d13b41aa 100644 --- a/app/views/projects/blob/viewers/_route_map_loading.html.haml +++ b/app/views/projects/blob/viewers/_route_map_loading.html.haml @@ -1,4 +1,4 @@ = icon('spinner spin fw') -Validating Route Map… += _("Validating Route Map…") -= link_to 'Learn more', help_page_path('ci/environments', anchor: 'go-directly-from-source-files-to-public-pages-on-the-environment') += link_to _('Learn more'), help_page_path('ci/environments', anchor: 'go-directly-from-source-files-to-public-pages-on-the-environment') diff --git a/app/views/projects/blob/viewers/_sketch.html.haml b/app/views/projects/blob/viewers/_sketch.html.haml index b4b6492b92f632..4c27eb2a446a40 100644 --- a/app/views/projects/blob/viewers/_sketch.html.haml +++ b/app/views/projects/blob/viewers/_sketch.html.haml @@ -1,3 +1,3 @@ .file-content#js-sketch-viewer{ data: { endpoint: blob_raw_path } } - .js-loading-icon.text-center.prepend-top-default.append-bottom-default.js-loading-icon{ 'aria-label' => 'Loading Sketch preview' } + .js-loading-icon.text-center.prepend-top-default.append-bottom-default.js-loading-icon{ 'aria-label' => _('Loading Sketch preview') } = icon('spinner spin 2x', 'aria-hidden' => 'true'); diff --git a/app/views/projects/blob/viewers/_stl.html.haml b/app/views/projects/blob/viewers/_stl.html.haml index 55dd8cba7fe279..e560a676907d5a 100644 --- a/app/views/projects/blob/viewers/_stl.html.haml +++ b/app/views/projects/blob/viewers/_stl.html.haml @@ -1,9 +1,9 @@ .file-content.is-stl-loading .text-center#js-stl-viewer{ data: { endpoint: blob_raw_path } } - = icon('spinner spin 2x', class: 'prepend-top-default append-bottom-default', 'aria-hidden' => 'true', 'aria-label' => 'Loading') + = icon('spinner spin 2x', class: 'prepend-top-default append-bottom-default', 'aria-hidden' => 'true', 'aria-label' => _('Loading')) .text-center.prepend-top-default.append-bottom-default.stl-controls .btn-group %button.btn.btn-default.btn-sm.js-material-changer{ data: { type: 'wireframe' } } - Wireframe + = _("Wireframe") %button.btn.btn-default.btn-sm.active.js-material-changer{ data: { type: 'default' } } - Solid + = _("Solid") diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0ea8789d6cbfc5..2be1f6e8925b88 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -408,6 +408,9 @@ msgstr "" msgid "Add new directory" msgstr "" +msgid "Add new file" +msgstr "" + msgid "Add reaction" msgstr "" @@ -498,6 +501,9 @@ msgstr "" msgid "Advanced settings" msgstr "" +msgid "After you've reviewed these contribution guidelines, you'll be all set to" +msgstr "" + msgid "All" msgstr "" @@ -669,6 +675,9 @@ msgstr "" msgid "An error occurred. Please try again." msgstr "" +msgid "Analyzing file…" +msgstr "" + msgid "Anonymous" msgstr "" @@ -696,6 +705,24 @@ msgstr "" msgid "Applications" msgstr "" +msgid "Apply a .gitignore template" +msgstr "" + +msgid "Apply a Dockerfile template" +msgstr "" + +msgid "Apply a GitLab CI Yaml template" +msgstr "" + +msgid "Apply a license" +msgstr "" + +msgid "Apply a license template" +msgstr "" + +msgid "Apply a template" +msgstr "" + msgid "Apr" msgstr "" @@ -1050,6 +1077,9 @@ msgstr "" msgid "Bitbucket import" msgstr "" +msgid "Blame" +msgstr "" + msgid "Blog" msgstr "" @@ -1373,6 +1403,9 @@ msgstr "" msgid "Choose a branch/tag (e.g. %{master}) or enter a commit (e.g. %{sha}) to see what's changed or to create a merge request." msgstr "" +msgid "Choose a template type" +msgstr "" + msgid "Choose any color." msgstr "" @@ -1385,6 +1418,9 @@ msgstr "" msgid "Choose the top-level group for your repository imports." msgstr "" +msgid "Choose type" +msgstr "" + msgid "Choose which groups you wish to synchronize to this secondary node." msgstr "" @@ -2424,9 +2460,15 @@ msgstr "" msgid "Delete" msgstr "" +msgid "Delete %{name}" +msgstr "" + msgid "Delete Snippet" msgstr "" +msgid "Delete file" +msgstr "" + msgid "Delete list" msgstr "" @@ -2630,6 +2672,12 @@ msgstr "" msgid "Dismiss Merge Request promotion" msgstr "" +msgid "Display %{rich_viewer}" +msgstr "" + +msgid "Display %{simple_viewer}" +msgstr "" + msgid "Do you want to customize how Google Code email addresses and usernames are imported into GitLab?" msgstr "" @@ -2648,6 +2696,9 @@ msgstr "" msgid "Download" msgstr "" +msgid "Download (%{size})" +msgstr "" + msgid "Download tar" msgstr "" @@ -2699,6 +2750,9 @@ msgstr "" msgid "Edit application" msgstr "" +msgid "Edit file" +msgstr "" + msgid "Edit files in the editor and commit changes here" msgstr "" @@ -2726,6 +2780,9 @@ msgstr "" msgid "Embed" msgstr "" +msgid "Empty file" +msgstr "" + msgid "Enable" msgstr "" @@ -3056,6 +3113,9 @@ msgstr "" msgid "Fields on this page are now uneditable, you can configure" msgstr "" +msgid "File name" +msgstr "" + msgid "Files" msgstr "" @@ -4239,6 +4299,15 @@ msgstr "" msgid "Live preview" msgstr "" +msgid "Loading" +msgstr "" + +msgid "Loading Sketch preview" +msgstr "" + +msgid "Loading content…" +msgstr "" + msgid "Loading contribution stats for group members" msgstr "" @@ -4662,6 +4731,9 @@ msgstr "" msgid "New Application" msgstr "" +msgid "New File" +msgstr "" + msgid "New Group" msgstr "" @@ -4751,6 +4823,9 @@ msgstr "" msgid "No changes" msgstr "" +msgid "No changes." +msgstr "" + msgid "No connection could be made to a Gitaly Server, please check your logs!" msgstr "" @@ -4805,6 +4880,9 @@ msgstr "" msgid "No schedules" msgstr "" +msgid "No wrap" +msgstr "" + msgid "No, directly import the existing email addresses and usernames." msgstr "" @@ -4814,6 +4892,9 @@ msgstr "" msgid "None" msgstr "" +msgid "Normal view" +msgstr "" + msgid "Not all comments are displayed because you're comparing two versions of the diff." msgstr "" @@ -5080,6 +5161,9 @@ msgstr "" msgid "Performance optimization" msgstr "" +msgid "Permalink" +msgstr "" + msgid "Permissions" msgstr "" @@ -5823,6 +5907,12 @@ msgstr "" msgid "Repair authentication" msgstr "" +msgid "Replace %{name}" +msgstr "" + +msgid "Replace file" +msgstr "" + msgid "Reply to this email directly or %{view_it_on_gitlab}." msgstr "" @@ -6330,6 +6420,15 @@ msgstr "" msgid "Snippets" msgstr "" +msgid "Soft wrap" +msgstr "" + +msgid "Solid" +msgstr "" + +msgid "Someone edited the file the same time you did. Please check out %{link_to_the_file} and make sure your changes will not unintentionally remove theirs." +msgstr "" + msgid "Something went wrong on our end" msgstr "" @@ -6695,6 +6794,9 @@ msgstr "" msgid "Template" msgstr "" +msgid "Template applied" +msgstr "" + msgid "Terms of Service Agreement and Privacy Policy" msgstr "" @@ -6707,6 +6809,9 @@ msgstr "" msgid "Thanks! Don't show me this again" msgstr "" +msgid "The %{title} could not be displayed because %{viewer}." +msgstr "" + msgid "The Advanced Global Search in GitLab is a powerful search service that saves you time. Instead of creating duplicate code and wasting time, you can now search for code within other teams that can help your own project." msgstr "" @@ -6872,9 +6977,21 @@ msgstr "" msgid "Third party offers" msgstr "" +msgid "This GitLab CI configuration is invalid:" +msgstr "" + +msgid "This GitLab CI configuration is valid." +msgstr "" + msgid "This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area." msgstr "" +msgid "This Route Map is invalid:" +msgstr "" + +msgid "This Route Map is valid." +msgstr "" + msgid "This application was created by %{link_to_owner}." msgstr "" @@ -6971,6 +7088,12 @@ msgstr "" msgid "This project does not have billing enabled. To create a cluster, enable billing and try again." msgstr "" +msgid "This project is licensed under the %{license_name}." +msgstr "" + +msgid "This project manages its dependencies using %{manager_name}" +msgstr "" + msgid "This repository" msgstr "" @@ -7188,6 +7311,9 @@ msgstr "" msgid "To connect an SVN repository, check out %{svn_link}." msgstr "" +msgid "To find the state of this project's repository at the time of any of these versions, check out %{link_to_tags}." +msgstr "" + msgid "To get started you enter your FogBugz URL and login information below. In the next steps, you'll be able to map users and select the projects you want to import." msgstr "" @@ -7203,6 +7329,9 @@ msgstr "" msgid "To import an SVN repository, check out %{svn_link}." msgstr "" +msgid "To learn more about this project, read %{link_to_wiki}." +msgstr "" + msgid "To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here." msgstr "" @@ -7305,6 +7434,9 @@ msgstr "" msgid "Unable to sign you in to the group with SAML due to \"%{reason}\"" msgstr "" +msgid "Undo" +msgstr "" + msgid "Unknown" msgstr "" @@ -7356,6 +7488,9 @@ msgstr "" msgid "Update" msgstr "" +msgid "Update %{name}" +msgstr "" + msgid "Update now" msgstr "" @@ -7440,6 +7575,12 @@ msgstr "" msgid "User|Current status" msgstr "" +msgid "Validating GitLab CI configuration…" +msgstr "" + +msgid "Validating Route Map…" +msgstr "" + msgid "Variables" msgstr "" @@ -7689,12 +7830,18 @@ msgstr "" msgid "Wiki|Wiki Pages" msgstr "" +msgid "Wireframe" +msgstr "" + msgid "With contribution analytics you can have an overview for the activity of issues, merge requests and push events of your organization and its members." msgstr "" msgid "Withdraw Access Request" msgstr "" +msgid "Write" +msgstr "" + msgid "Yes" msgstr "" @@ -7891,6 +8038,9 @@ msgid_plural "and %d fixed vulnerabilities" msgstr[0] "" msgstr[1] "" +msgid "and defines a %{package_type} named" +msgstr "" + msgid "assign yourself" msgstr "" @@ -8128,6 +8278,9 @@ msgstr "" msgid "connecting" msgstr "" +msgid "contribute to this project." +msgstr "" + msgid "could not read private key, is the passphrase correct?" msgstr "" @@ -8480,6 +8633,15 @@ msgstr "" msgid "started" msgstr "" +msgid "the file" +msgstr "" + +msgid "the tags" +msgstr "" + +msgid "the wiki" +msgstr "" + msgid "this document" msgstr "" diff --git a/qa/qa/page/file/show.rb b/qa/qa/page/file/show.rb index 99f5924b67f99e..891833c8801275 100644 --- a/qa/qa/page/file/show.rb +++ b/qa/qa/page/file/show.rb @@ -10,7 +10,7 @@ class Show < Page::Base end view 'app/views/projects/blob/_remove.html.haml' do - element :delete_file_button, "button_tag 'Delete file'" + element :delete_file_button, "button_tag _('Delete file')" end def click_edit -- GitLab