summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorLarry Li <larryli@qq.com>2016-03-28 12:39:17 +0800
committerLarry Li <larryli@qq.com>2016-03-28 12:39:17 +0800
commit44d920605c4d857d4e494e818042a0251e9ee203 (patch)
treed672721562140801486f6a0641e1eee32088a918 /app/views/projects
parentb0a44cb0c867b2eec84ba8bb4ac303d829848195 (diff)
downloadgitlab-ce-8.6.0.zh1.tar.gz
完成 8.6 分支初步翻译v8.6.0.zh1
Signed-off-by: Larry Li <larryli@qq.com>
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_builds_settings.html.haml27
-rw-r--r--app/views/projects/_find_file_link.html.haml2
-rw-r--r--app/views/projects/_home_panel.html.haml2
-rw-r--r--app/views/projects/blame/show.html.haml6
-rw-r--r--app/views/projects/blob/_editor.html.haml2
-rw-r--r--app/views/projects/blob/_new_dir.html.haml10
-rw-r--r--app/views/projects/blob/_remove.html.haml8
-rw-r--r--app/views/projects/blob/edit.html.haml2
-rw-r--r--app/views/projects/blob/new.html.haml6
-rw-r--r--app/views/projects/builds/index.html.haml34
-rw-r--r--app/views/projects/builds/show.html.haml52
-rw-r--r--app/views/projects/buttons/_download.html.haml2
-rw-r--r--app/views/projects/commit/_builds.html.haml50
-rw-r--r--app/views/projects/commits/_commit_list.html.haml4
-rw-r--r--app/views/projects/commits/_head.html.haml10
-rw-r--r--app/views/projects/deploy_keys/index.html.haml2
-rw-r--r--app/views/projects/diffs/_file.html.haml6
-rw-r--r--app/views/projects/diffs/_warning.html.haml16
-rw-r--r--app/views/projects/edit.html.haml91
-rw-r--r--app/views/projects/empty.html.haml16
-rw-r--r--app/views/projects/forks/index.html.haml20
-rw-r--r--app/views/projects/graphs/ci/_builds.haml2
-rw-r--r--app/views/projects/group_links/index.html.haml20
-rw-r--r--app/views/projects/hooks/index.html.haml49
-rw-r--r--app/views/projects/issues/_discussion.html.haml4
-rw-r--r--app/views/projects/issues/_merge_requests.html.haml2
-rw-r--r--app/views/projects/issues/_new_branch.html.haml2
-rw-r--r--app/views/projects/issues/_related_branches.html.haml2
-rw-r--r--app/views/projects/issues/show.html.haml21
-rw-r--r--app/views/projects/labels/_form.html.haml10
-rw-r--r--app/views/projects/labels/_label.html.haml8
-rw-r--r--app/views/projects/merge_requests/_discussion.html.haml4
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml4
-rw-r--r--app/views/projects/merge_requests/_new_compare.html.haml10
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml10
-rw-r--r--app/views/projects/merge_requests/_show.html.haml28
-rw-r--r--app/views/projects/merge_requests/show/_diffs.html.haml10
-rw-r--r--app/views/projects/merge_requests/show/_how_to_merge.html.haml63
-rw-r--r--app/views/projects/merge_requests/show/_mr_title.html.haml13
-rw-r--r--app/views/projects/merge_requests/widget/open/_wip.html.haml10
-rw-r--r--app/views/projects/milestones/_form.html.haml4
-rw-r--r--app/views/projects/milestones/show.html.haml2
-rw-r--r--app/views/projects/notes/_edit_form.html.haml4
-rw-r--r--app/views/projects/notes/_form.html.haml4
-rw-r--r--app/views/projects/notes/_note.html.haml4
-rw-r--r--app/views/projects/protected_branches/index.html.haml6
-rw-r--r--app/views/projects/releases/edit.html.haml5
-rw-r--r--app/views/projects/repositories/_download_archive.html.haml12
-rw-r--r--app/views/projects/tags/new.html.haml20
-rw-r--r--app/views/projects/wikis/_form.html.haml4
50 files changed, 321 insertions, 384 deletions
diff --git a/app/views/projects/_builds_settings.html.haml b/app/views/projects/_builds_settings.html.haml
index 95ab9ecf3e8..61d3f1379b1 100644
--- a/app/views/projects/_builds_settings.html.haml
+++ b/app/views/projects/_builds_settings.html.haml
@@ -1,39 +1,38 @@
%fieldset.builds-feature
%legend
- Builds:
+ 构建:
.form-group
.col-sm-offset-2.col-sm-10
- %p Get recent application code using the following command:
+ %p 使用下面的命令来获取程序代码:
.radio
= f.label :build_allow_git_fetch_false do
= f.radio_button :build_allow_git_fetch, 'false'
%strong git clone
%br
- %span.descr Slower but makes sure you have a clean dir before every build
+ %span.descr 比较慢,但可以在每次构建前保证你有一个干净的文件目录
.radio
= f.label :build_allow_git_fetch_true do
= f.radio_button :build_allow_git_fetch, 'true'
%strong git fetch
%br
- %span.descr Faster
+ %span.descr 比较快
.form-group
- = f.label :build_timeout_in_minutes, 'Timeout', class: 'control-label'
+ = f.label :build_timeout_in_minutes, '超时', class: 'control-label'
.col-sm-10
= f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0'
- %p.help-block per build in minutes
+ %p.help-block 每次构建时间的最大分钟数
.form-group
- = f.label :build_coverage_regex, "Test coverage parsing", class: 'control-label'
+ = f.label :build_coverage_regex, "测试覆盖解析", class: 'control-label'
.col-sm-10
.input-group
%span.input-group-addon /
= f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered'
%span.input-group-addon /
%p.help-block
- We will use this regular expression to find test coverage output in build trace.
- Leave blank if you want to disable this feature
+ 我们将使用此正则表达式在构建信息中查找测试覆盖输出。如果不想使用此功能,请留空
.bs-callout.bs-callout-info
- %p Below are examples of regex for existing tools:
+ %p 下面是现有工具的正则表达式例子:
%ul
%li
Simplecov (Ruby) -
@@ -50,11 +49,11 @@
.checkbox
= f.label :public_builds do
= f.check_box :public_builds
- %strong Public builds
- .help-block Allow everyone to access builds for Public and Internal projects
+ %strong 公开构建
+ .help-block 允许所有人访问公开和内部项目的构建
.form-group
- = f.label :runners_token, "Runners token", class: 'control-label'
+ = f.label :runners_token, "Runners 授权", class: 'control-label'
.col-sm-10
= f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89'
- %p.help-block The secure token used to checkout project.
+ %p.help-block 此安全授权码将用于检出项目。
diff --git a/app/views/projects/_find_file_link.html.haml b/app/views/projects/_find_file_link.html.haml
index dbb33090670..e26c6e7744f 100644
--- a/app/views/projects/_find_file_link.html.haml
+++ b/app/views/projects/_find_file_link.html.haml
@@ -1,3 +1,3 @@
= link_to namespace_project_find_file_path(@project.namespace, @project, @ref), class: 'btn btn-grouped shortcuts-find-file', rel: 'nofollow' do
= icon('search')
- %span Find File
+ %span 查找文件
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index d240508b64f..4126d5bdd58 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -14,7 +14,7 @@
- if forked_from_project = @project.forked_from_project
.cover-desc
- Forked from
+ 派生自
= link_to project_path(forked_from_project) do
= forked_from_project.namespace.try(:name)
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index 5f9a92ff93f..08ab0f1f332 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -1,7 +1,7 @@
-- page_title "Blame", @blob.path, @ref
-- header_title project_title(@project, "Files", project_files_path(@project))
+- page_title "审查", @blob.path, @ref
+- header_title project_title(@project, "文件", project_files_path(@project))
-%h3.page-title Blame view
+%h3.page-title 审查视图
#blob-content-holder.tree-holder
.file-holder
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml
index f8b6fa253c4..33be80a1a7c 100644
--- a/app/views/projects/blob/_editor.html.haml
+++ b/app/views/projects/blob/_editor.html.haml
@@ -9,7 +9,7 @@
- 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: "文件名",
required: true, class: 'form-control new-file-name'
.pull-right
diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml
index 84694203d7d..e93db11adf7 100644
--- a/app/views/projects/blob/_new_dir.html.haml
+++ b/app/views/projects/blob/_new_dir.html.haml
@@ -3,19 +3,19 @@
.modal-content
.modal-header
%a.close{href: "#", "data-dismiss" => "modal"} ×
- %h3.page-title Create New Directory
+ %h3.page-title 创建新目录
.modal-body
= form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form js-quick-submit js-requires-input' do
.form-group
- = label_tag :dir_name, 'Directory name', class: 'control-label'
+ = label_tag :dir_name, '目录名称', class: 'control-label'
.col-sm-10
= text_field_tag :dir_name, params[:dir_name], required: true, class: 'form-control'
- = render 'shared/new_commit_form', placeholder: "Add new directory"
+ = render 'shared/new_commit_form', placeholder: "增加新目录"
.form-actions
- = submit_tag "Create directory", class: 'btn btn-create'
- = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
+ = submit_tag "创建目录", class: 'btn btn-create'
+ = link_to "取消", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
- unless can?(current_user, :push_code, @project)
.inline.prepend-left-10
diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml
index 2e1f32fd15e..bb9f8316468 100644
--- a/app/views/projects/blob/_remove.html.haml
+++ b/app/views/projects/blob/_remove.html.haml
@@ -3,16 +3,16 @@
.modal-content
.modal-header
%a.close{href: "#", "data-dismiss" => "modal"} ×
- %h3.page-title Delete #{@blob.name}
+ %h3.page-title 删除 #{@blob.name}
.modal-body
= form_tag namespace_project_blob_path(@project.namespace, @project, @id), method: :delete, class: 'form-horizontal js-replace-blob-form js-quick-submit js-requires-input' do
- = render 'shared/new_commit_form', placeholder: "Delete #{@blob.name}"
+ = render 'shared/new_commit_form', placeholder: "删除 #{@blob.name}"
.form-group
.col-sm-offset-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 '删除文件', class: 'btn btn-remove btn-remove-file'
+ = link_to "取消", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
:javascript
new NewCommitForm($('.js-replace-blob-form'))
diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml
index 70d8009eb2b..48572b24a7f 100644
--- a/app/views/projects/blob/edit.html.haml
+++ b/app/views/projects/blob/edit.html.haml
@@ -15,7 +15,7 @@
= form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-quick-submit js-requires-input js-edit-blob-form') 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: "更新 #{@blob.name}"
= hidden_field_tag 'last_commit', @last_commit
= hidden_field_tag 'content', '', id: "file-content"
diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml
index 1dd2b5c0af7..af04507f371 100644
--- a/app/views/projects/blob/new.html.haml
+++ b/app/views/projects/blob/new.html.haml
@@ -1,13 +1,13 @@
-- page_title "New File", @path.presence, @ref
+- page_title "新文件", @path.presence, @ref
= render "header_title"
%h3.page-title
- New File
+ 新文件
.file-editor
= form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal js-new-blob-form js-quick-submit js-requires-input') do
= render 'projects/blob/editor', ref: @ref
- = render 'shared/new_commit_form', placeholder: "Add new file"
+ = render 'shared/new_commit_form', placeholder: "增加新文件"
= hidden_field_tag 'content', '', id: 'file-content'
= render 'projects/commit_button', ref: @ref,
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml
index 811d304ea75..4f764db7bdd 100644
--- a/app/views/projects/builds/index.html.haml
+++ b/app/views/projects/builds/index.html.haml
@@ -1,58 +1,58 @@
-- page_title "Builds"
+- page_title "构建"
= render "header_title"
.top-area
%ul.nav-links
%li{class: ('active' if @scope.nil?)}
= link_to project_builds_path(@project) do
- All
+ 全部
%span.badge.js-totalbuilds-count
= number_with_delimiter(@all_builds.count(:id))
%li{class: ('active' if @scope == 'running')}
= link_to project_builds_path(@project, scope: :running) do
- Running
+ 正在运行
%span.badge.js-running-count
= number_with_delimiter(@all_builds.running_or_pending.count(:id))
%li{class: ('active' if @scope == 'finished')}
= link_to project_builds_path(@project, scope: :finished) do
- Finished
+ 已结束
%span.badge.js-running-count
= number_with_delimiter(@all_builds.finished.count(:id))
.nav-controls
- if can?(current_user, :update_build, @project)
- if @all_builds.running_or_pending.any?
- = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project),
- data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
+ = link_to '取消运行', cancel_all_namespace_project_builds_path(@project.namespace, @project),
+ data: { confirm: '确定要继续么?' }, class: 'btn btn-danger', method: :post
= link_to ci_lint_path, class: 'btn btn-default' do
= icon('wrench')
%span CI Lint
.gray-content-block
- #{(@scope || 'running').capitalize} builds from this project
+ 列出本项目 #{(@scope || 'running').capitalize} 的构建
%ul.content-list
- if @builds.blank?
%li
- .nothing-here-block No builds to show
+ .nothing-here-block 没有构建
- else
.table-holder
%table.table.builds
%thead
%tr
- %th Status
- %th Build ID
- %th Commit
- %th Ref
- %th Stage
- %th Name
- %th Duration
- %th Finished at
+ %th 状态
+ %th 构建 ID
+ %th 提交
+ %th 参考
+ %th 阶段
+ %th 名称
+ %th 运行时间
+ %th 结束时间
- if @project.build_coverage_enabled?
- %th Coverage
+ %th 覆盖率
%th
= render @builds, commit_sha: true, stage: true, allow_retry: true, coverage: @project.build_coverage_enabled?
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index 2f85e363c9d..a8c5a726618 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -1,16 +1,16 @@
-- page_title "#{@build.name} (##{@build.id})", "Builds"
+- page_title "#{@build.name} (##{@build.id})", "构建"
= render "header_title"
.build-page
.gray-content-block.top-block
- Build ##{@build.id} for commit
- %strong.monospace= link_to @build.commit.short_sha, ci_status_path(@build.commit)
- from
+ 从
= link_to @build.ref, namespace_project_commits_path(@project.namespace, @project, @build.ref)
+ %strong.monospace= link_to @build.commit.short_sha, ci_status_path(@build.commit)
+ 提交的构建 ##{@build.id}
- merge_request = @build.merge_request
- if merge_request
- via
- = link_to "merge request ##{merge_request.iid}", merge_request_path(merge_request)
+ 来自于
+ = link_to "合并请求 ##{merge_request.iid}", merge_request_path(merge_request)
#up-build-trace
- builds = @build.commit.matrix_builds(@build)
@@ -50,26 +50,26 @@
.bs-callout.bs-callout-warning
%p
- if no_runners_for_project?(@build.project)
- This build is stuck, because the project doesn't have any runners online assigned to it.
+ 此构建被卡住,因为没有 runner 指定给该项目。
- elsif @build.tags.any?
- This build is stuck, because you don't have any active runners online with any of these tags assigned to them:
+ 此构建被卡住,因为没有指定标签的 runner 指定给该项目。指定的标签如下:
- @build.tags.each do |tag|
%span.label.label-primary
= tag
- else
- This build is stuck, because you don't have any active runners that can run this build.
+ 此构建被卡住,因为没有可用的 runner 来运行此构建。
%br
- Go to
+ 转到
= link_to namespace_project_runners_path(@build.project.namespace, @build.project) do
- Runners page
+ Runners 页面
.row.prepend-top-default
.col-md-9
.clearfix
- if @build.active?
.autoscroll-container
- %button.btn.btn-success.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll
+ %button.btn.btn-success.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} 开启自动滚动
.clearfix
#js-build-scroll.scroll-controls
= link_to '#up-build-trace', class: 'btn' do
@@ -93,59 +93,59 @@
- if @build.coverage
.build-widget
%h4.title
- Test coverage
+ 测试覆盖
%h1 #{@build.coverage}%
- if can?(current_user, :read_build, @project) && @build.artifacts?
.build-widget.artifacts
- %h4.title Build artifacts
+ %h4.title 构建附件
.center
.btn-group{ role: :group }
= link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary' do
= icon('download')
- Download
+ 下载
- if @build.artifacts_metadata?
= link_to browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary' do
= icon('folder-open')
- Browse
+ 浏览
.build-widget
%h4.title
- Build ##{@build.id}
+ 构建 ##{@build.id}
- if can?(current_user, :update_build, @project)
.center
.btn-group{ role: :group }
- if @build.active?
- = link_to "Cancel", cancel_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-danger', method: :post
+ = link_to "取消", cancel_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-danger', method: :post
- elsif @build.retryable?
- = link_to "Retry", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary', method: :post
+ = link_to "重试", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary', method: :post
- if @build.erasable?
= link_to erase_namespace_project_build_path(@project.namespace, @project, @build),
class: 'btn btn-sm btn-warning', method: :post,
- data: { confirm: 'Are you sure you want to erase this build?' } do
+ data: { confirm: '确定要删除此构建么?' } do
= icon('eraser')
- Erase
+ 删除
.clearfix
- if @build.duration
%p
- %span.attr-name Duration:
+ %span.attr-name 运行时间:
#{duration_in_words(@build.finished_at, @build.started_at)}
%p
- %span.attr-name Created:
+ %span.attr-name 创建时间:
#{time_ago_with_tooltip(@build.created_at)}
- if @build.finished_at
%p
- %span.attr-name Finished:
+ %span.attr-name 结束时间:
#{time_ago_with_tooltip(@build.finished_at)}
- if @build.erased_at
%p
- %span.attr-name Erased:
+ %span.attr-name 删除时间:
#{time_ago_with_tooltip(@build.erased_at)}
%p
- %span.attr-name Runner:
+ %span.attr-name Runner:
- if @build.runner && current_user && current_user.admin
= link_to "##{@build.runner.id}", admin_runner_path(@build.runner.id)
- elsif @build.runner
diff --git a/app/views/projects/buttons/_download.html.haml b/app/views/projects/buttons/_download.html.haml
index 6a60cfeff76..6c22a7bbca7 100644
--- a/app/views/projects/buttons/_download.html.haml
+++ b/app/views/projects/buttons/_download.html.haml
@@ -1,4 +1,4 @@
- unless @project.empty_repo?
- if can? current_user, :download_code, @project
- = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn has_tooltip', data: {container: "body"}, rel: 'nofollow', title: "Download ZIP" do
+ = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn has_tooltip', data: {container: "body"}, rel: 'nofollow', title: "下载 ZIP" do
= icon('download')
diff --git a/app/views/projects/commit/_builds.html.haml b/app/views/projects/commit/_builds.html.haml
index 003b7c18d0e..ab57e167c6b 100644
--- a/app/views/projects/commit/_builds.html.haml
+++ b/app/views/projects/commit/_builds.html.haml
@@ -2,45 +2,45 @@
.pull-right
- if can?(current_user, :update_build, @ci_commit.project)
- if @ci_commit.builds.latest.failed.any?(&:retryable?)
- = link_to "Retry failed", retry_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: 'btn btn-grouped btn-primary', method: :post
+ = link_to "重试失败", retry_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: 'btn btn-grouped btn-primary', method: :post
- if @ci_commit.builds.running_or_pending.any?
- = link_to "Cancel running", cancel_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), data: { confirm: 'Are you sure?' }, class: 'btn btn-grouped btn-danger', method: :post
+ = link_to "取消运行", cancel_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), data: { confirm: '确定要继续么?' }, class: 'btn btn-grouped btn-danger', method: :post
.oneline
- = pluralize @statuses.count(:id), "build"
- if defined?(link_to_commit) && link_to_commit
- for commit
= link_to @ci_commit.short_sha, namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: "monospace"
+ 提交的
+ = pluralize @statuses.count(:id), "次构建", "次构建"
- if @ci_commit.duration > 0
- in
+ 耗费
= time_interval_in_words @ci_commit.duration
- if @ci_commit.yaml_errors.present?
.bs-callout.bs-callout-danger
- %h4 Found errors in your .gitlab-ci.yml:
+ %h4 在 .gitlab-ci.yml 中发现错误:
%ul
- @ci_commit.yaml_errors.split(",").each do |error|
%li= error
- You can also test your .gitlab-ci.yml in the #{link_to "Lint", ci_lint_path}
+ 你也可以使用 #{link_to "Lint", ci_lint_path} 工具测试你的 .gitlab-ci.yml 文件
- if @ci_commit.project.builds_enabled? && !@ci_commit.ci_yaml_file
.bs-callout.bs-callout-warning
- \.gitlab-ci.yml not found in this commit
+ 此提交里面没有发现 .gitlab-ci.yml 文件
.table-holder
%table.table.builds
%thead
%tr
- %th Status
- %th Build ID
- %th Ref
- %th Stage
- %th Name
- %th Duration
- %th Finished at
+ %th 状态
+ %th 构建 ID
+ %th 参考
+ %th 阶段
+ %th 名称
+ %th 运行时间
+ %th 结束时间
- if @ci_commit.project.build_coverage_enabled?
- %th Coverage
+ %th 覆盖率
%th
- @ci_commit.refs.each do |ref|
- builds = @ci_commit.statuses.for_ref(ref).latest.ordered
@@ -48,20 +48,20 @@
- if @ci_commit.retried.any?
.gray-content-block.second-block
- Retried builds
+ 重试的构建
.table-holder
%table.table.builds
%thead
%tr
- %th Status
- %th Build ID
- %th Ref
- %th Stage
- %th Name
- %th Duration
- %th Finished at
+ %th 状态
+ %th 构建 ID
+ %th 参考
+ %th 阶段
+ %th 名称
+ %th 运行时间
+ %th 结束时间
- if @ci_commit.project.build_coverage_enabled?
- %th Coverage
+ %th 覆盖率
%th
= render @ci_commit.retried, coverage: @ci_commit.project.build_coverage_enabled?, stage: true
diff --git a/app/views/projects/commits/_commit_list.html.haml b/app/views/projects/commits/_commit_list.html.haml
index bac9e244d36..8755b1cf359 100644
--- a/app/views/projects/commits/_commit_list.html.haml
+++ b/app/views/projects/commits/_commit_list.html.haml
@@ -3,12 +3,12 @@
%div.panel.panel-default
.panel-heading
- Commits (#{@commits.count})
+ 提交 (#{@commits.count})
- if hidden > 0
%ul.well-list
- commits.each do |commit|
= render "projects/commits/inline_commit", commit: commit, project: @project
%li.warning-row.unstyled
- #{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues.
+ #{number_with_delimiter(hidden)} 次更多提交因为性能问题而隐藏。
- else
%ul.well-list= render commits, project: @project
diff --git a/app/views/projects/commits/_head.html.haml b/app/views/projects/commits/_head.html.haml
index 7a5b0d993db..eced034283c 100644
--- a/app/views/projects/commits/_head.html.haml
+++ b/app/views/projects/commits/_head.html.haml
@@ -1,23 +1,23 @@
%ul.nav-links
= nav_link(controller: [:commit, :commits]) do
= link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do
- Commits
+ 提交
%span.badge= number_with_delimiter(@repository.commit_count)
= nav_link(controller: %w(network)) do
= link_to namespace_project_network_path(@project.namespace, @project, current_ref) do
- Network
+ 网络
= nav_link(controller: :compare) do
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: current_ref) do
- Compare
+ 比较
= nav_link(html_options: {class: branches_tab_class}) do
= link_to namespace_project_branches_path(@project.namespace, @project) do
- Branches
+ 分支
%span.badge.js-totalbranch-count= @repository.branch_count
= nav_link(controller: [:tags, :releases]) do
= link_to namespace_project_tags_path(@project.namespace, @project) do
- Tags
+ 标签
%span.badge.js-totaltags-count= @repository.tag_count
diff --git a/app/views/projects/deploy_keys/index.html.haml b/app/views/projects/deploy_keys/index.html.haml
index 44f7a37a459..830ec24c3a1 100644
--- a/app/views/projects/deploy_keys/index.html.haml
+++ b/app/views/projects/deploy_keys/index.html.haml
@@ -37,7 +37,7 @@
- if @available_public_keys.any?
%h5
- 所有项目可用的
+ 全部项目可用的
%strong 公开部署密钥
%ul.bordered-list
= render @available_public_keys
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index fa53fc429f5..8e114e999bc 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -20,7 +20,7 @@
%strong
= diff_file.new_path
- if diff_file.deleted_file
- deleted
+ 已删除
- if diff_file.mode_changed?
%small
@@ -44,7 +44,7 @@
- return unless blob.respond_to?('text?')
- if diff_file.too_large?
.nothing-here-block
- This diff could not be displayed because it is too large.
+ 此 diff 太大无法显示。
- else
- if blob_text_viewable?(blob)
- if diff_view == 'parallel'
@@ -55,4 +55,4 @@
- old_file = project.repository.prev_blob_for_diff(diff_commit, diff_file)
= render "projects/diffs/image", diff_file: diff_file, old_file: old_file, file: blob, index: i, diff_refs: diff_refs
- else
- .nothing-here-block No preview for this file type
+ .nothing-here-block 不能预览此文件类型
diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml
index 15536c17f8e..658e7933613 100644
--- a/app/views/projects/diffs/_warning.html.haml
+++ b/app/views/projects/diffs/_warning.html.haml
@@ -1,18 +1,18 @@
.alert.alert-warning
%h4
- Too many changes to show.
+ 要显示太多修改。
.pull-right
- unless diff_hard_limit_enabled?
- = link_to "Reload with full diff", url_for(params.merge(force_show_diff: true, format: nil)), class: "btn btn-sm"
+ = link_to "重新载入完整差异", url_for(params.merge(force_show_diff: true, format: nil)), class: "btn btn-sm"
- if current_controller?(:commit) or current_controller?(:merge_requests)
- if current_controller?(:commit)
- = link_to "Plain diff", namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff), class: "btn btn-sm"
- = link_to "Email patch", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch), class: "btn btn-sm"
+ = link_to "原始差异文件", namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff), class: "btn btn-sm"
+ = link_to "电子邮件补丁", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch), class: "btn btn-sm"
- elsif @merge_request && @merge_request.persisted?
- = link_to "Plain diff", merge_request_path(@merge_request, format: :diff), class: "btn btn-sm"
- = link_to "Email patch", merge_request_path(@merge_request, format: :patch), class: "btn btn-sm"
+ = link_to "原始差异文件", merge_request_path(@merge_request, format: :diff), class: "btn btn-sm"
+ = link_to "电子邮件补丁", merge_request_path(@merge_request, format: :patch), class: "btn btn-sm"
%p
- To preserve performance only
+ 为保证性能只显示
%strong #{diff_files.count} of #{diff_files.real_size}
- files are displayed.
+ 个文件。
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index d237384cee6..8df3c9d5b86 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -3,185 +3,184 @@
.project-edit-content
.panel.panel-default
.panel-heading
- Project settings
+ 项目设置
.panel-body
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit_project form-horizontal fieldset-form" }, authenticity_token: true do |f|
%fieldset
.form-group.project_name_holder
= f.label :name, class: 'control-label' do
- Project name
+ 项目名称
.col-sm-10
= f.text_field :name, class: "form-control", id: "project_name_edit"
.form-group
= f.label :description, class: 'control-label' do
- Project description
- %span.light (optional)
+ 项目描述
+ %span.light (可选)
.col-sm-10
= f.text_area :description, class: "form-control", rows: 3, maxlength: 250
- unless @project.empty_repo?
.form-group
- = f.label :default_branch, "Default Branch", class: 'control-label'
+ = f.label :default_branch, "默认分支", class: 'control-label'
.col-sm-10= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
= render 'shared/visibility_level', f: f, visibility_level: @project.visibility_level, can_change_visibility_level: can_change_visibility_level?(@project, current_user), form_model: @project
.form-group
- = f.label :tag_list, "Tags", class: 'control-label'
+ = f.label :tag_list, "标签", class: 'control-label'
.col-sm-10
= f.text_field :tag_list, value: @project.tag_list.to_s, maxlength: 2000, class: "form-control"
- %p.help-block Separate tags with commas.
+ %p.help-block 使用英文逗号分割。
%fieldset.features
%legend
- Features:
+ 功能:
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :issues_enabled do
= f.check_box :issues_enabled
- %strong Issues
+ %strong 问题
%br
- %span.descr Lightweight issue tracking system for this project
+ %span.descr 轻量级问题跟踪系统
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :merge_requests_enabled do
= f.check_box :merge_requests_enabled
- %strong Merge Requests
+ %strong 合并请求
%br
- %span.descr Submit changes to be merged upstream
+ %span.descr 合并上游修改
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :builds_enabled do
= f.check_box :builds_enabled
- %strong Builds
+ %strong 构建
%br
- %span.descr Test and deploy your changes before merge
+ %span.descr 合并前测试和部署变更
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :wiki_enabled do
= f.check_box :wiki_enabled
- %strong Wiki
+ %strong 维基
%br
- %span.descr Pages for project documentation
+ %span.descr 项目文档页面
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :snippets_enabled do
= f.check_box :snippets_enabled
- %strong Snippets
+ %strong 代码片段
%br
- %span.descr Share code pastes with others out of git repository
+ %span.descr 共享 git 版本仓库外的代码
= render 'builds_settings', f: f
%fieldset.features
%legend
- Project avatar:
+ 项目头像:
.form-group
.col-sm-offset-2.col-sm-10
- if @project.avatar?
= project_icon("#{@project.namespace.to_param}/#{@project.to_param}", alt: '', class: 'avatar project-avatar s160')
%p.light
- if @project.avatar_in_git
- Project avatar in repository: #{ @project.avatar_in_git }
+ 项目头像保存在版本仓库:#{ @project.avatar_in_git }
%p.light
- if @project.avatar?
- You can change your project avatar here
+ 在这里可以修改项目头像
- else
- You can upload a project avatar here
+ 在这里可以上传项目头像
%a.choose-btn.btn.btn-sm.js-choose-project-avatar-button
%i.icon-paper-clip
- %span Choose File ...
+ %span 选择文件...
&nbsp;
%span.file_name.js-avatar-filename File name...
= f.file_field :avatar, class: "js-project-avatar-input hidden"
- .light The maximum file size allowed is 200KB.
+ .light 文件大小限制为 200KB。
- if @project.avatar?
%hr
- = link_to 'Remove avatar', namespace_project_avatar_path(@project.namespace, @project), data: { confirm: "Project avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
+ = link_to '删除头像', namespace_project_avatar_path(@project.namespace, @project), data: { confirm: "确定要删除项目头像么?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
.form-actions
- = f.submit 'Save changes', class: "btn btn-save"
+ = f.submit '保存修改', class: "btn btn-save"
.danger-settings
.panel.panel-default
- .panel-heading Housekeeping
+ .panel-heading 维护
.errors-holder
.panel-body
%p
- Runs a number of housekeeping tasks within the current repository,
- such as compressing file revisions and removing unreachable objects.
+ 执行当前仓库的一些维护任务,诸如压缩文件修订版本和删除无用对象等。
%br
.form-actions
- = link_to 'Housekeeping', housekeeping_namespace_project_path(@project.namespace, @project),
+ = link_to '维护', housekeeping_namespace_project_path(@project.namespace, @project),
method: :post, class: "btn btn-default"
- if can? current_user, :archive_project, @project
- if @project.archived?
.panel.panel-success
.panel-heading
- Unarchive project
+ 解档项目
.panel-body
%p
- Unarchiving the project will mark its repository as active.
+ 解档项目将恢复项目版本仓库可修改。
%br
- The project can be committed to.
+ 项目可以被提交。
%br
- %strong Once active this project shows up in the search and on the dashboard.
+ %strong 解档后该项目可以被搜索到并显示在仪表盘中。
.form-actions
- = link_to 'Unarchive project', unarchive_namespace_project_path(@project.namespace, @project),
- data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be committed to again." },
+ = link_to '解档项目', unarchive_namespace_project_path(@project.namespace, @project),
+ data: { confirm: "确定要解档本项目么?\n解档项目后可以重新提交版本仓库修改。" },
method: :post, class: "btn btn-success"
- else
.panel.panel-warning
.panel-heading
- Archive project
+ 归档项目
.panel-body
%p
- Archiving the project will mark its repository as read-only.
+ 归档项目将标识其版本仓库为只读。
%br
- It is hidden from the dashboard and doesn't show up in searches.
+ 同时将在仪表盘隐藏并且不能搜索到。
%br
- %strong Archived projects cannot be committed to!
+ %strong 已归档的项目不能被提交!
.form-actions
- = link_to 'Archive project', archive_namespace_project_path(@project.namespace, @project),
- data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
+ = link_to '归档项目', archive_namespace_project_path(@project.namespace, @project),
+ data: { confirm: "确定要归档本项目么?\n已归档的项目不能被提交。" },
method: :post, class: "btn btn-warning"
- else
- .nothing-here-block Only the project owner can archive a project
+ .nothing-here-block 只有项目所有者才能归档项目
.panel.panel-default.panel.panel-warning
- .panel-heading Rename repository
+ .panel-heading 重命名仓库
.errors-holder
.panel-body
= form_for([@project.namespace.becomes(Namespace), @project], html: { class: 'form-horizontal' }) do |f|
.form-group.project_name_holder
= f.label :name, class: 'control-label' do
- Project name
+ 项目名称
.col-sm-9
.form-group
= f.text_field :name, class: "form-control"
.form-group
= f.label :path, class: 'control-label' do
- %span Path
+ %span 路径
.col-sm-9
.form-group
.input-group
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index 1ce0a9e3018..f7c7eda526a 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -9,31 +9,31 @@
.gray-content-block.second-block.center
%h3.page-title
- The repository for this project is empty
+ 此项目的版本仓库是空的
- if can?(current_user, :push_code, @project)
%p
- If you already have files you can push them using command line instructions below.
+ 如有已有文件请按照下面的命令行指令推送它们。
%p
- Otherwise you can start with
- = link_to "adding README", new_readme_path, class: 'underlined-link'
- file to this project.
+ 或者可以从
+ = link_to "增加 README", new_readme_path, class: 'underlined-link'
+ 文件开始本项目。
- if can?(current_user, :push_code, @project)
%div{ class: container_class }
.prepend-top-20
.empty_wrapper
%h3.page-title-empty
- Command line instructions
+ 命令行指令
%div.git-empty
%fieldset
- %h5 Git global setup
+ %h5 Git 全局设置
%pre.light-well
:preserve
git config --global user.name "#{h git_user_name}"
git config --global user.email "#{h git_user_email}"
%fieldset
- %h5 Create a new repository
+ %h5 创建新版本库
%pre.light-well
:preserve
git clone #{ content_tag(:span, default_url_to_repo, class: 'clone')}
diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml
index 4bcf2d9d533..074219cab7e 100644
--- a/app/views/projects/forks/index.html.haml
+++ b/app/views/projects/forks/index.html.haml
@@ -1,16 +1,16 @@
.top-area
.nav-text
- - full_count_title = "#{@public_forks_count} public and #{@private_forks_count} private"
- == #{pluralize(@total_forks_count, 'fork')}: #{full_count_title}
+ - full_count_title = "#{@public_forks_count} 个公开和 #{@private_forks_count} 个私有"
+ == #{pluralize(@total_forks_count, '个派生', '个派生')}: #{full_count_title}
.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: '搜索派生', class: 'projects-list-filter project-filter-form-field form-control input-short',
spellcheck: false, data: { 'filter-selector' => 'span.namespace-name' }
.dropdown
%button.dropdown-toggle.btn.sort-forks{type: 'button', 'data-toggle' => 'dropdown'}
- %span.light sort:
+ %span.light 排序:
- if @sort.present?
= sort_options_hash[@sort]
- else
@@ -30,13 +30,13 @@
- 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-new' do
+ = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: '转到您的派生', class: 'btn btn-new' do
= icon('code-fork fw')
- Fork
+ 派生
- else
- = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-new' do
+ = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "派生项目", class: 'btn btn-new' do
= icon('code-fork fw')
- Fork
+ 派生
= render 'projects', projects: @forks
@@ -44,5 +44,5 @@
- if @private_forks_count > 0
.private-forks-notice
= icon('lock fw', base: 'circle', class: 'fa-lg private-fork-icon')
- %strong= pluralize(@private_forks_count, 'private fork')
- %span you have no access to.
+ %strong= pluralize(@private_forks_count, '个私有派生', '个私有派生')
+ %span 您没有权限访问。
diff --git a/app/views/projects/graphs/ci/_builds.haml b/app/views/projects/graphs/ci/_builds.haml
index a8fd0b9ee8b..439d34f44d2 100644
--- a/app/views/projects/graphs/ci/_builds.haml
+++ b/app/views/projects/graphs/ci/_builds.haml
@@ -7,7 +7,7 @@
&nbsp;
%span.cgray
= icon("circle")
- 所有
+ 全部
.prepend-top-default
%p.light
diff --git a/app/views/projects/group_links/index.html.haml b/app/views/projects/group_links/index.html.haml
index 13f5fc141fa..7a5c5d02928 100644
--- a/app/views/projects/group_links/index.html.haml
+++ b/app/views/projects/group_links/index.html.haml
@@ -1,12 +1,12 @@
-- page_title "Groups"
-%h3.page_title Share project with other groups
+- page_title "群组"
+%h3.page_title 分享项目给其他群组
%p.light
- Projects can be stored in only one group at once. However you can share a project with other groups here.
+ 项目只在一个群组内保存。但可以在这里分享项目到其他群组。
%hr
- if @group_links.present?
.enabled-groups.panel.panel-default
.panel-heading
- Already shared with
+ 已分享给
%ul.well-list
- @group_links.each do |group_link|
- group = group_link.group
@@ -14,28 +14,28 @@
.pull-right
= link_to namespace_project_group_link_path(@project.namespace, @project, group_link), method: :delete, class: 'btn btn-sm' do
%i.icon-remove
- disable sharing
+ 禁止分享
= link_to group do
%strong
%i.icon-folder-open
= group.name
%br
- .light up to #{group_link.human_access}
+ .light 权限:#{group_link.human_access}
.available-groups
%h4
- Can be shared with
+ 可以分享给
%div
= form_tag namespace_project_group_links_path(@project.namespace, @project), method: :post, class: 'form-horizontal' do
.form-group
- = label_tag :link_group_id, 'Group', class: 'control-label'
+ = label_tag :link_group_id, '群组', class: 'control-label'
.col-sm-10
= groups_select_tag(:link_group_id, skip_group: @project.group.try(:path))
.form-group
- = label_tag :link_group_access, 'Max access level', class: 'control-label'
+ = label_tag :link_group_access, '最大访问等级', class: 'control-label'
.col-sm-10
= select_tag :link_group_access, options_for_select(ProjectGroupLink.access_options, ProjectGroupLink.default_access), class: "form-control"
.form-actions
- = submit_tag "Share", class: "btn btn-create"
+ = submit_tag "分享", class: "btn btn-create"
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml
index 67d016bd871..ac0db914b10 100644
--- a/app/views/projects/hooks/index.html.haml
+++ b/app/views/projects/hooks/index.html.haml
@@ -1,10 +1,9 @@
-- page_title "Webhooks"
+- page_title "Web 钩子"
%h3.page-title
- Webhooks
+ Web 钩子
%p.light
- #{link_to "Webhooks ", help_page_path("web_hooks", "web_hooks"), class: "vlink"} can be
- used for binding events when something is happening within the project.
+ #{link_to "Web 钩子", help_page_path("web_hooks", "web_hooks"), class: "vlink"}用于在项目发生相关事件时通知外部服务器。
%hr.clearfix
@@ -14,78 +13,78 @@
- @hook.errors.full_messages.each do |msg|
%p= msg
.form-group
- = f.label :url, "URL", class: 'control-label'
+ = f.label :url, "链接", class: 'control-label'
.col-sm-10
= f.text_field :url, class: "form-control", placeholder: 'http://example.com/trigger-ci.json'
.form-group
- = f.label :url, "Trigger", class: 'control-label'
+ = f.label :url, "触发", class: 'control-label'
.col-sm-10.prepend-top-10
%div
= f.check_box :push_events, class: 'pull-left'
.prepend-left-20
= f.label :push_events, class: 'list-label' do
- %strong Push events
+ %strong 推送事件
%p.light
- This url will be triggered by a push to the repository
+ 推送仓库时将触发此链接
%div
= f.check_box :tag_push_events, class: 'pull-left'
.prepend-left-20
= f.label :tag_push_events, class: 'list-label' do
- %strong Tag push events
+ %strong 标签推送事件
%p.light
- This url will be triggered when a new tag is pushed to the repository
+ 新标签推送仓库时将触发此链接
%div
= f.check_box :note_events, class: 'pull-left'
.prepend-left-20
= f.label :note_events, class: 'list-label' do
- %strong Comments
+ %strong 评论
%p.light
- This url will be triggered when someone adds a comment
+ 增加新评论时将触发此链接
%div
= f.check_box :issues_events, class: 'pull-left'
.prepend-left-20
= f.label :issues_events, class: 'list-label' do
- %strong Issues events
+ %strong 问题事件
%p.light
- This url will be triggered when an issue is created/updated/merged
+ 问题创建、更新、合并时将触发此链接
%div
= f.check_box :merge_requests_events, class: 'pull-left'
.prepend-left-20
= f.label :merge_requests_events, class: 'list-label' do
- %strong Merge Request events
+ %strong 合并请求事件
%p.light
- This url will be triggered when a merge request is created/updated/merged
+ 合并请求创建、更新、合并时将触发此链接
%div
= f.check_box :build_events, class: 'pull-left'
.prepend-left-20
= f.label :build_events, class: 'list-label' do
- %strong Build events
+ %strong 构建事件
%p.light
- This url will be triggered when the build status changes
+ 构建状态改变时将触发此链接
.form-group
- = f.label :enable_ssl_verification, "SSL verification", class: 'control-label checkbox'
+ = f.label :enable_ssl_verification, "SSL 证书验证", class: 'control-label checkbox'
.col-sm-10
.checkbox
= f.label :enable_ssl_verification do
= f.check_box :enable_ssl_verification
- %strong Enable SSL verification
+ %strong 开启 SSL 证书验证
.form-actions
- = f.submit "Add Webhook", class: "btn btn-create"
+ = f.submit "增加 Web 钩子", class: "btn btn-create"
-if @hooks.any?
.panel.panel-default
.panel-heading
- Webhooks (#{@hooks.count})
+ Web 钩子 (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
%li
.pull-right
- = link_to 'Test Hook', test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm btn-grouped"
- = link_to 'Remove', namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
+ = link_to '测试钩子', test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm btn-grouped"
+ = link_to '删除', namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: '确定要删除么?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
.clearfix
%span.monospace= hook.url
%p
- %w(push_events tag_push_events issues_events note_events merge_requests_events build_events).each do |trigger|
- if hook.send(trigger)
%span.label.label-gray= trigger.titleize
- SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
+ SSL 证书验证:#{hook.enable_ssl_verification ? "已启用" : "已禁用"}
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index b151393abab..360875974ac 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -1,7 +1,7 @@
- content_for :note_actions do
- if can?(current_user, :update_issue, @issue)
- = link_to 'Reopen issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true, original_text: "Reopen issue", alternative_text: "Comment & reopen issue"}, class: "btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
- = link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true, original_text: "Close issue", alternative_text: "Comment & close issue"}, class: "btn btn-nr btn-grouped btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
+ = link_to '重新打开问题', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true, original_text: "Reopen issue", alternative_text: "评论 & 重新打开问题"}, class: "btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: '重新打开问题'
+ = link_to '关闭问题', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true, original_text: "Close issue", alternative_text: "评论 & 关闭问题"}, class: "btn btn-nr btn-grouped btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: '关闭问题'
#notes
= render 'projects/notes/notes_with_form'
diff --git a/app/views/projects/issues/_merge_requests.html.haml b/app/views/projects/issues/_merge_requests.html.haml
index f767ce3f86a..f6e41f0cc50 100644
--- a/app/views/projects/issues/_merge_requests.html.haml
+++ b/app/views/projects/issues/_merge_requests.html.haml
@@ -1,6 +1,6 @@
- if @merge_requests.any?
%h2.merge-requests-title
- = pluralize(@merge_requests.count, 'Related Merge Request')
+ = pluralize(@merge_requests.count, '个相关合并请求', '个相关合并请求')
%ul.unstyled-list
- has_any_ci = @merge_requests.any?(&:ci_commit)
- @merge_requests.each do |merge_request|
diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml
index e66e4669d48..18dda5d944c 100644
--- a/app/views/projects/issues/_new_branch.html.haml
+++ b/app/views/projects/issues/_new_branch.html.haml
@@ -2,4 +2,4 @@
.pull-right
= link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid), method: :post, class: 'btn', title: @issue.to_branch_name do
= icon('code-fork')
- New Branch
+ 新分支
diff --git a/app/views/projects/issues/_related_branches.html.haml b/app/views/projects/issues/_related_branches.html.haml
index b10cd03515f..20b960705d7 100644
--- a/app/views/projects/issues/_related_branches.html.haml
+++ b/app/views/projects/issues/_related_branches.html.haml
@@ -1,6 +1,6 @@
- if @related_branches.any?
%h2.related-branches-title
- = pluralize(@related_branches.count, 'Related Branch')
+ = pluralize(@related_branches.count, '个相关分支', '个相关分支')
%ul.unstyled-list
- @related_branches.each do |branch|
%li
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index 2bcfdaaf4da..bb72955c608 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -9,12 +9,12 @@
.pull-left
.status-box{ class: "status-box-closed #{issue_button_visibility(@issue, false)}"}
%span.hidden-xs
- Closed
+ 已关闭
%span.hidden-sm.hidden-md.hidden-lg
= icon('check')
.status-box{ class: "status-box-open #{issue_button_visibility(@issue, true)}"}
%span.hidden-xs
- Open
+ 未关闭
%span.hidden-sm.hidden-md.hidden-lg
= icon('circle-o')
@@ -24,30 +24,31 @@
.issue-meta
= confidential_icon(@issue)
%strong.identifier
- Issue ##{@issue.iid}
+ 问题 ##{@issue.iid}
%span.creator
- opened
+ 在
.editor-details
.editor-details
= time_ago_with_tooltip(@issue.created_at)
- by
+ 由
%strong
= link_to_member(@project, @issue.author, size: 24, mobile_classes: "hidden-xs")
%strong
= link_to_member(@project, @issue.author, size: 24, mobile_classes: "hidden-sm hidden-md hidden-lg",
by_username: true, avatar: false)
+ 打开
.pull-right.issue-btn-group
- if can?(current_user, :create_issue, @project)
- = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped new-issue-link btn-success', title: 'New issue', id: 'new_issue_link' do
+ = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped new-issue-link btn-success', title: '新问题', id: 'new_issue_link' do
= icon('plus')
- New issue
+ 新问题
- if can?(current_user, :update_issue, @issue)
- = link_to 'Reopen issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
- = link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
+ = link_to '重新打开问题', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: '重新打开问题'
+ = link_to '关闭问题', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: '关闭问题'
= link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-nr btn-grouped issuable-edit' do
= icon('pencil-square-o')
- Edit
+ 编辑
.issue-details.issuable-details
diff --git a/app/views/projects/labels/_form.html.haml b/app/views/projects/labels/_form.html.haml
index dc6e8243ca4..9ed0690d782 100644
--- a/app/views/projects/labels/_form.html.haml
+++ b/app/views/projects/labels/_form.html.haml
@@ -8,23 +8,23 @@
%br
.form-group
- = f.label :title, class: 'control-label'
+ = f.label :title, "标题", class: 'control-label'
.col-sm-10
= f.text_field :title, class: "form-control", required: true, autofocus: true
.form-group
- = f.label :description, class: 'control-label'
+ = f.label :description, "描述", class: 'control-label'
.col-sm-10
= f.text_field :description, class: "form-control js-quick-submit"
.form-group
- = f.label :color, "Background color", class: 'control-label'
+ = f.label :color, "背景色", class: 'control-label'
.col-sm-10
.input-group
.input-group-addon.label-color-preview &nbsp;
= f.color_field :color, class: "form-control"
.help-block
- Choose any color.
+ 选择任意颜色。
%br
- Or you can choose one of suggested colors below
+ 或者在下面选择一个推荐的颜色
.suggest-colors
- suggested_colors.each do |color|
diff --git a/app/views/projects/labels/_label.html.haml b/app/views/projects/labels/_label.html.haml
index 4927d239c1e..8e36302a0a7 100644
--- a/app/views/projects/labels/_label.html.haml
+++ b/app/views/projects/labels/_label.html.haml
@@ -4,11 +4,11 @@
.pull-right
%strong.append-right-20
= link_to_label(label, type: :merge_request) do
- = pluralize label.open_merge_requests_count, 'open merge request'
+ = pluralize label.open_merge_requests_count, '个未关闭合并请求', '个未关闭合并请求'
%strong.append-right-20
= link_to_label(label) do
- = pluralize label.open_issues_count, 'open issue'
+ = pluralize label.open_issues_count, '个未关闭问题', '个未关闭问题'
- if current_user
.label-subscription{data: {url: toggle_subscription_namespace_project_label_path(@project.namespace, @project, label)}}
@@ -17,8 +17,8 @@
%span= label_subscription_toggle_button_text(label)
- if can? current_user, :admin_label, @project
- = link_to 'Edit', edit_namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm'
- = link_to 'Delete', namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"}
+ = link_to '编辑', edit_namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm'
+ = link_to '删除', namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "确定要删除这个标记么?"}
- if current_user
:javascript
diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml
index 393998f15b9..fdabcf57733 100644
--- a/app/views/projects/merge_requests/_discussion.html.haml
+++ b/app/views/projects/merge_requests/_discussion.html.haml
@@ -1,8 +1,8 @@
- content_for :note_actions do
- if can?(current_user, :update_merge_request, @merge_request)
- if @merge_request.open?
- = link_to 'Close merge request', merge_request_path(@merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request", data: {original_text: "Close merge request", alternative_text: "Comment & close merge request"}
+ = link_to '关闭合并请求', merge_request_path(@merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request", data: {original_text: "关闭合并请求", alternative_text: "评论 & 关闭合并请求"}
- if @merge_request.closed?
- = link_to 'Reopen merge request', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request", data: {original_text: "Reopen merge request", alternative_text: "Comment & reopen merge request"}
+ = link_to '重新打开合并请求', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request", data: {original_text: "重新打开合并请求", alternative_text: "评论 & 重新打开合并请求"}
#notes= render "projects/notes/notes_with_form"
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index bcfec88c3a6..25b4bd9ede6 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -49,8 +49,8 @@
.merge-request-info
#{merge_request.to_reference} &middot;
- opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')}
- by #{link_to_member(@project, merge_request.author, avatar: false)}
+ 在 #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')}
+ 由 #{link_to_member(@project, merge_request.author, avatar: false)} 打开
- if merge_request.target_project.default_branch != merge_request.target_branch
&nbsp;
= link_to namespace_project_commits_path(merge_request.project.namespace, merge_request.project, merge_request.target_branch) do
diff --git a/app/views/projects/merge_requests/_new_compare.html.haml b/app/views/projects/merge_requests/_new_compare.html.haml
index 74572b9b370..2f6895ae411 100644
--- a/app/views/projects/merge_requests/_new_compare.html.haml
+++ b/app/views/projects/merge_requests/_new_compare.html.haml
@@ -36,19 +36,19 @@
.light-well.append-bottom-default
.center
%h4
- There isn't anything to merge.
+ 没有任何内容合并。
%p.slead
- if @merge_request.source_branch == @merge_request.target_branch
- You'll need to use different branch names to get a valid comparison.
+ 必须使用不同的分支名来比较。
- else
%span.label-branch #{@merge_request.source_branch}
- and
+ 和
%span.label-branch #{@merge_request.target_branch}
- are the same.
+ 是一样的。
.form-actions
- = f.submit 'Compare branches and continue', class: "btn btn-new mr-compare-btn"
+ = f.submit '比较分支后继续', class: "btn btn-new mr-compare-btn"
:javascript
var source_branch = $("#merge_request_source_branch")
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index 4fad7e9f6fd..0847215cf72 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -21,16 +21,16 @@
%ul.merge-request-tabs.nav-links.no-top.no-bottom
%li.commits-tab
= link_to url_for(params), data: {target: 'div#commits', action: 'commits', toggle: 'tab'} do
- Commits
+ 提交
%span.badge= @commits.size
- if @ci_commit
%li.builds-tab.active
= link_to url_for(params), data: {target: 'div#builds', action: 'builds', toggle: 'tab'} do
- Builds
+ 构建
%span.badge= @statuses.size
%li.diffs-tab.active
= link_to url_for(params), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do
- Changes
+ 变更
%span.badge= @diffs.real_size
.tab-content
@@ -39,8 +39,8 @@
#diffs.diffs.tab-pane.active
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
.alert.alert-danger
- %h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
- %p To preserve performance the line changes are not shown.
+ %h4 此比较包含超过 #{MergeRequestDiff::COMMITS_SAFE_SIZE} 次提交。
+ %p 为保证性能,行变更内容没有显示。
- else
= render "projects/diffs/diffs", diffs: @diffs, project: @project, diff_refs: @merge_request.diff_refs
- if @ci_commit
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index ee5b9fd95a8..cafbacfe260 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -1,4 +1,4 @@
-- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
+- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "合并请求"
- page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes
@@ -18,20 +18,20 @@
- if @merge_request.source_branch_exists?
= link_to "#modal_merge_info", class: "btn btn-sm", "data-toggle" => "modal" do
= icon('cloud-download fw')
- Check out branch
+ 检出分支
%span.dropdown
%a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
= icon('download')
- Download as
+ 下载为
%span.caret
%ul.dropdown-menu
- %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
- %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
+ %li= link_to "电子邮件补丁", merge_request_path(@merge_request, format: :patch)
+ %li= link_to "原始差异文件", merge_request_path(@merge_request, format: :diff)
.normal
- %span Request to merge
+ %span 请求合并
%span.label-branch= source_branch_with_namespace(@merge_request)
- %span into
+ %span 到
= link_to namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch" do
= @merge_request.target_branch
- if @merge_request.open? && @merge_request.diverged_from_target_branch?
@@ -42,28 +42,28 @@
- if @merge_request.source_branch_exists? && @merge_request.mergeable? && @merge_request.can_be_merged_by?(current_user)
.light.prepend-top-default
- You can also accept this merge request manually using the
- = succeed '.' do
- = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
+ 也可以使用
+ = succeed '手工接受此合并请求。' do
+ = link_to "命令行", "#modal_merge_info", class: "how_to_merge_link vlink", title: "如何合并", "data-toggle" => "modal"
- if @commits.present?
%ul.merge-request-tabs.nav-links.no-top.no-bottom
%li.notes-tab
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: 'div#notes', action: 'notes', toggle: 'tab'} do
- Discussion
+ 讨论
%span.badge= @merge_request.mr_and_commit_notes.user.count
%li.commits-tab
= link_to commits_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: 'div#commits', action: 'commits', toggle: 'tab'} do
- Commits
+ 提交
%span.badge= @commits.size
- if @ci_commit
%li.builds-tab
= link_to builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#builds', action: 'builds', toggle: 'tab'} do
- Builds
+ 构建
%span.badge= @statuses.size
%li.diffs-tab
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do
- Changes
+ 变更
%span.badge= @merge_request.diff_size
.tab-content
diff --git a/app/views/projects/merge_requests/show/_diffs.html.haml b/app/views/projects/merge_requests/show/_diffs.html.haml
index 1b0bae86ad4..e9f388458a5 100644
--- a/app/views/projects/merge_requests/show/_diffs.html.haml
+++ b/app/views/projects/merge_requests/show/_diffs.html.haml
@@ -2,12 +2,12 @@
= render "projects/diffs/diffs", diffs: @merge_request.diffs(diff_options),
project: @merge_request.project, diff_refs: @merge_request.diff_refs
- elsif @merge_request_diff.empty?
- .nothing-here-block Nothing to merge from #{@merge_request.source_branch} into #{@merge_request.target_branch}
+ .nothing-here-block 从 #{@merge_request.source_branch} 到 #{@merge_request.target_branch} 无需合并
- else
.alert.alert-warning
%h4
- Changes view for this comparison is extremely large.
+ 此比较的变更视图非常巨大。
%p
- You can
- = link_to "download it", merge_request_path(@merge_request, format: :diff), class: "vlink"
- instead.
+ 可以
+ = link_to "下载差异", merge_request_path(@merge_request, format: :diff), class: "vlink"
+ 到本地查看。
diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
deleted file mode 100644
index ce5adf837b4..00000000000
--- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml
+++ /dev/null
@@ -1,63 +0,0 @@
-%div#modal_merge_info.modal
- .modal-dialog
- .modal-content
- .modal-header
- %a.close{href: "#", "data-dismiss" => "modal"} ×
- %h3 检出,在本地审查和合并
- .modal-body
- %p
- %strong 第 1 步.
- 获取并检出此合并请求的分支
- = clipboard_button(clipboard_target: 'pre#merge-info-1')
- %pre.dark#merge-info-1
- - if @merge_request.for_fork?
- :preserve
- git fetch #{h @merge_request.source_project.http_url_to_repo} #{h @merge_request.source_branch}
- git checkout -b #{h @merge_request.source_project_path}-#{h @merge_request.source_branch} FETCH_HEAD
- - else
- :preserve
- git fetch origin
- git checkout -b #{h @merge_request.source_branch} origin/#{h @merge_request.source_branch}
- %p
- %strong 第 2 步.
- 本地审查变更
-
- %p
- %strong 第 3 步.
- 合并分支并修复出现的任何冲突
- = clipboard_button(clipboard_target: 'pre#merge-info-3')
- %pre.dark#merge-info-3
- - if @merge_request.for_fork?
- :preserve
- git checkout #{h @merge_request.target_branch}
- git merge --no-ff #{h @merge_request.source_project_path}-#{h @merge_request.source_branch}
- - else
- :preserve
- git checkout #{h @merge_request.target_branch}
- git merge --no-ff #{h @merge_request.source_branch}
- %p
- %strong 第 4 步.
- 推送合并的结果到 GitLab
- = clipboard_button(clipboard_target: 'pre#merge-info-4')
- %pre.dark#merge-info-4
- :preserve
- git push origin #{h @merge_request.target_branch}
- - unless @merge_request.can_be_merged_by?(current_user)
- %p
- 请注意推送到 GitLab 需要有此仓库的写权限。
- %p
- %strong 提示:
- 你可以使用
- %a{href: 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/workflow/merge_requests.md#checkout-merge-requests-locally', target: '_blank'} 此指南
- 在本地检出合并请求
-
-:javascript
- $(function(){
- var modal = $('#modal_merge_info').modal({modal: true, show:false});
- $('.how_to_merge_link').bind("click", function(){
- modal.show();
- });
- $('.modal-header .close').bind("click", function(){
- modal.hide();
- })
- })
diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml
index ab4b1f14be5..f0008f5862d 100644
--- a/app/views/projects/merge_requests/show/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_title.html.haml
@@ -11,25 +11,26 @@
%span.hidden-sm.hidden-md.hidden-lg
MR
%span.hidden-xs
- Merge Request
+ 合并请求
!#{@merge_request.iid}
%span.creator
- opened
+ 在
.editor-details
= time_ago_with_tooltip(@merge_request.created_at)
- by
+ 由
%strong
= link_to_member(@project, @merge_request.author, size: 24, mobile_classes: "hidden-xs")
%strong
= link_to_member(@project, @merge_request.author, size: 24, mobile_classes: "hidden-sm hidden-md hidden-lg",
by_username: true, avatar: false)
+ 打开
.issue-btn-group.pull-right
- if can?(current_user, :update_merge_request, @merge_request)
- if @merge_request.open?
- = link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, class: 'btn btn-nr btn-grouped btn-close', title: 'Close merge request'
+ = link_to '关闭', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, class: 'btn btn-nr btn-grouped btn-close', title: '关闭合并请求'
= link_to edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-nr btn-grouped issuable-edit', id: 'edit_merge_request' do
= icon('pencil-square-o')
- Edit
+ 编辑
- if @merge_request.closed?
- = link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: 'btn btn-nr btn-grouped btn-reopen reopen-mr-link', title: 'Reopen merge request'
+ = link_to '重新打开', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: 'btn btn-nr btn-grouped btn-reopen reopen-mr-link', title: '重新打开合并请求'
diff --git a/app/views/projects/merge_requests/widget/open/_wip.html.haml b/app/views/projects/merge_requests/widget/open/_wip.html.haml
index c296422a9cf..5b446dac738 100644
--- a/app/views/projects/merge_requests/widget/open/_wip.html.haml
+++ b/app/views/projects/merge_requests/widget/open/_wip.html.haml
@@ -1,11 +1,11 @@
%h4
- This merge request is currently a Work In Progress
+ 此合并请求当前正在处理中
- if can?(current_user, :update_merge_request, @merge_request)
%p
- When this merge request is ready,
+ 当合并请求准备好时,
= link_to remove_wip_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), method: :post do
- remove the
+ 请从标题中删除
%code WIP:
- prefix from the title
- to allow it to be merged.
+ 前缀,
+ 以表示该合并请求可以被接受。
diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml
index 7d2545762b0..ff1cda373ae 100644
--- a/app/views/projects/milestones/_form.html.haml
+++ b/app/views/projects/milestones/_form.html.haml
@@ -7,11 +7,11 @@
.row
.col-md-6
.form-group
- = f.label :title, "Title", class: "control-label"
+ = f.label :title, "标题", class: "control-label"
.col-sm-10
= f.text_field :title, maxlength: 255, class: "form-control", required: true, autofocus: true
.form-group.milestone-description
- = f.label :description, "Description", class: "control-label"
+ = f.label :description, "描述", class: "control-label"
.col-sm-10
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
= render 'projects/zen', f: f, attr: :description, classes: 'description form-control'
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 0b1bfc946c1..c3019cf3ce9 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -44,7 +44,7 @@
- if @milestone.complete?(current_user) && @milestone.active?
.alert.alert-success.prepend-top-default
- %span All issues for this milestone are closed. You may close milestone now.
+ %span 本里程碑的全部问题和合并请求都已关闭,可以选择关闭本里程碑。
= render 'shared/milestones/summary', milestone: @milestone, project: @project
= render 'shared/milestones/tabs', milestone: @milestone
diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml
index 2999befffc6..a1cdb6bc990 100644
--- a/app/views/projects/notes/_edit_form.html.haml
+++ b/app/views/projects/notes/_edit_form.html.haml
@@ -6,5 +6,5 @@
= render 'projects/notes/hints'
.note-form-actions.clearfix
- = f.submit 'Save Comment', class: 'btn btn-nr btn-save btn-grouped js-comment-button'
- = link_to 'Cancel', '#', class: 'btn btn-nr btn-cancel note-edit-cancel'
+ = f.submit '保存评论', class: 'btn btn-nr btn-save btn-grouped js-comment-button'
+ = link_to '取消', '#', class: 'btn btn-nr btn-cancel note-edit-cancel'
diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml
index f675f092da1..5c7b8da0f5a 100644
--- a/app/views/projects/notes/_form.html.haml
+++ b/app/views/projects/notes/_form.html.haml
@@ -13,7 +13,7 @@
.error-alert
.note-form-actions.clearfix
- = f.submit 'Comment', class: "btn btn-nr btn-create comment-btn btn-grouped js-comment-button"
+ = f.submit '评论', class: "btn btn-nr btn-create comment-btn btn-grouped js-comment-button"
= yield(:note_actions)
%a.btn.btn-cancel.js-note-discard{role: "button", data: {cancel_text: "Cancel"}}
- Discard draft
+ 舍弃草稿
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index f7eeaece3db..91c71bb3f5e 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -25,7 +25,7 @@
= '@' + note.author.username
%span.note-last-update
- %a{name: dom_id(note), href: "##{dom_id(note)}", title: 'Link here'}
+ %a{name: dom_id(note), href: "##{dom_id(note)}", title: '链接'}
= time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note_created_ago')
.note-body{class: note_editable?(note) ? 'js-task-list-container' : ''}
.note-text
@@ -45,5 +45,5 @@
= icon('paperclip')
= note.attachment_identifier
= link_to delete_attachment_namespace_project_note_path(note.project.namespace, note.project, note),
- title: 'Delete this attachment', method: :delete, remote: true, data: { confirm: 'Are you sure you want to remove the attachment?' }, class: 'danger js-note-attachment-delete' do
+ title: '删除此附件', method: :delete, remote: true, data: { confirm: '确定要删除此附件么?' }, class: 'danger js-note-attachment-delete' do
= icon('trash-o', class: 'cred')
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml
index c7e60d615ec..c0df9848e34 100644
--- a/app/views/projects/protected_branches/index.html.haml
+++ b/app/views/projects/protected_branches/index.html.haml
@@ -6,9 +6,9 @@
.well
%p 保护分支设计为:
%ul
- %li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"}
- %li prevent anyone from force pushing to the branch
- %li prevent anyone from deleting the branch
+ %li 禁止除了#{link_to "主开发人员", help_page_path("permissions", "permissions"), class: "vlink"}外所有人推送
+ %li 禁止任何强制推送此分支
+ %li 禁止任何人删除此分支
%p 点击#{link_to "项目权限", help_page_path("permissions", "permissions"), class: "underlined-link"}了解更多
- if can? current_user, :admin_project, @project
diff --git a/app/views/projects/releases/edit.html.haml b/app/views/projects/releases/edit.html.haml
index fc86a1ace4f..27252abc2b3 100644
--- a/app/views/projects/releases/edit.html.haml
+++ b/app/views/projects/releases/edit.html.haml
@@ -1,12 +1,13 @@
-- page_title "Edit", @tag.name, "Tags"
+- page_title "编辑", @tag.name, "标签"
= render "projects/commits/header_title"
= render "projects/commits/head"
.gray-content-block
.oneline
.title
- Release notes for tag
+ 标签
%strong #{@tag.name}
+ 的发布备注
.prepend-top-default
= form_for(@release, method: :put, url: namespace_project_tag_release_path(@project.namespace, @project, @tag.name), html: { class: 'form-horizontal gfm-form release-form js-quick-submit' }) do |f|
diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml
index 24658319060..d42aee7e058 100644
--- a/app/views/projects/repositories/_download_archive.html.haml
+++ b/app/views/projects/repositories/_download_archive.html.haml
@@ -5,28 +5,28 @@
%span.btn-group{class: btn_class}
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do
%i.fa.fa-download
- %span Download zip
+ %span 下载 zip
%a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
%span.caret
%span.sr-only
- Select Archive Format
+ 选择打包格式
%ul.col-xs-10.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
%li
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), rel: 'nofollow' do
%i.fa.fa-download
- %span Download zip
+ %span 下载 zip
%li
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do
%i.fa.fa-download
- %span Download tar.gz
+ %span 下载 tar.gz
%li
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.bz2'), rel: 'nofollow' do
%i.fa.fa-download
- %span Download tar.bz2
+ %span 下载 tar.bz2
%li
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar'), rel: 'nofollow' do
%i.fa.fa-download
- %span Download tar
+ %span 下载 tar
- else
%span.btn-group{class: btn_class}
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml
index 367dc20dce7..8bfa1e0a146 100644
--- a/app/views/projects/tags/new.html.haml
+++ b/app/views/projects/tags/new.html.haml
@@ -7,35 +7,35 @@
= @error
%h3.page-title
- New Tag
+ 新标签
%hr
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal gfm-form tag-form js-quick-submit js-requires-input" do
.form-group
- = label_tag :tag_name, nil, class: 'control-label'
+ = label_tag :tag_name, '标签名称', class: 'control-label'
.col-sm-10
= text_field_tag :tag_name, params[:tag_name], required: true, tabindex: 1, autofocus: true, class: 'form-control'
.form-group
- = label_tag :ref, 'Create from', class: 'control-label'
+ = label_tag :ref, '创建自', class: 'control-label'
.col-sm-10
= text_field_tag :ref, params[:ref] || @project.default_branch, required: true, tabindex: 2, class: 'form-control'
- .help-block Branch name or commit SHA
+ .help-block 分支名称或提交 SHA
.form-group
- = label_tag :message, nil, class: 'control-label'
+ = label_tag :message, '信息', class: 'control-label'
.col-sm-10
= text_field_tag :message, nil, required: false, tabindex: 3, class: 'form-control'
- .help-block Optionally, enter a message to create an annotated tag.
+ .help-block 可选,输入创建标签的信息。
%hr
.form-group
- = label_tag :release_description, 'Release notes', class: 'control-label'
+ = label_tag :release_description, '发布备注', class: 'control-label'
.col-sm-10
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
= render 'projects/zen', attr: :release_description, classes: 'description form-control'
= render 'projects/notes/hints'
- .help-block Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.
+ .help-block 可选,可以给标签增加发布备注。备注会储存在 GitLab 数据库并显示在标签页。
.form-actions
- = button_tag 'Create tag', class: 'btn btn-create', tabindex: 3
- = link_to 'Cancel', namespace_project_tags_path(@project.namespace, @project), class: 'btn btn-cancel'
+ = button_tag '创建标签', class: 'btn btn-create', tabindex: 3
+ = link_to '取消', namespace_project_tags_path(@project.namespace, @project), class: 'btn btn-cancel'
:javascript
var availableRefs = #{@project.repository.ref_names.to_json};
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml
index fde8753f01f..b75cc0f1267 100644
--- a/app/views/projects/wikis/_form.html.haml
+++ b/app/views/projects/wikis/_form.html.haml
@@ -7,12 +7,12 @@
= f.hidden_field :title, value: @page.title
.form-group
- = f.label :format, class: 'control-label'
+ = f.label :format, '格式', class: 'control-label'
.col-sm-10
= f.select :format, options_for_select(ProjectWiki::MARKUPS, {selected: @page.format}), {}, class: "form-control"
.form-group
- = f.label :content, class: 'control-label'
+ = f.label :content, '内容', class: 'control-label'
.col-sm-10
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
= render 'projects/zen', f: f, attr: :content, classes: 'description form-control'