Commit aba4624a authored by Fatih Acet's avatar Fatih Acet

Merge branch 'gt-externalize-app-views-shared-notes' into 'master'

Externalize strings from `/app/views/shared/notes`

See merge request gitlab-org/gitlab-ce!23696
parents d3a100ab bc4a6417
- noteable_name = @note.noteable.human_class_name - noteable_name = @note.noteable.human_class_name
.float-left.btn-group.append-right-10.droplab-dropdown.comment-type-dropdown.js-comment-type-dropdown .float-left.btn-group.append-right-10.droplab-dropdown.comment-type-dropdown.js-comment-type-dropdown
%input.btn.btn-nr.btn-success.comment-btn.js-comment-button.js-comment-submit-button{ type: 'submit', value: 'Comment' } %input.btn.btn-nr.btn-success.comment-btn.js-comment-button.js-comment-submit-button{ type: 'submit', value: _('Comment') }
- if @note.can_be_discussion_note? - if @note.can_be_discussion_note?
= button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion js-disable-on-submit', data: { 'dropdown-trigger' => '#resolvable-comment-menu' }, 'aria-label' => 'Open comment type dropdown' do = button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion js-disable-on-submit', data: { 'dropdown-trigger' => '#resolvable-comment-menu' }, 'aria-label' => _('Open comment type dropdown') do
= icon('caret-down', class: 'toggle-icon') = icon('caret-down', class: 'toggle-icon')
%ul#resolvable-comment-menu.dropdown-menu.dropdown-open-top{ data: { dropdown: true } } %ul#resolvable-comment-menu.dropdown-menu.dropdown-open-top{ data: { dropdown: true } }
%li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => 'Comment', 'close-text' => "Comment & close #{noteable_name}", 'reopen-text' => "Comment & reopen #{noteable_name}" } } %li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => _('Comment'), 'close-text' => _("Comment & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Comment & reopen %{noteable_name}") % { noteable_name: noteable_name } } }
%button.btn.btn-transparent %button.btn.btn-transparent
= icon('check', class: 'icon') = icon('check', class: 'icon')
.description .description
%strong Comment %strong= _("Comment")
%p %p
Add a general comment to this #{noteable_name}. = _("Add a general comment to this %{noteable_name}.") % { noteable_name: noteable_name }
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => 'Start discussion', 'close-text' => "Start discussion & close #{noteable_name}", 'reopen-text' => "Start discussion & reopen #{noteable_name}" } } %li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => _('Start discussion'), 'close-text' => _("Start discussion & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Start discussion & reopen %{noteable_name}") % { noteable_name: noteable_name } } }
%button.btn.btn-transparent %button.btn.btn-transparent
= icon('check', class: 'icon') = icon('check', class: 'icon')
.description .description
%strong Start discussion %strong= _("Start discussion")
%p %p
= succeed '.' do = succeed '.' do
Discuss a specific suggestion or question
- if @note.noteable.supports_resolvable_notes? - if @note.noteable.supports_resolvable_notes?
that needs to be resolved = _('Discuss a specific suggestion or question that needs to be resolved')
- else
= _('Discuss a specific suggestion or question')
%textarea.hidden.js-task-list-field.original-task-list{ data: {update_url: note_url(note) } }= note.note %textarea.hidden.js-task-list-field.original-task-list{ data: { update_url: note_url(note) } }= note.note
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
= hidden_field_tag :target_id, '', class: 'js-form-target-id' = hidden_field_tag :target_id, '', class: 'js-form-target-id'
= hidden_field_tag :target_type, '', class: 'js-form-target-type' = hidden_field_tag :target_type, '', class: 'js-form-target-type'
= render layout: 'projects/md_preview', locals: { url: preview_markdown_path(project), referenced_users: true } do = render layout: 'projects/md_preview', locals: { url: preview_markdown_path(project), referenced_users: true } do
= render 'projects/zen', attr: 'note[note]', classes: 'note-textarea js-note-text js-task-list-field', placeholder: "Write a comment or drag your files here…" = render 'projects/zen', attr: 'note[note]', classes: 'note-textarea js-note-text js-task-list-field', placeholder: _("Write a comment or drag your files here…")
= render 'shared/notes/hints' = render 'shared/notes/hints'
.note-form-actions.clearfix .note-form-actions.clearfix
.settings-message.note-edit-warning.js-finish-edit-warning .settings-message.note-edit-warning.js-finish-edit-warning
Finish editing this message first! = _("Finish editing this message first!")
= submit_tag 'Save comment', class: 'btn btn-nr btn-success js-comment-save-button' = submit_tag _('Save comment'), class: 'btn btn-nr btn-success js-comment-save-button'
%button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' } %button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' }
Cancel = _("Cancel")
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
= render 'projects/zen', f: f, = render 'projects/zen', f: f,
attr: :note, attr: :note,
classes: 'note-textarea js-note-text', classes: 'note-textarea js-note-text',
placeholder: "Write a comment or drag your files here…", placeholder: _("Write a comment or drag your files here…"),
supports_quick_actions: supports_quick_actions, supports_quick_actions: supports_quick_actions,
supports_autocomplete: supports_autocomplete supports_autocomplete: supports_autocomplete
= render 'shared/notes/hints', supports_quick_actions: supports_quick_actions = render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
...@@ -40,5 +40,5 @@ ...@@ -40,5 +40,5 @@
= yield(:note_actions) = yield(:note_actions)
%a.btn.btn-cancel.js-close-discussion-note-form.hide{ role: "button", data: {cancel_text: "Cancel" } } %a.btn.btn-cancel.js-close-discussion-note-form.hide{ role: "button", data: { cancel_text: _("Cancel") } }
Cancel = _('Cancel')
- supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false) - supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false)
.comment-toolbar.clearfix .comment-toolbar.clearfix
.toolbar-text .toolbar-text
= link_to 'Markdown', help_page_path('user/markdown'), target: '_blank', tabindex: -1 = link_to _('Markdown'), help_page_path('user/markdown'), target: '_blank', tabindex: -1
- if supports_quick_actions - if supports_quick_actions
and and
= link_to 'quick actions', help_page_path('user/project/quick_actions'), target: '_blank', tabindex: -1 = link_to _('quick actions'), help_page_path('user/project/quick_actions'), target: '_blank', tabindex: -1
are are
- else - else
is is
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
= icon('file-image-o', class: 'toolbar-button-icon') = icon('file-image-o', class: 'toolbar-button-icon')
%span.uploading-error-message %span.uploading-error-message
-# Populated by app/assets/javascripts/dropzone_input.js -# Populated by app/assets/javascripts/dropzone_input.js
%button.retry-uploading-link{ type: 'button' } Try again %button.retry-uploading-link{ type: 'button' }= _("Try again")
or or
%button.attach-new-file.markdown-selector{ type: 'button' } attach a new file %button.attach-new-file.markdown-selector{ type: 'button' }= _("attach a new file")
%button.markdown-selector.button-attach-file{ type: 'button', tabindex: '-1' } %button.markdown-selector.button-attach-file{ type: 'button', tabindex: '-1' }
= icon('file-image-o', class: 'toolbar-button-icon') = icon('file-image-o', class: 'toolbar-button-icon')
Attach a file = _("Attach a file")
%button.btn.btn-default.btn-sm.hide.button-cancel-uploading-files{ type: 'button' } Cancel %button.btn.btn-default.btn-sm.hide.button-cancel-uploading-files{ type: 'button' }= _("Cancel")
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
= render 'award_emoji/awards_block', awardable: note, inline: false = render 'award_emoji/awards_block', awardable: note, inline: false
- if note.system - if note.system
.system-note-commit-list-toggler.hide .system-note-commit-list-toggler.hide
Toggle commit list = _("Toggle commit list")
%i.fa.fa-angle-down %i.fa.fa-angle-down
- if note.attachment.url - if note.attachment.url
.note-attachment .note-attachment
...@@ -74,5 +74,5 @@ ...@@ -74,5 +74,5 @@
= icon('paperclip') = icon('paperclip')
= note.attachment_identifier = note.attachment_identifier
= link_to delete_attachment_project_note_path(note.project, note), = link_to delete_attachment_project_note_path(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: _('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
= icon('trash-o', class: 'cred') = icon('trash-o', class: 'cred')
...@@ -19,20 +19,14 @@ ...@@ -19,20 +19,14 @@
= render "shared/notes/form", view: diff_view, supports_autocomplete: autocomplete = render "shared/notes/form", view: diff_view, supports_autocomplete: autocomplete
- elsif !current_user - elsif !current_user
.disabled-comment.text-center.prepend-top-default .disabled-comment.text-center.prepend-top-default
Please - link_to_register = link_to(_("register"), new_session_path(:user, redirect_to_referer: 'yes', anchor: 'register-pane'), class: 'js-register-link')
= link_to "register", new_session_path(:user, redirect_to_referer: 'yes', anchor: 'register-pane'), class: 'js-register-link' - link_to_sign_in = link_to(_("sign in"), new_session_path(:user, redirect_to_referer: 'yes'), class: 'js-sign-in-link')
or = _("Please %{link_to_register} or %{link_to_sign_in} to comment").html_safe % { link_to_register: link_to_register, link_to_sign_in: link_to_sign_in }
= link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'js-sign-in-link'
to comment
- elsif discussion_locked - elsif discussion_locked
.disabled-comment.text-center.prepend-top-default .disabled-comment.text-center.prepend-top-default
%span.issuable-note-warning %span.issuable-note-warning
= sprite_icon('lock', size: 16, css_class: 'icon') = sprite_icon('lock', size: 16, css_class: 'icon')
%span %span
This = _("This %{issuable} is locked. Only <strong>project members</strong> can comment.").html_safe % { issuable: issuable.class.to_s.titleize.downcase }
= issuable.class.to_s.titleize.downcase
is locked. Only
%b project members
can comment.
-# haml-lint:disable InlineJavaScript -# haml-lint:disable InlineJavaScript
%script.js-notes-data{ type: "application/json" }= initial_notes_data(autocomplete).to_json.html_safe %script.js-notes-data{ type: "application/json" }= initial_notes_data(autocomplete).to_json.html_safe
---
title: Externalize strings from `/app/views/shared/notes`
merge_request: 23696
author: Tao Wang
type: other
...@@ -372,6 +372,9 @@ msgstr "" ...@@ -372,6 +372,9 @@ msgstr ""
msgid "Add README" msgid "Add README"
msgstr "" msgstr ""
msgid "Add a general comment to this %{noteable_name}."
msgstr ""
msgid "Add a homepage to your wiki that contains information about your project and GitLab will display it here instead of this message." msgid "Add a homepage to your wiki that contains information about your project and GitLab will display it here instead of this message."
msgstr "" msgstr ""
...@@ -705,6 +708,9 @@ msgstr "" ...@@ -705,6 +708,9 @@ msgstr ""
msgid "Are you sure you want to remove %{group_name}?" msgid "Are you sure you want to remove %{group_name}?"
msgstr "" msgstr ""
msgid "Are you sure you want to remove the attachment?"
msgstr ""
msgid "Are you sure you want to remove this identity?" msgid "Are you sure you want to remove this identity?"
msgstr "" msgstr ""
...@@ -759,6 +765,9 @@ msgstr "" ...@@ -759,6 +765,9 @@ msgstr ""
msgid "Assignee(s)" msgid "Assignee(s)"
msgstr "" msgstr ""
msgid "Attach a file"
msgstr ""
msgid "Attach a file by drag &amp; drop or %{upload_link}" msgid "Attach a file by drag &amp; drop or %{upload_link}"
msgstr "" msgstr ""
...@@ -1893,6 +1902,12 @@ msgstr "" ...@@ -1893,6 +1902,12 @@ msgstr ""
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
msgid "Comment & close %{noteable_name}"
msgstr ""
msgid "Comment & reopen %{noteable_name}"
msgstr ""
msgid "Comment & resolve discussion" msgid "Comment & resolve discussion"
msgstr "" msgstr ""
...@@ -2390,6 +2405,9 @@ msgstr "" ...@@ -2390,6 +2405,9 @@ msgstr ""
msgid "Delete list" msgid "Delete list"
msgstr "" msgstr ""
msgid "Delete this attachment"
msgstr ""
msgid "Deleted" msgid "Deleted"
msgstr "" msgstr ""
...@@ -2602,6 +2620,12 @@ msgstr "" ...@@ -2602,6 +2620,12 @@ msgstr ""
msgid "Discover projects, groups and snippets. Share your projects with others" msgid "Discover projects, groups and snippets. Share your projects with others"
msgstr "" msgstr ""
msgid "Discuss a specific suggestion or question"
msgstr ""
msgid "Discuss a specific suggestion or question that needs to be resolved"
msgstr ""
msgid "Dismiss" msgid "Dismiss"
msgstr "" msgstr ""
...@@ -3112,6 +3136,9 @@ msgstr "" ...@@ -3112,6 +3136,9 @@ msgstr ""
msgid "Fingerprints" msgid "Fingerprints"
msgstr "" msgstr ""
msgid "Finish editing this message first!"
msgstr ""
msgid "Finished" msgid "Finished"
msgstr "" msgstr ""
...@@ -4078,6 +4105,9 @@ msgstr "" ...@@ -4078,6 +4105,9 @@ msgstr ""
msgid "Mark todo as done" msgid "Mark todo as done"
msgstr "" msgstr ""
msgid "Markdown"
msgstr ""
msgid "Markdown enabled" msgid "Markdown enabled"
msgstr "" msgstr ""
...@@ -4676,6 +4706,9 @@ msgstr "" ...@@ -4676,6 +4706,9 @@ msgstr ""
msgid "Open Documentation" msgid "Open Documentation"
msgstr "" msgstr ""
msgid "Open comment type dropdown"
msgstr ""
msgid "Open in Xcode" msgid "Open in Xcode"
msgstr "" msgstr ""
...@@ -4970,6 +5003,9 @@ msgstr "" ...@@ -4970,6 +5003,9 @@ msgstr ""
msgid "Play" msgid "Play"
msgstr "" msgstr ""
msgid "Please %{link_to_register} or %{link_to_sign_in} to comment"
msgstr ""
msgid "Please accept the Terms of Service before continuing." msgid "Please accept the Terms of Service before continuing."
msgstr "" msgstr ""
...@@ -5832,6 +5868,9 @@ msgstr "" ...@@ -5832,6 +5868,9 @@ msgstr ""
msgid "Save changes" msgid "Save changes"
msgstr "" msgstr ""
msgid "Save comment"
msgstr ""
msgid "Save pipeline schedule" msgid "Save pipeline schedule"
msgstr "" msgstr ""
...@@ -6395,6 +6434,15 @@ msgstr "" ...@@ -6395,6 +6434,15 @@ msgstr ""
msgid "Start date" msgid "Start date"
msgstr "" msgstr ""
msgid "Start discussion"
msgstr ""
msgid "Start discussion & close %{noteable_name}"
msgstr ""
msgid "Start discussion & reopen %{noteable_name}"
msgstr ""
msgid "Start the Runner!" msgid "Start the Runner!"
msgstr "" msgstr ""
...@@ -6731,6 +6779,9 @@ msgstr "" ...@@ -6731,6 +6779,9 @@ msgstr ""
msgid "Third party offers" msgid "Third party offers"
msgstr "" msgstr ""
msgid "This %{issuable} is locked. Only <strong>project members</strong> can comment."
msgstr ""
msgid "This %{viewer} could not be displayed because %{reason}. You can %{options} instead." msgid "This %{viewer} could not be displayed because %{reason}. You can %{options} instead."
msgstr "" msgstr ""
...@@ -7158,6 +7209,9 @@ msgstr "" ...@@ -7158,6 +7209,9 @@ msgstr ""
msgid "Toggle commit description" msgid "Toggle commit description"
msgstr "" msgstr ""
msgid "Toggle commit list"
msgstr ""
msgid "Toggle discussion" msgid "Toggle discussion"
msgstr "" msgstr ""
...@@ -7662,6 +7716,9 @@ msgstr "" ...@@ -7662,6 +7716,9 @@ msgstr ""
msgid "Withdraw Access Request" msgid "Withdraw Access Request"
msgstr "" msgstr ""
msgid "Write a comment or drag your files here…"
msgstr ""
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
...@@ -7872,6 +7929,9 @@ msgstr "" ...@@ -7872,6 +7929,9 @@ msgstr ""
msgid "assign yourself" msgid "assign yourself"
msgstr "" msgstr ""
msgid "attach a new file"
msgstr ""
msgid "branch name" msgid "branch name"
msgstr "" msgstr ""
...@@ -8203,6 +8263,12 @@ msgstr "" ...@@ -8203,6 +8263,12 @@ msgstr ""
msgid "project" msgid "project"
msgstr "" msgstr ""
msgid "quick actions"
msgstr ""
msgid "register"
msgstr ""
msgid "remaining" msgid "remaining"
msgstr "" msgstr ""
...@@ -8223,6 +8289,9 @@ msgstr "" ...@@ -8223,6 +8289,9 @@ msgstr ""
msgid "show less" msgid "show less"
msgstr "" msgstr ""
msgid "sign in"
msgstr ""
msgid "source" msgid "source"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment