diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-17 12:44:02 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-17 12:44:02 -0700 |
commit | 282904592f1e0e4f98ddeb1a829a1b900cf63451 (patch) | |
tree | 3a48182d7b9ba8b3c1d59c8c0e06e429d329bc15 /app/views/import | |
parent | 11dd390c116f163a2e8a46af83e0d1bb194fb1f7 (diff) | |
parent | 2f16eab03d8af372ae8461de5abf91b480ffd761 (diff) | |
download | gitlab-ce-282904592f1e0e4f98ddeb1a829a1b900cf63451.tar.gz |
Merge branch 'master' into sh-support-bitbucket-server-import
Diffstat (limited to 'app/views/import')
-rw-r--r-- | app/views/import/bitbucket/deploy_key.js.haml | 2 | ||||
-rw-r--r-- | app/views/import/bitbucket/status.html.haml | 37 | ||||
-rw-r--r-- | app/views/import/fogbugz/new.html.haml | 18 | ||||
-rw-r--r-- | app/views/import/fogbugz/new_user_map.html.haml | 34 | ||||
-rw-r--r-- | app/views/import/fogbugz/status.html.haml | 27 | ||||
-rw-r--r-- | app/views/import/gitea/new.html.haml | 17 | ||||
-rw-r--r-- | app/views/import/gitea/status.html.haml | 6 | ||||
-rw-r--r-- | app/views/import/github/new.html.haml | 2 | ||||
-rw-r--r-- | app/views/import/github/status.html.haml | 2 | ||||
-rw-r--r-- | app/views/import/gitlab/status.html.haml | 22 | ||||
-rw-r--r-- | app/views/import/gitlab_projects/new.html.haml | 16 | ||||
-rw-r--r-- | app/views/import/google_code/new.html.haml | 42 | ||||
-rw-r--r-- | app/views/import/google_code/new_user_map.html.haml | 36 | ||||
-rw-r--r-- | app/views/import/google_code/status.html.haml | 40 |
14 files changed, 138 insertions, 163 deletions
diff --git a/app/views/import/bitbucket/deploy_key.js.haml b/app/views/import/bitbucket/deploy_key.js.haml index 81b34ab5c9d..99e8ac1afa1 100644 --- a/app/views/import/bitbucket/deploy_key.js.haml +++ b/app/views/import/bitbucket/deploy_key.js.haml @@ -1,3 +1,3 @@ :plain job = $("tr#repo_#{@repo_id}") - job.find(".import-actions").html("<p class='alert alert-danger'>Access denied! Please verify you can add deploy keys to this repository.</p>") + job.find(".import-actions").html("<p class='alert alert-danger'>#{_('Access denied! Please verify you can add deploy keys to this repository.')}</p>") diff --git a/app/views/import/bitbucket/status.html.haml b/app/views/import/bitbucket/status.html.haml index 4e8f715db4f..a75b7aa9dd2 100644 --- a/app/views/import/bitbucket/status.html.haml +++ b/app/views/import/bitbucket/status.html.haml @@ -1,22 +1,22 @@ -- page_title 'Bitbucket import' -- header_title 'Projects', root_path +- page_title _('Bitbucket import') +- header_title _('Projects'), root_path %h3.page-title %i.fa.fa-bitbucket - Import projects from Bitbucket + = _('Import projects from Bitbucket') - if @repos.any? %p.light - Select projects you want to import. + = _('Select projects you want to import.') %hr %p - if @incompatible_repos.any? = button_tag class: 'btn btn-import btn-success js-import-all' do - Import all compatible projects + = _('Import all compatible projects') = icon('spinner spin', class: 'loading-icon') - else = button_tag class: 'btn btn-import btn-success js-import-all' do - Import all projects + = _('Import all projects') = icon('spinner spin', class: 'loading-icon') .table-responsive @@ -26,9 +26,9 @@ %colgroup.import-jobs-status-col %thead %tr - %th From Bitbucket - %th To GitLab - %th Status + %th= _('From Bitbucket') + %th= _('To GitLab') + %th= _('Status') %tbody - @already_added_projects.each do |project| %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } @@ -40,10 +40,10 @@ - if project.import_status == 'finished' %span %i.fa.fa-check - done + = _('done') - elsif project.import_status == 'started' %i.fa.fa-spinner.fa-spin - started + = _('started') - else = project.human_import_status_name @@ -66,7 +66,7 @@ = text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true %td.import-actions.job-status = button_tag class: 'btn btn-import js-add-to-import' do - Import + = _('Import') = icon('spinner spin', class: 'loading-icon') - @incompatible_repos.each do |repo| %tr{ id: "repo_#{repo.owner}___#{repo.slug}" } @@ -74,16 +74,13 @@ = link_to repo.full_name, "https://bitbucket.org/#{repo.full_name}", target: '_blank', rel: 'noopener noreferrer' %td.import-target %td.import-actions-job-status - = label_tag 'Incompatible Project', nil, class: 'label badge-danger' + = label_tag _('Incompatible Project'), nil, class: 'label badge-danger' - if @incompatible_repos.any? %p - One or more of your Bitbucket projects cannot be imported into GitLab - directly because they use Subversion or Mercurial for version control, - rather than Git. Please convert - = link_to 'them to Git,', 'https://www.atlassian.com/git/tutorials/migrating-overview' - and go through the - = link_to 'import flow', status_import_bitbucket_path - again. + = _("One or more of your Bitbucket projects cannot be imported into GitLab directly because they use Subversion or Mercurial for version control, rather than Git.") + - link_to_git = link_to(_('Git'), 'https://www.atlassian.com/git/tutorials/migrating-overview') + - link_to_import_flow = link_to(_('import flow'), status_import_bitbucket_path) + = _("Please convert them to %{link_to_git}, and go through the %{link_to_import_flow} again.").html_safe % { link_to_git: link_to_git, link_to_import_flow: link_to_import_flow } .js-importer-status{ data: { jobs_import_path: "#{jobs_import_bitbucket_path}", import_path: "#{import_bitbucket_path}" } } diff --git a/app/views/import/fogbugz/new.html.haml b/app/views/import/fogbugz/new.html.haml index 74d686b6703..b54b1af1e0c 100644 --- a/app/views/import/fogbugz/new.html.haml +++ b/app/views/import/fogbugz/new.html.haml @@ -1,26 +1,24 @@ -- page_title "FogBugz Import" -- header_title "Projects", root_path +- page_title _("FogBugz Import") +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-bug - Import projects from FogBugz + = _('Import projects from FogBugz') %hr = form_tag callback_import_fogbugz_path do %p - 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. + = _("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.") .form-group.row - = label_tag :uri, 'FogBugz URL', class: 'col-form-label col-md-2' + = label_tag :uri, _('FogBugz URL'), class: 'col-form-label col-md-2' .col-md-4 = text_field_tag :uri, nil, placeholder: 'https://mycompany.fogbugz.com', class: 'form-control' .form-group.row - = label_tag :email, 'FogBugz Email', class: 'col-form-label col-md-2' + = label_tag :email, _('FogBugz Email'), class: 'col-form-label col-md-2' .col-md-4 = text_field_tag :email, nil, class: 'form-control' .form-group.row - = label_tag :password, 'FogBugz Password', class: 'col-form-label col-md-2' + = label_tag :password, _('FogBugz Password'), class: 'col-form-label col-md-2' .col-md-4 = password_field_tag :password, nil, class: 'form-control' .form-actions - = submit_tag 'Continue to the next step', class: 'btn btn-create' + = submit_tag _('Continue to the next step'), class: 'btn btn-create' diff --git a/app/views/import/fogbugz/new_user_map.html.haml b/app/views/import/fogbugz/new_user_map.html.haml index d27c5d3c36d..ff2f989c509 100644 --- a/app/views/import/fogbugz/new_user_map.html.haml +++ b/app/views/import/fogbugz/new_user_map.html.haml @@ -1,39 +1,33 @@ -- page_title 'User map', 'FogBugz import' -- header_title "Projects", root_path +- page_title _('User map'), _('FogBugz import') +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-bug - Import projects from FogBugz + = _('Import projects from FogBugz') %hr = form_tag create_user_map_import_fogbugz_path do %p - Customize how FogBugz email addresses and usernames are imported into GitLab. - In the next step, you'll be able to select the projects you want to import. + = _("Customize how FogBugz email addresses and usernames are imported into GitLab. In the next step, you'll be able to select the projects you want to import.") %p - The user map is a mapping of the FogBugz users that participated on your projects to the way their email address and usernames will be imported into GitLab. You can change this by populating the table below. + = _("The user map is a mapping of the FogBugz users that participated on your projects to the way their email address and usernames will be imported into GitLab. You can change this by populating the table below.") %ul %li - %strong Default: Map a FogBugz account ID to a full name + %strong= _("Default: Map a FogBugz account ID to a full name") %p - An empty GitLab User field will add the FogBugz user's full name - (e.g. "By John Smith") in the description of all issues and comments. - It will also associate and/or assign these issues and comments with - the project creator. + = _("An empty GitLab User field will add the FogBugz user's full name (e.g. \"By John Smith\") in the description of all issues and comments. It will also associate and/or assign these issues and comments with the project creator.") %li - %strong Map a FogBugz account ID to a GitLab user + %strong= _("Map a FogBugz account ID to a GitLab user") %p - Selecting a GitLab user will add a link to the GitLab user in the descriptions - of issues and comments (e.g. "By <a href="#">@johnsmith</a>"). It will also - associate and/or assign these issues and comments with the selected user. + = _('Selecting a GitLab user will add a link to the GitLab user in the descriptions of issues and comments (e.g. "By <a href="#">@johnsmith</a>"). It will also associate and/or assign these issues and comments with the selected user.').html_safe .table-holder %table.table %thead %tr - %th ID - %th Name - %th Email - %th GitLab User + %th= _("ID") + %th= _("Name") + %th= _("Email") + %th= _("GitLab User") %tbody - @user_map.each do |id, user| %tr @@ -45,4 +39,4 @@ scope: :all, email_user: true, selected: user[:gitlab_user]) .form-actions - = submit_tag 'Continue to the next step', class: 'btn btn-create' + = submit_tag _('Continue to the next step'), class: 'btn btn-create' diff --git a/app/views/import/fogbugz/status.html.haml b/app/views/import/fogbugz/status.html.haml index 7b832c6a23a..830d141ebea 100644 --- a/app/views/import/fogbugz/status.html.haml +++ b/app/views/import/fogbugz/status.html.haml @@ -1,20 +1,19 @@ -- page_title "FogBugz import" -- header_title "Projects", root_path +- page_title _("FogBugz import") +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-bug - Import projects from FogBugz + = _('Import projects from FogBugz') - if @repos.any? %p.light - Select projects you want to import. + = _('Select projects you want to import.') %p.light - Optionally, you can - = link_to 'customize', new_user_map_import_fogbugz_path - how FogBugz email addresses and usernames are imported into GitLab. + - link_to_customize = link_to('customize', new_user_map_import_fogbugz_path) + = _('Optionally, you can %{link_to_customize} how FogBugz email addresses and usernames are imported into GitLab.').html_safe % { link_to_customize: link_to_customize } %hr %p = button_tag class: 'btn btn-import btn-success js-import-all' do - Import all projects + = _('Import all projects') = icon("spinner spin", class: "loading-icon") .table-responsive @@ -24,9 +23,9 @@ %colgroup.import-jobs-status-col %thead %tr - %th From FogBugz - %th To GitLab - %th Status + %th= _("From FogBugz") + %th= _("To GitLab") + %th= _("Status") %tbody - @already_added_projects.each do |project| %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } @@ -38,10 +37,10 @@ - if project.import_status == 'finished' %span %i.fa.fa-check - done + = _("done") - elsif project.import_status == 'started' %i.fa.fa-spinner.fa-spin - started + = _("started") - else = project.human_import_status_name @@ -53,7 +52,7 @@ #{current_user.username}/#{repo.name} %td.import-actions.job-status = button_tag class: "btn btn-import js-add-to-import" do - Import + = _("Import") = icon("spinner spin", class: "loading-icon") .js-importer-status{ data: { jobs_import_path: "#{jobs_import_fogbugz_path}", import_path: "#{import_fogbugz_path}" } } diff --git a/app/views/import/gitea/new.html.haml b/app/views/import/gitea/new.html.haml index 581576a8a3d..2b3102f9af9 100644 --- a/app/views/import/gitea/new.html.haml +++ b/app/views/import/gitea/new.html.haml @@ -1,23 +1,22 @@ -- page_title "Gitea Import" -- header_title "Projects", root_path +- page_title _("Gitea Import") +- header_title _("Projects"), root_path %h3.page-title = custom_icon('go_logo') - Import Projects from Gitea + = _('Import Projects from Gitea') %p - To get started, please enter your Gitea Host URL and a - = succeed '.' do - = link_to 'Personal Access Token', 'https://github.com/gogits/go-gogs-client/wiki#access-token' + - link_to_personal_token = link_to(_('Personal Access Token'), 'https://github.com/gogits/go-gogs-client/wiki#access-token') + = _('To get started, please enter your Gitea Host URL and a %{link_to_personal_token}.').html_safe % { link_to_personal_token: link_to_personal_token } = form_tag personal_access_token_import_gitea_path do .form-group.row - = label_tag :gitea_host_url, 'Gitea Host URL', class: 'col-form-label col-sm-2' + = label_tag :gitea_host_url, _('Gitea Host URL'), class: 'col-form-label col-sm-2' .col-sm-4 = text_field_tag :gitea_host_url, nil, placeholder: 'https://try.gitea.io', class: 'form-control' .form-group.row - = label_tag :personal_access_token, 'Personal Access Token', class: 'col-form-label col-sm-2' + = label_tag :personal_access_token, _('Personal Access Token'), class: 'col-form-label col-sm-2' .col-sm-4 = text_field_tag :personal_access_token, nil, class: 'form-control' .form-actions - = submit_tag 'List Your Gitea Repositories', class: 'btn btn-create' + = submit_tag _('List Your Gitea Repositories'), class: 'btn btn-create' diff --git a/app/views/import/gitea/status.html.haml b/app/views/import/gitea/status.html.haml index 589ca27e45d..88244fde16b 100644 --- a/app/views/import/gitea/status.html.haml +++ b/app/views/import/gitea/status.html.haml @@ -1,7 +1,7 @@ -- page_title "Gitea Import" -- header_title "Projects", root_path +- page_title _("Gitea Import") +- header_title _("Projects"), root_path %h3.page-title = custom_icon('go_logo') - Import Projects from Gitea + = _('Import Projects from Gitea') = render 'import/githubish_status', provider: 'gitea' diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index b9ebb1a39d9..6ff25f2c842 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -1,7 +1,7 @@ - title = has_ci_cd_only_params? ? _('Connect repositories from GitHub') : _('GitHub import') - page_title title - breadcrumb_title title -- header_title "Projects", root_path +- header_title _("Projects"), root_path %h3.page-title = icon 'github', text: import_github_title diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml index b00b972d9c9..be057be6d1a 100644 --- a/app/views/import/github/status.html.haml +++ b/app/views/import/github/status.html.haml @@ -1,7 +1,7 @@ - title = has_ci_cd_only_params? ? _('Connect repositories from GitHub') : _('GitHub import') - page_title title - breadcrumb_title title -- header_title "Projects", root_path +- header_title _("Projects"), root_path %h3.page-title = icon 'github', text: import_github_title diff --git a/app/views/import/gitlab/status.html.haml b/app/views/import/gitlab/status.html.haml index 37734414835..b7bfbae5edf 100644 --- a/app/views/import/gitlab/status.html.haml +++ b/app/views/import/gitlab/status.html.haml @@ -1,15 +1,15 @@ -- page_title "GitLab.com import" -- header_title "Projects", root_path +- page_title _("GitLab.com import") +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-heart - Import projects from GitLab.com + = _('Import projects from GitLab.com') %p.light - Select projects you want to import. + = _('Select projects you want to import.') %hr %p = button_tag class: "btn btn-import btn-success js-import-all" do - Import all projects + = _('Import all projects') = icon("spinner spin", class: "loading-icon") .table-responsive @@ -19,9 +19,9 @@ %colgroup.import-jobs-status-col %thead %tr - %th From GitLab.com - %th To this GitLab instance - %th Status + %th= _('From GitLab.com') + %th= _('To this GitLab instance') + %th= _('Status') %tbody - @already_added_projects.each do |project| %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } @@ -33,10 +33,10 @@ - if project.import_status == 'finished' %span %i.fa.fa-check - done + = _('done') - elsif project.import_status == 'started' %i.fa.fa-spinner.fa-spin - started + = _('started') - else = project.human_import_status_name @@ -48,7 +48,7 @@ = import_project_target(repo['namespace']['path'], repo['name']) %td.import-actions.job-status = button_tag class: "btn btn-import js-add-to-import" do - Import + = _('Import') = icon("spinner spin", class: "loading-icon") .js-importer-status{ data: { jobs_import_path: "#{jobs_import_gitlab_path}", import_path: "#{import_gitlab_path}" } } diff --git a/app/views/import/gitlab_projects/new.html.haml b/app/views/import/gitlab_projects/new.html.haml index cc672a5ea7c..a258fc64b1e 100644 --- a/app/views/import/gitlab_projects/new.html.haml +++ b/app/views/import/gitlab_projects/new.html.haml @@ -1,9 +1,9 @@ -- page_title "GitLab Import" -- header_title "Projects", root_path +- page_title _("GitLab Import") +- header_title _("Projects"), root_path %h3.page-title = icon('gitlab') - Import an exported GitLab project + = _('Import an exported GitLab project') %hr = form_tag import_gitlab_project_path, class: 'new_project', multipart: true do @@ -24,19 +24,19 @@ #{user_url(current_user.username)}/ = hidden_field_tag :namespace_id, value: current_user.namespace_id .form-group.col-12.col-sm-6.project-path - = label_tag :path, 'Project name', class: 'label-light' + = label_tag :path, _('Project name'), class: 'label-light' = text_field_tag :path, @path, placeholder: "my-awesome-project", class: "js-path-name form-control", tabindex: 2, autofocus: true, required: true .row .form-group.col-md-12 - 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. + = _("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.") .row .form-group.col-sm-12 = hidden_field_tag :namespace_id, @namespace.id - = label_tag :file, 'GitLab project export', class: 'label-light' + = label_tag :file, _('GitLab project export'), class: 'label-light' .form-group = file_field_tag :file, class: '' .row .form-actions.col-sm-12 - = submit_tag 'Import project', class: 'btn btn-create' - = link_to 'Cancel', new_project_path, class: 'btn btn-cancel' + = submit_tag _('Import project'), class: 'btn btn-create' + = link_to _('Cancel'), new_project_path, class: 'btn btn-cancel' diff --git a/app/views/import/google_code/new.html.haml b/app/views/import/google_code/new.html.haml index 2f1fb8d9c56..fd6e4726fc5 100644 --- a/app/views/import/google_code/new.html.haml +++ b/app/views/import/google_code/new.html.haml @@ -1,62 +1,62 @@ -- page_title "Google Code import" -- header_title "Projects", root_path +- page_title _("Google Code import") +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-google - Import projects from Google Code + = _('Import projects from Google Code') %hr = form_tag callback_import_google_code_path, multipart: true do %p - Follow the steps below to export your Google Code project data. - In the next step, you'll be able to select the projects you want to import. + = _('Follow the steps below to export your Google Code project data.') + = _("In the next step, you'll be able to select the projects you want to import.") %ol %li %p - Go to - #{link_to "Google Takeout", "https://www.google.com/settings/takeout", target: '_blank', rel: 'noopener noreferrer'}. + - link_to_google_takeout = link_to(_("Google Takeout"), "https://www.google.com/settings/takeout", target: '_blank', rel: 'noopener noreferrer') + = _("Go to %{link_to_google_takeout}.").html_safe % { link_to_google_takeout: link_to_google_takeout } %li %p - Make sure you're logged into the account that owns the projects you'd like to import. + = _("Make sure you're logged into the account that owns the projects you'd like to import.") %li %p - Click the <strong>Select none</strong> button on the right, since we only need "Google Code Project Hosting". + = _('Click the <strong>Select none</strong> button on the right, since we only need "Google Code Project Hosting".').html_safe %li %p - Scroll down to <strong>Google Code Project Hosting</strong> and enable the switch on the right. + = _('Scroll down to <strong>Google Code Project Hosting</strong> and enable the switch on the right.').html_safe %li %p - Choose <strong>Next</strong> at the bottom of the page. + = _('Choose <strong>Next</strong> at the bottom of the page.').html_safe %li %p - Leave the "File type" and "Delivery method" options on their default values. + = _('Leave the "File type" and "Delivery method" options on their default values.') %li %p - Choose <strong>Create archive</strong> and wait for archiving to complete. + = _('Choose <strong>Create archive</strong> and wait for archiving to complete.').html_safe %li %p - Click the <strong>Download</strong> button and wait for downloading to complete. + = _('Click the <strong>Download</strong> button and wait for downloading to complete.').html_safe %li %p - Find the downloaded ZIP file and decompress it. + = _('Find the downloaded ZIP file and decompress it.') %li %p - Find the newly extracted <code>Takeout/Google Code Project Hosting/GoogleCodeProjectHosting.json</code> file. + = _('Find the newly extracted <code>Takeout/Google Code Project Hosting/GoogleCodeProjectHosting.json</code> file.').html_safe %li %p - Upload <code>GoogleCodeProjectHosting.json</code> here: + = _('Upload <code>GoogleCodeProjectHosting.json</code> here:').html_safe %p %input{ type: "file", name: "dump_file", id: "dump_file" } %li %p - Do you want to customize how Google Code email addresses and usernames are imported into GitLab? + = _('Do you want to customize how Google Code email addresses and usernames are imported into GitLab?') %p = label_tag :create_user_map_0 do = radio_button_tag :create_user_map, 0, true - No, directly import the existing email addresses and usernames. + = _('No, directly import the existing email addresses and usernames.') %p = label_tag :create_user_map_1 do = radio_button_tag :create_user_map, 1, false - Yes, let me map Google Code users to full names or GitLab users. + = _('Yes, let me map Google Code users to full names or GitLab users.') %li %p - = submit_tag 'Continue to the next step', class: "btn btn-create" + = submit_tag _('Continue to the next step'), class: "btn btn-create" diff --git a/app/views/import/google_code/new_user_map.html.haml b/app/views/import/google_code/new_user_map.html.haml index 91c774f575c..baaaf6bdc63 100644 --- a/app/views/import/google_code/new_user_map.html.haml +++ b/app/views/import/google_code/new_user_map.html.haml @@ -1,44 +1,36 @@ -- page_title "User map", "Google Code import" -- header_title "Projects", root_path +- page_title _("User map"), _("Google Code import") +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-google - Import projects from Google Code + = _('Import projects from Google Code') %hr = form_tag create_user_map_import_google_code_path do %p - Customize how Google Code email addresses and usernames are imported into GitLab. - In the next step, you'll be able to select the projects you want to import. + = _("Customize how Google Code email addresses and usernames are imported into GitLab. In the next step, you'll be able to select the projects you want to import.") %p - The user map is a JSON document mapping the Google Code users that participated on your projects to the way their email addresses and usernames will be imported into GitLab. You can change this by changing the value on the right hand side of <code>:</code>. Be sure to preserve the surrounding double quotes, other punctuation and the email address or username on the left hand side. + = _("The user map is a JSON document mapping the Google Code users that participated on your projects to the way their email addresses and usernames will be imported into GitLab. You can change this by changing the value on the right hand side of <code>:</code>. Be sure to preserve the surrounding double quotes, other punctuation and the email address or username on the left hand side.").html_safe %ul %li - %strong Default: Directly import the Google Code email address or username + %strong= _("Default: Directly import the Google Code email address or username") %p - <code>"johnsmith@example.com": "johnsm...@example.com"</code> - will add "By johnsm...@example.com" to all issues and comments originally created by johnsmith@example.com. - The email address or username is masked to ensure the user's privacy. + = _('<code>"johnsmith@example.com": "johnsm...@example.com"</code> will add "By johnsm...@example.com" to all issues and comments originally created by johnsmith@example.com. The email address or username is masked to ensure the user\'s privacy.').html_safe %li - %strong Map a Google Code user to a GitLab user + %strong= _("Map a Google Code user to a GitLab user") %p - <code>"johnsmith@example.com": "@johnsmith"</code> - will add "By <a href="#">@johnsmith</a>" to all issues and comments originally created by johnsmith@example.com, - and will set <a href="#">@johnsmith</a> as the assignee on all issues originally assigned to johnsmith@example.com. + = _('<code>"johnsmith@example.com": "@johnsmith"</code> will add "By <a href="#">@johnsmith</a>" to all issues and comments originally created by johnsmith@example.com, and will set <a href="#">@johnsmith</a> as the assignee on all issues originally assigned to johnsmith@example.com.').html_safe %li - %strong Map a Google Code user to a full name + %strong= _("Map a Google Code user to a full name") %p - <code>"johnsmith@example.com": "John Smith"</code> - will add "By John Smith" to all issues and comments originally created by johnsmith@example.com. + = _('<code>"johnsmith@example.com": "John Smith"</code> will add "By John Smith" to all issues and comments originally created by johnsmith@example.com.').html_safe %li - %strong Map a Google Code user to a full email address + %strong= _("Map a Google Code user to a full email address") %p - <code>"johnsmith@example.com": "johnsmith@example.com"</code> - will add "By <a href="#">johnsmith@example.com</a>" to all issues and comments originally created by johnsmith@example.com. - By default, the email address or username is masked to ensure the user's privacy. Use this option if you want to show the full email address. + = _('<code>"johnsmith@example.com": "johnsmith@example.com"</code> will add "By <a href="#">johnsmith@example.com</a>" to all issues and comments originally created by johnsmith@example.com. By default, the email address or username is masked to ensure the user\'s privacy. Use this option if you want to show the full email address.').html_safe .form-group.row .col-sm-12 = text_area_tag :user_map, JSON.pretty_generate(@user_map), class: 'form-control', rows: 15 .form-actions - = submit_tag 'Continue to the next step', class: "btn btn-create" + = submit_tag _('Continue to the next step'), class: "btn btn-create" diff --git a/app/views/import/google_code/status.html.haml b/app/views/import/google_code/status.html.haml index acf7a108cb0..347e2820f94 100644 --- a/app/views/import/google_code/status.html.haml +++ b/app/views/import/google_code/status.html.haml @@ -1,25 +1,24 @@ -- page_title "Google Code import" -- header_title "Projects", root_path +- page_title _("Google Code import") +- header_title _("Projects"), root_path %h3.page-title %i.fa.fa-google - Import projects from Google Code + = _('Import projects from Google Code') - if @repos.any? %p.light - Select projects you want to import. + = _('Select projects you want to import.') %p.light - Optionally, you can - = link_to "customize", new_user_map_import_google_code_path - how Google Code email addresses and usernames are imported into GitLab. + - link_to_customize = link_to(_("customize"), new_user_map_import_google_code_path) + = _("Optionally, you can %{link_to_customize} how Google Code email addresses and usernames are imported into GitLab.").html_safe % { link_to_customize: link_to_customize } %hr %p - if @incompatible_repos.any? = button_tag class: "btn btn-import btn-success js-import-all" do - Import all compatible projects + = _("Import all compatible projects") = icon("spinner spin", class: "loading-icon") - else = button_tag class: "btn btn-import btn-success js-import-all" do - Import all projects + = _("Import all projects") = icon("spinner spin", class: "loading-icon") .table-responsive @@ -29,9 +28,9 @@ %colgroup.import-jobs-status-col %thead %tr - %th From Google Code - %th To GitLab - %th Status + %th= _("From Google Code") + %th= _("To GitLab") + %th= _("Status") %tbody - @already_added_projects.each do |project| %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } @@ -43,10 +42,10 @@ - if project.import_status == 'finished' %span %i.fa.fa-check - done + = _("done") - elsif project.import_status == 'started' %i.fa.fa-spinner.fa-spin - started + = _("started") - else = project.human_import_status_name @@ -58,7 +57,7 @@ #{current_user.username}/#{repo.name} %td.import-actions.job-status = button_tag class: "btn btn-import js-add-to-import" do - Import + = _("Import") = icon("spinner spin", class: "loading-icon") - @incompatible_repos.each do |repo| %tr{ id: "repo_#{repo.id}" } @@ -66,15 +65,12 @@ = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer' %td.import-target %td.import-actions-job-status - = label_tag "Incompatible Project", nil, class: "label badge-danger" + = label_tag _("Incompatible Project"), nil, class: "label badge-danger" - if @incompatible_repos.any? %p - One or more of your Google Code projects cannot be imported into GitLab - directly because they use Subversion or Mercurial for version control, - rather than Git. Please convert them to Git on Google Code, and go - through the - = link_to "import flow", new_import_google_code_path - again. + = _("One or more of your Google Code projects cannot be imported into GitLab directly because they use Subversion or Mercurial for version control, rather than Git.") + - link_to_import_flow = link_to(_("import flow"), new_import_google_code_path) + = _("Please convert them to Git on Google Code, and go through the %{link_to_import_flow} again.").html_safe % { link_to_import_flow: link_to_import_flow } .js-importer-status{ data: { jobs_import_path: "#{jobs_import_google_code_path}", import_path: "#{import_google_code_path}" } } |