summaryrefslogtreecommitdiff
path: root/app/views/projects/blob
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r--app/views/projects/blob/_actions.html.haml10
-rw-r--r--app/views/projects/blob/_download.html.haml2
-rw-r--r--app/views/projects/blob/_header_title.html.haml2
-rw-r--r--app/views/projects/blob/_text.html.haml2
-rw-r--r--app/views/projects/blob/_upload.html.haml6
-rw-r--r--app/views/projects/blob/edit.html.haml4
-rw-r--r--app/views/projects/blob/preview.html.haml2
-rw-r--r--app/views/projects/blob/show.html.haml4
8 files changed, 16 insertions, 16 deletions
diff --git a/app/views/projects/blob/_actions.html.haml b/app/views/projects/blob/_actions.html.haml
index cdac50f7a8d..bba3cd7274c 100644
--- a/app/views/projects/blob/_actions.html.haml
+++ b/app/views/projects/blob/_actions.html.haml
@@ -1,17 +1,17 @@
.btn-group.tree-btn-group
- = link_to 'Raw', namespace_project_raw_path(@project.namespace, @project, @id),
+ = link_to '原文件', namespace_project_raw_path(@project.namespace, @project, @id),
class: 'btn btn-sm', target: '_blank'
-# only show normal/blame view links for text files
- if blob_text_viewable?(@blob)
- if current_page? namespace_project_blame_path(@project.namespace, @project, @id)
- = link_to 'Normal View', namespace_project_blob_path(@project.namespace, @project, @id),
+ = link_to '普通视图', namespace_project_blob_path(@project.namespace, @project, @id),
class: 'btn btn-sm'
- else
- = link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id),
+ = link_to '审查', namespace_project_blame_path(@project.namespace, @project, @id),
class: 'btn btn-sm' unless @blob.empty?
- = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id),
+ = link_to '历史', namespace_project_commits_path(@project.namespace, @project, @id),
class: 'btn btn-sm'
- = link_to 'Permalink', namespace_project_blob_path(@project.namespace, @project,
+ = link_to '永久链接', namespace_project_blob_path(@project.namespace, @project,
tree_join(@commit.sha, @path)), class: 'btn btn-sm'
- if current_user
diff --git a/app/views/projects/blob/_download.html.haml b/app/views/projects/blob/_download.html.haml
index 7908fcae3de..5cf08bd4f62 100644
--- a/app/views/projects/blob/_download.html.haml
+++ b/app/views/projects/blob/_download.html.haml
@@ -4,4 +4,4 @@
%h1.light
%i.fa.fa-download
%h4
- Download (#{number_to_human_size blob_size(blob)})
+ 下载 (#{number_to_human_size blob_size(blob)})
diff --git a/app/views/projects/blob/_header_title.html.haml b/app/views/projects/blob/_header_title.html.haml
index 78c5ef20a5f..eb679f6bb53 100644
--- a/app/views/projects/blob/_header_title.html.haml
+++ b/app/views/projects/blob/_header_title.html.haml
@@ -1 +1 @@
-- header_title project_title(@project, "Files", project_files_path(@project))
+- header_title project_title(@project, "文件", project_files_path(@project))
diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml
index d09cd73558c..8fba36f646d 100644
--- a/app/views/projects/blob/_text.html.haml
+++ b/app/views/projects/blob/_text.html.haml
@@ -7,4 +7,4 @@
= render 'shared/file_highlight', blob: blob
- else
.file-content.code
- .nothing-here-block Empty file
+ .nothing-here-block 空文件
diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml
index b1f50eb5f34..72dd4a88c42 100644
--- a/app/views/projects/blob/_upload.html.haml
+++ b/app/views/projects/blob/_upload.html.haml
@@ -9,8 +9,8 @@
.dropzone
.dropzone-previews.blob-upload-dropzone-previews
%p.dz-message.light
- Attach a file by drag & drop or
- = link_to 'click to upload', '#', class: "markdown-selector"
+ 拖放文件到此处或者
+ = link_to '点击上传', '#', class: "markdown-selector"
%br
.dropzone-alerts{class: "alert alert-danger data", style: "display:none"}
@@ -18,7 +18,7 @@
.form-actions
= button_tag button_title, class: 'btn btn-small btn-create btn-upload-file', id: 'submit-all'
- = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
+ = 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/edit.html.haml b/app/views/projects/blob/edit.html.haml
index effcce5a1c4..70d8009eb2b 100644
--- a/app/views/projects/blob/edit.html.haml
+++ b/app/views/projects/blob/edit.html.haml
@@ -1,4 +1,4 @@
-- page_title "Edit", @blob.path, @ref
+- page_title "编辑", @blob.path, @ref
= render "header_title"
.file-editor
@@ -6,7 +6,7 @@
%li.active
= link_to '#editor' do
= icon('edit')
- Edit File
+ 编辑文件
%li
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml
index 541dc96c45f..c7f1c9f8c61 100644
--- a/app/views/projects/blob/preview.html.haml
+++ b/app/views/projects/blob/preview.html.haml
@@ -22,4 +22,4 @@
%td.new_line.diff-line-num
%td.line_content{class: "#{line.type}"}= diff_line_content(line.text)
- else
- .nothing-here-block No changes.
+ .nothing-here-block 没有修改。
diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml
index 6988039b6c7..7439c3b5126 100644
--- a/app/views/projects/blob/show.html.haml
+++ b/app/views/projects/blob/show.html.haml
@@ -9,5 +9,5 @@
- if can_edit_blob?(@blob)
= render 'projects/blob/remove'
- - title = "Replace #{@blob.name}"
- = render 'projects/blob/upload', title: title, placeholder: title, button_title: 'Replace file', form_path: namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put
+ - title = "替换 #{@blob.name}"
+ = render 'projects/blob/upload', title: title, placeholder: title, button_title: '替换文件', form_path: namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put