[CE] i18n: externalize strings from 'app/views/projects/forks'

Signed-off-by: Tao Wang <twang2218@gmail.com>
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Tao Wang 2018-06-14 20:38:14 +10:00 committed by Rémy Coutable
parent a77bc225e3
commit a5bd918a51
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
4 changed files with 57 additions and 25 deletions

View File

@ -1,24 +1,20 @@
- page_title "Fork project"
- page_title _("Fork project")
- if @forked_project && !@forked_project.saved?
.alert.alert-danger.alert-block
%h4
= sprite_icon('fork', size: 16)
Fork Error!
= _("Fork Error!")
%p
You tried to fork
= link_to_project @project
but it failed for the following reason:
= _("You tried to fork %{link_to_the_project} but it failed for the following reason:").html_safe % { link_to_the_project: link_to_project(@project) }
- if @forked_project && @forked_project.errors.any?
%p
&ndash;
- error = @forked_project.errors.full_messages.first
- if error.include?("already been taken")
Name has already been taken
= _("Name has already been taken")
- else
= error
%p
= link_to new_project_fork_path(@project), title: "Fork", class: "btn" do
Try to fork again
= link_to _("Try to fork again"), new_project_fork_path(@project), title: _("Fork"), class: "btn"

View File

@ -5,12 +5,12 @@
.nav-controls
= form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
= search_field_tag :filter_projects, nil, placeholder: 'Search forks', class: 'projects-list-filter project-filter-form-field form-control input-short',
= search_field_tag :filter_projects, nil, placeholder: _('Search forks'), class: 'projects-list-filter project-filter-form-field form-control input-short',
spellcheck: false, data: { 'filter-selector' => 'span.namespace-name' }
.dropdown
%button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
%span.light sort:
%span.light= _("sort:")
- if @sort.present?
= sort_options_hash[@sort]
- else
@ -30,13 +30,12 @@
- if current_user && can?(current_user, :fork_project, @project)
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-success' do
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn btn-success' do
= sprite_icon('fork', size: 12)
%span Fork
%span= _('Fork')
- else
= link_to new_project_fork_path(@project), title: "Fork project", class: 'btn btn-success' do
= link_to new_project_fork_path(@project), title: _("Fork project"), class: 'btn btn-success' do
= sprite_icon('fork', size: 12)
%span Fork
%span= _('Fork')
= render 'projects', projects: @forks

View File

@ -1,13 +1,11 @@
- page_title "Fork project"
- page_title _("Fork project")
.row.prepend-top-default
.col-lg-3
%h4.prepend-top-0
Fork project
= _("Fork project")
%p
A fork is a copy of a project.
%br
Forking a repository allows you to make changes without affecting the original project.
= _("A fork is a copy of a project.<br />Forking a repository allows you to make changes without affecting the original project.").html_safe
.col-lg-9
- if @namespaces.present?
.fork-thumbnail-container.js-fork-content
@ -17,13 +15,13 @@
= render 'fork_button', namespace: namespace
- else
%strong
No available namespaces to fork the project.
= _("No available namespaces to fork the project.")
%p.prepend-top-default
You must have permission to create a project in a namespace before forking.
= _("You must have permission to create a project in a namespace before forking.")
.save-project-loader.hide.js-fork-content
%h2.text-center
= icon('spinner spin')
Forking repository
= _("Forking repository")
%p.text-center
Please wait a moment, this page will automatically refresh when ready.
= _("Please wait a moment, this page will automatically refresh when ready.")

View File

@ -372,6 +372,9 @@ msgstr ""
msgid "A deleted user"
msgstr ""
msgid "A fork is a copy of a project.<br />Forking a repository allows you to make changes without affecting the original project."
msgstr ""
msgid "A member of GitLab's abuse team will review your report as soon as possible."
msgstr ""
@ -4140,6 +4143,15 @@ msgstr ""
msgid "For public projects, anyone can view pipelines and access job details (output logs and artifacts)"
msgstr ""
msgid "Fork"
msgstr ""
msgid "Fork Error!"
msgstr ""
msgid "Fork project"
msgstr ""
msgid "ForkedFromProjectPath|Forked from"
msgstr ""
@ -4149,6 +4161,9 @@ msgstr ""
msgid "Forking in progress"
msgstr ""
msgid "Forking repository"
msgstr ""
msgid "Forks"
msgstr ""
@ -4311,6 +4326,9 @@ msgstr ""
msgid "Go to project"
msgstr ""
msgid "Go to your fork"
msgstr ""
msgid "Google Code import"
msgstr ""
@ -5775,6 +5793,9 @@ msgstr ""
msgid "Name"
msgstr ""
msgid "Name has already been taken"
msgstr ""
msgid "Name new label"
msgstr ""
@ -5927,6 +5948,9 @@ msgstr ""
msgid "No activities found"
msgstr ""
msgid "No available namespaces to fork the project."
msgstr ""
msgid "No branches found"
msgstr ""
@ -7835,6 +7859,9 @@ msgstr ""
msgid "Search for projects, issues, etc."
msgstr ""
msgid "Search forks"
msgstr ""
msgid "Search groups"
msgstr ""
@ -9709,6 +9736,9 @@ msgstr ""
msgid "Try again?"
msgstr ""
msgid "Try to fork again"
msgstr ""
msgid "Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now."
msgstr ""
@ -10533,6 +10563,9 @@ msgstr ""
msgid "You must have maintainer access to force delete a lock"
msgstr ""
msgid "You must have permission to create a project in a namespace before forking."
msgstr ""
msgid "You need permission."
msgstr ""
@ -10548,6 +10581,9 @@ msgstr ""
msgid "You need to upload a Google Takeout archive."
msgstr ""
msgid "You tried to fork %{link_to_the_project} but it failed for the following reason:"
msgstr ""
msgid "You will lose all changes you've made to this file. This action cannot be undone."
msgstr ""
@ -11199,6 +11235,9 @@ msgstr ""
msgid "sign in"
msgstr ""
msgid "sort:"
msgstr ""
msgid "source"
msgstr ""