diff options
Diffstat (limited to 'app/views/shared/issuable/_form.html.haml')
-rw-r--r-- | app/views/shared/issuable/_form.html.haml | 67 |
1 files changed, 33 insertions, 34 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index b01a36265f9..76fd87a4ea1 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -6,7 +6,7 @@ %span= msg %br .form-group - = f.label :title, class: 'control-label' + = f.label :title, '标题', class: 'control-label' .col-sm-10 = f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off', class: 'form-control pad js-gfm-input', required: true @@ -15,21 +15,20 @@ %p.help-block .js-wip-explanation %a.js-toggle-wip{href: ""} - Remove the + 从标题中删除 %code WIP: - prefix from the title - to allow this - %strong Work In Progress - merge request to be merged when it's ready. + 前缀表示允许此标识为 + %strong 正在处理中 + 的合并请求已准备好可以被接受。 .js-no-wip-explanation %a.js-toggle-wip{href: ""} - Start the title with + 标题以 %code WIP: - to prevent a - %strong Work In Progress - merge request from being merged before it's ready. + 开头将合并请求标识为 + %strong 正在处理中 + 表示其还未准备好可以接受合并。 .form-group.detail-page-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", referenced_users: true } do @@ -51,88 +50,88 @@ %hr .form-group .issue-assignee - = f.label :assignee_id, "Assignee", class: 'control-label' + = f.label :assignee_id, "指派给", class: 'control-label' .col-sm-10 = users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]", - placeholder: 'Select assignee', class: 'custom-form-control', null_user: true, + placeholder: '选择指派', class: 'custom-form-control', null_user: true, selected: issuable.assignee_id, project: @target_project || @project, first_user: true, current_user: true, include_blank: true) - = link_to 'Assign to me', '#', class: 'btn assign-to-me-link' + = link_to '指派给自己', '#', class: 'btn assign-to-me-link' .form-group .issue-milestone - = f.label :milestone_id, "Milestone", class: 'control-label' + = f.label :milestone_id, "里程碑", class: 'control-label' .col-sm-10 - if milestone_options(issuable).present? = f.select(:milestone_id, milestone_options(issuable), { include_blank: true }, { class: 'select2', data: { placeholder: 'Select milestone' } }) - else .prepend-top-10 - %span.light No open milestones available. + %span.light 没有开放的里程碑 - if can? current_user, :admin_milestone, issuable.project - = link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank + = link_to '创建新里程碑', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank .form-group - = f.label :label_ids, "Labels", class: 'control-label' + = f.label :label_ids, "标记", class: 'control-label' .col-sm-10 - if issuable.project.labels.any? = f.collection_select :label_ids, issuable.project.labels.all, :id, :name, { selected: issuable.label_ids }, multiple: true, class: 'select2', data: { placeholder: "Select labels" } - else .prepend-top-10 - %span.light No labels yet. + %span.light 没有标记。 - if can? current_user, :admin_label, issuable.project - = link_to 'Create new label', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank + = link_to '创建新标记', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank - if issuable.can_move?(current_user) %hr .form-group - = label_tag :move_to_project_id, 'Move', class: 'control-label' + = label_tag :move_to_project_id, '移动', class: 'control-label' .col-sm-10 - projects = project_options(issuable, current_user, ability: :admin_issue) = select_tag(:move_to_project_id, projects, include_blank: true, class: 'select2', data: { placeholder: 'Select project' }) %span{ data: { toggle: 'tooltip', placement: 'auto top' }, style: 'cursor: default', - title: 'Moving an issue will copy the discussion to a different project and close it here. All participants will be notified of the new location.' } + title: '移动一个问题讨论复制到另一个项目并关闭它。所有参与者都将通知的新位置。' } = icon('question-circle') - if issuable.is_a?(MergeRequest) %hr - if @merge_request.new_record? .form-group - = f.label :source_branch, class: 'control-label' + = f.label :source_branch, '来源分支', class: 'control-label' .col-sm-10 = f.select(:source_branch, [@merge_request.source_branch], { }, { class: 'source_branch select2 span2', disabled: true }) .form-group - = f.label :target_branch, class: 'control-label' + = f.label :target_branch, '目标分支', class: 'control-label' .col-sm-10 = f.select(:target_branch, @merge_request.target_branches, { include_blank: true }, { class: 'target_branch select2 span2', disabled: @merge_request.new_record?, data: {placeholder: "Select branch"} }) - if @merge_request.new_record? %p.help-block - = link_to 'Change branches', mr_change_branches_path(@merge_request) + = link_to '修改分支', mr_change_branches_path(@merge_request) - is_footer = !(issuable.is_a?(MergeRequest) && issuable.new_record?) .gray-content-block{class: (is_footer ? "footer-block" : "middle-block")} - if issuable.new_record? - = f.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' + = f.submit "提交新的 #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' - else - = f.submit 'Save changes', class: 'btn btn-save' + = f.submit '保存修改', class: 'btn btn-save' - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = contribution_guide_path(issuable.project)) .inline.prepend-left-10 - Please review the - %strong #{link_to 'contribution guidelines', guide_url} - for this project. + 请先阅读本版本仓库的 + %strong #{link_to '贡献指导原则', guide_url} + 。 - if issuable.new_record? - = link_to 'Cancel', namespace_project_issues_path(@project.namespace, @project), class: 'btn btn-cancel' + = link_to '取消', namespace_project_issues_path(@project.namespace, @project), class: 'btn btn-cancel' - else .pull-right - if current_user.can?(:"destroy_#{issuable.to_ability_name}", @project) - = link_to polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} will be removed! Are you sure?" }, + = link_to polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} 将被删除!你确定吗?" }, method: :delete, class: 'btn btn-grouped' do = icon('trash-o') - Delete - = link_to 'Cancel', namespace_project_issue_path(@project.namespace, @project, issuable), class: 'btn btn-grouped btn-cancel' + 删除 + = link_to '取消', namespace_project_issue_path(@project.namespace, @project, issuable), class: 'btn btn-grouped btn-cancel' |