diff options
Diffstat (limited to 'app/views/projects/buttons')
-rw-r--r-- | app/views/projects/buttons/_dropdown.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/buttons/_fork.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/buttons/_notifications.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/buttons/_star.html.haml | 10 |
4 files changed, 18 insertions, 18 deletions
diff --git a/app/views/projects/buttons/_dropdown.html.haml b/app/views/projects/buttons/_dropdown.html.haml index e7c85edff96..c4d4e640e52 100644 --- a/app/views/projects/buttons/_dropdown.html.haml +++ b/app/views/projects/buttons/_dropdown.html.haml @@ -7,39 +7,39 @@ %li = link_to url_for_new_issue(@project, only_path: true) do = icon('exclamation-circle fw') - New issue + 新问题 - merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project)) - if merge_project %li = link_to new_namespace_project_merge_request_path(merge_project.namespace, merge_project) do = icon('tasks fw') - New merge request + 新合并请求 - if can?(current_user, :create_snippet, @project) %li = link_to new_namespace_project_snippet_path(@project.namespace, @project) do = icon('file-text-o fw') - New snippet + 新代码片段 - if can?(current_user, :push_code, @project) %li.divider %li = link_to namespace_project_new_blob_path(@project.namespace, @project, @project.default_branch || 'master') do = icon('file fw') - New file + 新文件 %li = link_to new_namespace_project_branch_path(@project.namespace, @project) do = icon('code-fork fw') - New branch + 新分支 %li = link_to new_namespace_project_tag_path(@project.namespace, @project) do = icon('tags fw') - New tag + 新标签 - elsif current_user && current_user.already_forked?(@project) %li.divider %li = link_to namespace_project_new_blob_path(@project.namespace, @project, @project.default_branch || 'master') do = icon('file fw') - New file + 新文件 - elsif can?(current_user, :fork_project, @project) %li.divider %li @@ -50,4 +50,4 @@ continue: continue_params) = link_to fork_path, method: :post do = icon('file fw') - New file + 新文件 diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index 133531887a2..9fe85f6eb9c 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -1,17 +1,17 @@ - unless @project.empty_repo? - 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 has_tooltip' do + = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: '转到我的派生', class: 'btn has_tooltip' do = icon('code-fork fw') - Fork + 派生 %div.count-with-arrow %span.arrow %span.count = @project.forks_count - else - = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn has_tooltip' do + = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "派生项目", class: 'btn has_tooltip' do = icon('code-fork fw') - Fork + 派生 %div.count-with-arrow %span.arrow %span.count diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml index 3e83ec3912f..df9ff3fdd69 100644 --- a/app/views/projects/buttons/_notifications.html.haml +++ b/app/views/projects/buttons/_notifications.html.haml @@ -14,7 +14,7 @@ = notification_list_item(level, @membership) - when GroupMember - .btn.disabled.notifications-btn.has_tooltip{title: "To change the notification level, you need to be a member of the project itself, not only its group."} + .btn.disabled.notifications-btn.has_tooltip{title: "要修改通知等级,需要你是项目成员,而不仅仅是群组成员。"} = icon('bell') = notification_label(@membership) = icon('angle-down') diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 21ba426aaa1..cb55903d4ab 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -1,20 +1,20 @@ - if current_user - = link_to toggle_star_namespace_project_path(@project.namespace, @project), class: 'btn star-btn toggle-star has_tooltip', method: :post, remote: true, title: "Star project" do + = link_to toggle_star_namespace_project_path(@project.namespace, @project), class: 'btn star-btn toggle-star has_tooltip', method: :post, remote: true, title: "星标项目" do - if current_user.starred?(@project) = icon('star fw') - %span.starred Unstar + %span.starred 取消星标 - else = icon('star-o fw') - %span Star + %span 星标 %div.count-with-arrow %span.arrow %span.count.star-count = @project.star_count - else - = link_to new_user_session_path, class: 'btn has_tooltip star-btn', title: 'You must sign in to star a project' do + = link_to new_user_session_path, class: 'btn has_tooltip star-btn', title: '必须登入后才能给项目加注星标' do = icon('star fw') - Star + 星标 %div.count-with-arrow %span.arrow %span.count |