Commit a39dc766 authored by Jarka Kadlecová's avatar Jarka Kadlecová Committed by Jarka Kadlecová

Translate issuable sidebar

parent a55cfc1e
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import Flash from '../../../flash'; import Flash from '../../../flash';
import editForm from './edit_form.vue'; import editForm from './edit_form.vue';
import Icon from '../../../vue_shared/components/icon.vue'; import Icon from '../../../vue_shared/components/icon.vue';
import { __ } from '../../../locale';
export default { export default {
components: { components: {
...@@ -40,8 +41,7 @@ ...@@ -40,8 +41,7 @@
this.service.update('issue', { confidential }) this.service.update('issue', { confidential })
.then(() => location.reload()) .then(() => location.reload())
.catch(() => { .catch(() => {
Flash(`Something went wrong trying to Flash(__('Something went wrong trying to change the confidentiality of this issue'));
change the confidentiality of this issue`);
}); });
}, },
}, },
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
/> />
</div> </div>
<div class="title hide-collapsed"> <div class="title hide-collapsed">
Confidentiality {{ __('Confidentiality') }}
<a <a
v-if="isEditable" v-if="isEditable"
class="pull-right confidential-edit" class="pull-right confidential-edit"
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
aria-hidden="true" aria-hidden="true"
class="sidebar-item-icon inline" class="sidebar-item-icon inline"
/> />
Not confidential {{ __('Not confidential') }}
</div> </div>
<div <div
v-else v-else
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
aria-hidden="true" aria-hidden="true"
class="sidebar-item-icon inline is-active" class="sidebar-item-icon inline is-active"
/> />
This issue is confidential {{ __('This issue is confidential') }}
</div> </div>
</div> </div>
</div> </div>
......
<script> <script>
import editFormButtons from './edit_form_buttons.vue'; import editFormButtons from './edit_form_buttons.vue';
import { s__ } from '../../../locale';
export default { export default {
components: { components: {
...@@ -19,6 +20,14 @@ ...@@ -19,6 +20,14 @@
type: Function, type: Function,
}, },
}, },
computed: {
confidentialityOnWarning() {
return s__('confidentiality|You are going to turn on the confidentiality. This means that only team members with <strong>at least Reporter access</strong> are able to see and leave comments on the issue.');
},
confidentialityOffWarning() {
return s__('confidentiality|You are going to turn off the confidentiality. This means <strong>everyone</strong> will be able to see and leave a comment on this issue.');
},
},
}; };
</script> </script>
...@@ -26,15 +35,13 @@ ...@@ -26,15 +35,13 @@
<div class="dropdown open"> <div class="dropdown open">
<div class="dropdown-menu sidebar-item-warning-message"> <div class="dropdown-menu sidebar-item-warning-message">
<div> <div>
<p v-if="!isConfidential"> <p
You are going to turn on the confidentiality. This means that only team members with v-if="!isConfidential"
<strong>at least Reporter access</strong> v-html="confidentialityOnWarning">
are able to see and leave comments on the issue.
</p> </p>
<p v-else> <p
You are going to turn off the confidentiality. This means v-else
<strong>everyone</strong> v-html="confidentialityOffWarning">
will be able to see and leave a comment on this issue.
</p> </p>
<edit-form-buttons <edit-form-buttons
:is-confidential="isConfidential" :is-confidential="isConfidential"
......
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
class="btn btn-default append-right-10" class="btn btn-default append-right-10"
@click="toggleForm" @click="toggleForm"
> >
Cancel {{ __('Cancel') }}
</button> </button>
<button <button
type="button" type="button"
......
<script> <script>
import editFormButtons from './edit_form_buttons.vue'; import editFormButtons from './edit_form_buttons.vue';
import issuableMixin from '../../../vue_shared/mixins/issuable'; import issuableMixin from '../../../vue_shared/mixins/issuable';
import { __, sprintf } from '../../../locale';
export default { export default {
components: { components: {
...@@ -25,6 +26,14 @@ ...@@ -25,6 +26,14 @@
type: Function, type: Function,
}, },
}, },
computed: {
lockWarning() {
return sprintf(__('Lock this %{issuableDisplayName}? Only <strong>project members</strong> will be able to comment.'), { issuableDisplayName: this.issuableDisplayName });
},
unlockWarning() {
return sprintf(__('Unlock this %{issuableDisplayName}? <strong>Everyone</strong> will be able to comment.'), { issuableDisplayName: this.issuableDisplayName });
},
},
}; };
</script> </script>
...@@ -33,19 +42,14 @@ ...@@ -33,19 +42,14 @@
<div class="dropdown-menu sidebar-item-warning-message"> <div class="dropdown-menu sidebar-item-warning-message">
<p <p
class="text" class="text"
v-if="isLocked"> v-if="isLocked"
Unlock this {{ issuableDisplayName }}? v-html="unlockWarning">
<strong>Everyone</strong>
will be able to comment.
</p> </p>
<p <p
class="text" class="text"
v-else> v-else
Lock this {{ issuableDisplayName }}? v-html="lockWarning">
Only
<strong>project members</strong>
will be able to comment.
</p> </p>
<edit-form-buttons <edit-form-buttons
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</div> </div>
<div class="title hide-collapsed"> <div class="title hide-collapsed">
Lock {{ issuableDisplayName }} {{ sprintf(__('Lock %{issuableDisplayName}'), { issuableDisplayName: issuableDisplayName }) }}
<button <button
v-if="isEditable" v-if="isEditable"
class="pull-right lock-edit btn btn-blank" class="pull-right lock-edit btn btn-blank"
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
<div class="compare-display-container"> <div class="compare-display-container">
<div class="compare-display pull-left"> <div class="compare-display pull-left">
<span class="compare-label"> <span class="compare-label">
Spent {{ s__('TimeTracking|Spent') }}
</span> </span>
<span class="compare-value spent"> <span class="compare-value spent">
{{ timeSpentHumanReadable }} {{ timeSpentHumanReadable }}
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
</div> </div>
<div class="compare-display estimated pull-right"> <div class="compare-display estimated pull-right">
<span class="compare-label"> <span class="compare-label">
Est {{ s__('TimeTrackingEstimated|Est') }}
</span> </span>
<span class="compare-value"> <span class="compare-value">
{{ timeEstimateHumanReadable }} {{ timeEstimateHumanReadable }}
......
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
template: ` template: `
<div class="time-tracking-estimate-only-pane"> <div class="time-tracking-estimate-only-pane">
<span class="bold"> <span class="bold">
Estimated: {{ s__('TimeTracking|Estimated:') }}
</span> </span>
{{ timeEstimateHumanReadable }} {{ timeEstimateHumanReadable }}
</div> </div>
......
import { sprintf, s__ } from '../../../locale';
export default { export default {
name: 'time-tracking-help-state', name: 'time-tracking-help-state',
props: { props: {
...@@ -10,33 +12,39 @@ export default { ...@@ -10,33 +12,39 @@ export default {
href() { href() {
return `${this.rootPath}help/workflow/time_tracking.md`; return `${this.rootPath}help/workflow/time_tracking.md`;
}, },
estimateText() {
return sprintf(
s__('estimateCommand|%{slash_command} will update the estimated time with the latest command.'), {
slash_command: '<code>/estimate</code>',
}, false,
);
},
spendText() {
return sprintf(
s__('spendCommand|%{slash_command} will update the sum of the time spent.'), {
slash_command: '<code>/spend</code>',
}, false,
);
},
}, },
template: ` template: `
<div class="time-tracking-help-state"> <div class="time-tracking-help-state">
<div class="time-tracking-info"> <div class="time-tracking-info">
<h4> <h4>
Track time with quick actions {{ __('Track time with quick actions') }}
</h4> </h4>
<p> <p>
Quick actions can be used in the issues description and comment boxes. {{ __('Quick actions can be used in the issues description and comment boxes.') }}
</p> </p>
<p> <p v-html="estimateText">
<code>
/estimate
</code>
will update the estimated time with the latest command.
</p> </p>
<p> <p v-html="spendText">
<code>
/spend
</code>
will update the sum of the time spent.
</p> </p>
<a <a
class="btn btn-default learn-more-button" class="btn btn-default learn-more-button"
:href="href" :href="href"
> >
Learn more {{ __('Learn more') }}
</a> </a>
</div> </div>
</div> </div>
......
...@@ -3,7 +3,7 @@ export default { ...@@ -3,7 +3,7 @@ export default {
template: ` template: `
<div class="time-tracking-no-tracking-pane"> <div class="time-tracking-no-tracking-pane">
<span class="no-value"> <span class="no-value">
No estimate or time spent {{ __('No estimate or time spent') }}
</span> </span>
</div> </div>
`, `,
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
:time-estimate-human-readable="timeEstimateHumanReadable" :time-estimate-human-readable="timeEstimateHumanReadable"
/> />
<div class="title hide-collapsed"> <div class="title hide-collapsed">
Time tracking {{ __('Time tracking') }}
<div <div
class="help-button pull-right" class="help-button pull-right"
v-if="!showHelpState" v-if="!showHelpState"
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
= dropdown_title("Create new label", options: { back: true }) = dropdown_title("Create new label", options: { back: true })
= dropdown_content do = dropdown_content do
.dropdown-labels-error.js-label-error .dropdown-labels-error.js-label-error
%input#new_label_name.default-dropdown-input{ type: "text", placeholder: "Name new label" } %input#new_label_name.default-dropdown-input{ type: "text", placeholder: _('Name new label') }
.suggest-colors.suggest-colors-dropdown .suggest-colors.suggest-colors-dropdown
- suggested_colors.each do |color| - suggested_colors.each do |color|
= link_to '#', style: "background-color: #{color}", data: { color: color } do = link_to '#', style: "background-color: #{color}", data: { color: color } do
&nbsp &nbsp
.dropdown-label-color-input .dropdown-label-color-input
.dropdown-label-color-preview.js-dropdown-label-color-preview .dropdown-label-color-preview.js-dropdown-label-color-preview
%input#new_label_color.default-dropdown-input{ type: "text", placeholder: "Assign custom color like #FF0000" } %input#new_label_color.default-dropdown-input{ type: "text", placeholder: _('Assign custom color like #FF0000') }
.clearfix .clearfix
%button.btn.btn-primary.pull-left.js-new-label-btn{ type: "button" } %button.btn.btn-primary.pull-left.js-new-label-btn{ type: "button" }
Create = _('Create')
%button.btn.btn-default.pull-right.js-cancel-label-btn{ type: "button" } %button.btn.btn-default.pull-right.js-cancel-label-btn{ type: "button" }
Cancel = _('Cancel')
- title = local_assigns.fetch(:title, 'Assign labels') - title = local_assigns.fetch(:title, _('Assign labels'))
- show_create = local_assigns.fetch(:show_create, true) - show_create = local_assigns.fetch(:show_create, true)
- show_footer = local_assigns.fetch(:show_footer, true) - show_footer = local_assigns.fetch(:show_footer, true)
- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search') - filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search')
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if show_boards_content - if show_boards_content
.issue-board-dropdown-content .issue-board-dropdown-content
%p %p
Create lists from labels. Issues with that label appear in that list. = _('Create lists from labels. Issues with that label appear in that list.')
= dropdown_filter(filter_placeholder) = dropdown_filter(filter_placeholder)
= dropdown_content = dropdown_content
- if current_board_parent && show_footer - if current_board_parent && show_footer
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
- if can?(current_user, :admin_label, current_board_parent) - if can?(current_user, :admin_label, current_board_parent)
%li %li
%a.dropdown-toggle-page{ href: "#" } %a.dropdown-toggle-page{ href: "#" }
Create new label = _('Create new label')
%li %li
= link_to labels_path, :"data-is-link" => true do = link_to labels_path, :"data-is-link" => true do
- if show_create && can?(current_user, :admin_label, current_board_parent) - if show_create && can?(current_user, :admin_label, current_board_parent)
Manage labels = _('Manage labels')
- else - else
View labels = _('View labels')
= dropdown_loading = dropdown_loading
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.block.issuable-sidebar-header .block.issuable-sidebar-header
- if current_user - if current_user
%span.issuable-header-text.hide-collapsed.pull-left %span.issuable-header-text.hide-collapsed.pull-left
Todo = _('Todo')
%a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" } %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" }
= sidebar_gutter_toggle_icon = sidebar_gutter_toggle_icon
- if current_user - if current_user
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
%span.has-tooltip{ title: "#{issuable.milestone.title}<br>#{milestone_tooltip_title(issuable.milestone)}", data: { container: 'body', html: 1, placement: 'left' } } %span.has-tooltip{ title: "#{issuable.milestone.title}<br>#{milestone_tooltip_title(issuable.milestone)}", data: { container: 'body', html: 1, placement: 'left' } }
= issuable.milestone.title = issuable.milestone.title
- else - else
None = _('None')
.title.hide-collapsed .title.hide-collapsed
Milestone = _('Milestone')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true') = icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can_edit_issuable - if can_edit_issuable
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right' = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
...@@ -39,16 +39,17 @@ ...@@ -39,16 +39,17 @@
- if issuable.milestone - if issuable.milestone
= link_to issuable.milestone.title, milestone_path(issuable.milestone), class: "bold has-tooltip", title: milestone_tooltip_title(issuable.milestone), data: { container: "body", html: 1 } = link_to issuable.milestone.title, milestone_path(issuable.milestone), class: "bold has-tooltip", title: milestone_tooltip_title(issuable.milestone), data: { container: "body", html: 1 }
- else - else
%span.no-value None %span.no-value
= _('None')
.selectbox.hide-collapsed .selectbox.hide-collapsed
= f.hidden_field 'milestone_id', value: issuable.milestone_id, id: nil = f.hidden_field 'milestone_id', value: issuable.milestone_id, id: nil
= dropdown_tag('Milestone', options: { title: 'Assign milestone', toggle_class: 'js-milestone-select js-extra-options', filter: true, dropdown_class: 'dropdown-menu-selectable', placeholder: 'Search milestones', data: { show_no: true, field_name: "#{issuable.to_ability_name}[milestone_id]", project_id: @project.id, issuable_id: issuable.id, milestones: project_milestones_path(@project, :json), ability_name: issuable.to_ability_name, issue_update: issuable_json_path(issuable), use_id: true, default_no: true, selected: (issuable.milestone.name if issuable.milestone), null_default: true }}) = dropdown_tag('Milestone', options: { title: _('Assign milestone'), toggle_class: 'js-milestone-select js-extra-options', filter: true, dropdown_class: 'dropdown-menu-selectable', placeholder: _('Search milestones'), data: { show_no: true, field_name: "#{issuable.to_ability_name}[milestone_id]", project_id: @project.id, issuable_id: issuable.id, milestones: project_milestones_path(@project, :json), ability_name: issuable.to_ability_name, issue_update: issuable_json_path(issuable), use_id: true, default_no: true, selected: (issuable.milestone.name if issuable.milestone), null_default: true }})
- if issuable.has_attribute?(:time_estimate) - if issuable.has_attribute?(:time_estimate)
#issuable-time-tracker.block #issuable-time-tracker.block
// Fallback while content is loading // Fallback while content is loading
.title.hide-collapsed .title.hide-collapsed
Time tracking = _('Time tracking')
= icon('spinner spin', 'aria-hidden': 'true') = icon('spinner spin', 'aria-hidden': 'true')
- if issuable.has_attribute?(:due_date) - if issuable.has_attribute?(:due_date)
.block.due_date .block.due_date
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
%span.js-due-date-sidebar-value %span.js-due-date-sidebar-value
= issuable.due_date.try(:to_s, :medium) || 'None' = issuable.due_date.try(:to_s, :medium) || 'None'
.title.hide-collapsed .title.hide-collapsed
Due date = _('Due date')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true') = icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can?(current_user, :"admin_#{issuable.to_ability_name}", @project) - if can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right' = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
...@@ -66,21 +67,23 @@ ...@@ -66,21 +67,23 @@
- if issuable.due_date - if issuable.due_date
%span.bold= issuable.due_date.to_s(:medium) %span.bold= issuable.due_date.to_s(:medium)
- else - else
%span.no-value No due date %span.no-value
= _('No due date')
- if can?(current_user, :"admin_#{issuable.to_ability_name}", @project) - if can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
%span.no-value.js-remove-due-date-holder{ class: ("hidden" if issuable.due_date.nil?) } %span.no-value.js-remove-due-date-holder{ class: ("hidden" if issuable.due_date.nil?) }
\- \-
%a.js-remove-due-date{ href: "#", role: "button" } %a.js-remove-due-date{ href: "#", role: "button" }
remove due date = _('remove due date')
- if can?(current_user, :"admin_#{issuable.to_ability_name}", @project) - if can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
.selectbox.hide-collapsed .selectbox.hide-collapsed
= f.hidden_field :due_date, value: issuable.due_date.try(:strftime, 'yy-mm-dd') = f.hidden_field :due_date, value: issuable.due_date.try(:strftime, 'yy-mm-dd')
.dropdown .dropdown
%button.dropdown-menu-toggle.js-due-date-select{ type: 'button', data: { toggle: 'dropdown', field_name: "#{issuable.to_ability_name}[due_date]", ability_name: issuable.to_ability_name, issue_update: issuable_json_path(issuable) } } %button.dropdown-menu-toggle.js-due-date-select{ type: 'button', data: { toggle: 'dropdown', field_name: "#{issuable.to_ability_name}[due_date]", ability_name: issuable.to_ability_name, issue_update: issuable_json_path(issuable) } }
%span.dropdown-toggle-text Due date %span.dropdown-toggle-text
= _('Due date')
= icon('chevron-down', 'aria-hidden': 'true') = icon('chevron-down', 'aria-hidden': 'true')
.dropdown-menu.dropdown-menu-due-date .dropdown-menu.dropdown-menu-due-date
= dropdown_title('Due date') = dropdown_title(_('Due date'))
= dropdown_content do = dropdown_content do
.js-due-date-calendar .js-due-date-calendar
...@@ -92,7 +95,7 @@ ...@@ -92,7 +95,7 @@
%span %span
= selected_labels.size = selected_labels.size
.title.hide-collapsed .title.hide-collapsed
Labels = _('Labels')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true') = icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can_edit_issuable - if can_edit_issuable
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right' = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
...@@ -101,7 +104,8 @@ ...@@ -101,7 +104,8 @@
- selected_labels.each do |label| - selected_labels.each do |label|
= link_to_label(label, subject: issuable.project, type: issuable.to_ability_name) = link_to_label(label, subject: issuable.project, type: issuable.to_ability_name)
- else - else
%span.no-value None %span.no-value
= _('None')
.selectbox.hide-collapsed .selectbox.hide-collapsed
- selected_labels.each do |label| - selected_labels.each do |label|
= hidden_field_tag "#{issuable.to_ability_name}[label_names][]", label.id, id: nil = hidden_field_tag "#{issuable.to_ability_name}[label_names][]", label.id, id: nil
...@@ -131,29 +135,29 @@ ...@@ -131,29 +135,29 @@
- project_ref = cross_project_reference(@project, issuable) - project_ref = cross_project_reference(@project, issuable)
.block.project-reference .block.project-reference
.sidebar-collapsed-icon.dont-change-state .sidebar-collapsed-icon.dont-change-state
= clipboard_button(text: project_ref, title: "Copy reference to clipboard", placement: "left") = clipboard_button(text: project_ref, title: _('Copy reference to clipboard'), placement: "left")
.cross-project-reference.hide-collapsed .cross-project-reference.hide-collapsed
%span %span
Reference: = _('Reference:')
%cite{ title: project_ref } %cite{ title: project_ref }
= project_ref = project_ref
= clipboard_button(text: project_ref, title: "Copy reference to clipboard", placement: "left") = clipboard_button(text: project_ref, title: _('Copy reference to clipboard'), placement: "left")
- if current_user && issuable.can_move?(current_user) - if current_user && issuable.can_move?(current_user)
.block.js-sidebar-move-issue-block .block.js-sidebar-move-issue-block
.sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body' }, title: 'Move issue' } .sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body' }, title: _('Move issue') }
= custom_icon('icon_arrow_right') = custom_icon('icon_arrow_right')
.dropdown.sidebar-move-issue-dropdown.hide-collapsed .dropdown.sidebar-move-issue-dropdown.hide-collapsed
%button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button', %button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button',
data: { toggle: 'dropdown' } } data: { toggle: 'dropdown' } }
Move issue = _('Move issue')
.dropdown-menu.dropdown-menu-selectable .dropdown-menu.dropdown-menu-selectable
= dropdown_title('Move issue') = dropdown_title(_('Move issue'))
= dropdown_filter('Search project', search_id: 'sidebar-move-issue-dropdown-search') = dropdown_filter(_('Search project'), search_id: 'sidebar-move-issue-dropdown-search')
= dropdown_content = dropdown_content
= dropdown_loading = dropdown_loading
= dropdown_footer add_content_class: true do = dropdown_footer add_content_class: true do
%button.btn.btn-new.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ disabled: true } %button.btn.btn-new.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ disabled: true }
Move = _('Move')
= icon('spinner spin', class: 'sidebar-move-issue-confirmation-loading-icon') = icon('spinner spin', class: 'sidebar-move-issue-confirmation-loading-icon')
%script.js-sidebar-options{ type: "application/json" }= issuable_sidebar_options(issuable, can_edit_issuable).to_json.html_safe %script.js-sidebar-options{ type: "application/json" }= issuable_sidebar_options(issuable, can_edit_issuable).to_json.html_safe
- if issuable.is_a?(Issue) - if issuable.is_a?(Issue)
#js-vue-sidebar-assignees{ data: { field: "#{issuable.to_ability_name}[assignee_ids]", signed_in: signed_in } } #js-vue-sidebar-assignees{ data: { field: "#{issuable.to_ability_name}[assignee_ids]", signed_in: signed_in } }
.title.hide-collapsed .title.hide-collapsed
Assignee = _('Assignee')
= icon('spinner spin') = icon('spinner spin')
- else - else
.sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: (issuable.assignee.name if issuable.assignee) } .sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: (issuable.assignee.name if issuable.assignee) }
...@@ -10,35 +10,35 @@ ...@@ -10,35 +10,35 @@
- else - else
= icon('user', 'aria-hidden': 'true') = icon('user', 'aria-hidden': 'true')
.title.hide-collapsed .title.hide-collapsed
Assignee = _('Assignee')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true') = icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can_edit_issuable - if can_edit_issuable
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right' = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
- if !signed_in - if !signed_in
%a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" } %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => _('Toggle sidebar') }
= sidebar_gutter_toggle_icon = sidebar_gutter_toggle_icon
.value.hide-collapsed .value.hide-collapsed
- if issuable.assignee - if issuable.assignee
= link_to_member(@project, issuable.assignee, size: 32, extra_class: 'bold') do = link_to_member(@project, issuable.assignee, size: 32, extra_class: 'bold') do
- if !issuable.can_be_merged_by?(issuable.assignee) - if !issuable.can_be_merged_by?(issuable.assignee)
%span.pull-right.cannot-be-merged{ data: { toggle: 'tooltip', placement: 'left' }, title: 'Not allowed to merge' } %span.pull-right.cannot-be-merged{ data: { toggle: 'tooltip', placement: 'left' }, title: _('Not allowed to merge') }
= icon('exclamation-triangle', 'aria-hidden': 'true') = icon('exclamation-triangle', 'aria-hidden': 'true')
%span.username %span.username
= issuable.assignee.to_reference = issuable.assignee.to_reference
- else - else
%span.assign-yourself.no-value %span.assign-yourself.no-value
No assignee = _('No assignee')
- if can_edit_issuable - if can_edit_issuable
\- \-
%a.js-assign-yourself{ href: '#' } %a.js-assign-yourself{ href: '#' }
assign yourself = _('assign yourself')
.selectbox.hide-collapsed .selectbox.hide-collapsed
- issuable.assignees.each do |assignee| - issuable.assignees.each do |assignee|
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", assignee.id, id: nil, data: { avatar_url: assignee.avatar_url, name: assignee.name, username: assignee.username } = hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", assignee.id, id: nil, data: { avatar_url: assignee.avatar_url, name: assignee.name, username: assignee.username }
- options = { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: current_user&.username, current_user: true, project_id: @project&.id, author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_ids][]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } } - options = { toggle_class: 'js-user-search js-author-search', title: _('Assign to'), filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: _('Search users'), data: { first_user: current_user&.username, current_user: true, project_id: @project&.id, author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_ids][]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } }
- title = 'Select assignee' - title = _('Select assignee')
- if issuable.is_a?(Issue) - if issuable.is_a?(Issue)
- unless issuable.assignees.any? - unless issuable.assignees.any?
......
- is_collapsed = local_assigns.fetch(:is_collapsed, false) - is_collapsed = local_assigns.fetch(:is_collapsed, false)
- mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : 'Mark done' - mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : _('Mark done')
- todo_content = is_collapsed ? icon('plus-square') : 'Add todo' - todo_content = is_collapsed ? icon('plus-square') : _('Add todo')
%button.issuable-todo-btn.js-issuable-todo{ type: 'button', %button.issuable-todo-btn.js-issuable-todo{ type: 'button',
class: (is_collapsed ? 'btn-blank sidebar-collapsed-icon dont-change-state has-tooltip' : 'btn btn-default issuable-header-btn pull-right'), class: (is_collapsed ? 'btn-blank sidebar-collapsed-icon dont-change-state has-tooltip' : 'btn btn-default issuable-header-btn pull-right'),
title: (todo.nil? ? 'Add todo' : 'Mark done'), title: (todo.nil? ? _('Add todo') : _('Mark done')),
'aria-label' => (todo.nil? ? 'Add todo' : 'Mark done'), 'aria-label' => (todo.nil? ? _('Add todo') : _('Mark done')),
data: issuable_todo_button_data(issuable, todo, is_collapsed) } data: issuable_todo_button_data(issuable, todo, is_collapsed) }
%span.issuable-todo-inner.js-issuable-todo-inner< %span.issuable-todo-inner.js-issuable-todo-inner<
- if todo - if todo
......
---
title: Translate issuable sidebar
merge_request:
author:
type: other
...@@ -110,6 +110,8 @@ You can mark that content for translation with: ...@@ -110,6 +110,8 @@ You can mark that content for translation with:
In JavaScript we added the `__()` (double underscore parenthesis) function In JavaScript we added the `__()` (double underscore parenthesis) function
for translations. for translations.
In order to test JavaScript translations you have to change the GitLab localization to other language than English and you have to generate JSON files using `bundle exec rake gettext:po_to_json` or `bundle exec rake gettext:compile`.
## Updating the PO files with the new content ## Updating the PO files with the new content
Now that the new content is marked for translation, we need to update the PO Now that the new content is marked for translation, we need to update the PO
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 10:02+0100\n" "POT-Creation-Date: 2018-02-07 13:35+0100\n"
"PO-Revision-Date: 2018-02-06 10:02+0100\n" "PO-Revision-Date: 2018-02-07 13:35+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -129,6 +129,9 @@ msgstr "" ...@@ -129,6 +129,9 @@ msgstr ""
msgid "Add new directory" msgid "Add new directory"
msgstr "" msgstr ""
msgid "Add todo"
msgstr ""
msgid "AdminArea|Stop all jobs" msgid "AdminArea|Stop all jobs"
msgstr "" msgstr ""
...@@ -228,6 +231,21 @@ msgstr "" ...@@ -228,6 +231,21 @@ msgstr ""
msgid "Artifacts" msgid "Artifacts"
msgstr "" msgstr ""
msgid "Assign custom color like #FF0000"
msgstr ""
msgid "Assign labels"
msgstr ""
msgid "Assign milestone"
msgstr ""
msgid "Assign to"
msgstr ""
msgid "Assignee"
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 ""
...@@ -524,15 +542,24 @@ msgstr "" ...@@ -524,15 +542,24 @@ msgstr ""
msgid "CiVariables|Remove variable row" msgid "CiVariables|Remove variable row"
msgstr "" msgstr ""
msgid "CiVariable|* (All environments)"
msgstr ""
msgid "CiVariable|All environments" msgid "CiVariable|All environments"
msgstr "" msgstr ""
msgid "CiVariable|Error occured while saving variables"
msgstr ""
msgid "CiVariable|Protected" msgid "CiVariable|Protected"
msgstr "" msgstr ""
msgid "CiVariable|Toggle protected" msgid "CiVariable|Toggle protected"
msgstr "" msgstr ""
msgid "CiVariable|Validation failed"
msgstr ""
msgid "CircuitBreakerApiLink|circuitbreaker api" msgid "CircuitBreakerApiLink|circuitbreaker api"
msgstr "" msgstr ""
...@@ -698,6 +725,9 @@ msgstr "" ...@@ -698,6 +725,9 @@ msgstr ""
msgid "ClusterIntegration|Manage your Kubernetes cluster by visiting %{link_gke}" msgid "ClusterIntegration|Manage your Kubernetes cluster by visiting %{link_gke}"
msgstr "" msgstr ""
msgid "ClusterIntegration|More information"
msgstr ""
msgid "ClusterIntegration|Note:" msgid "ClusterIntegration|Note:"
msgstr "" msgstr ""
...@@ -877,6 +907,9 @@ msgstr "" ...@@ -877,6 +907,9 @@ msgstr ""
msgid "CompareBranches|There isn't anything to compare." msgid "CompareBranches|There isn't anything to compare."
msgstr "" msgstr ""
msgid "Confidentiality"
msgstr ""
msgid "Container Registry" msgid "Container Registry"
msgstr "" msgstr ""
...@@ -949,6 +982,12 @@ msgstr "" ...@@ -949,6 +982,12 @@ msgstr ""
msgid "Copy commit SHA to clipboard" msgid "Copy commit SHA to clipboard"
msgstr "" msgstr ""
msgid "Copy reference to clipboard"
msgstr ""
msgid "Create"
msgstr ""
msgid "Create New Directory" msgid "Create New Directory"
msgstr "" msgstr ""
...@@ -964,6 +1003,9 @@ msgstr "" ...@@ -964,6 +1003,9 @@ msgstr ""
msgid "Create file" msgid "Create file"
msgstr "" msgstr ""
msgid "Create lists from labels. Issues with that label appear in that list."
msgstr ""
msgid "Create merge request" msgid "Create merge request"
msgstr "" msgstr ""
...@@ -976,6 +1018,9 @@ msgstr "" ...@@ -976,6 +1018,9 @@ msgstr ""
msgid "Create new file" msgid "Create new file"
msgstr "" msgstr ""
msgid "Create new label"
msgstr ""
msgid "Create new..." msgid "Create new..."
msgstr "" msgstr ""
...@@ -1098,6 +1143,9 @@ msgstr "" ...@@ -1098,6 +1143,9 @@ msgstr ""
msgid "DownloadSource|Download" msgid "DownloadSource|Download"
msgstr "" msgstr ""
msgid "Due date"
msgstr ""
msgid "Edit" msgid "Edit"
msgstr "" msgstr ""
...@@ -1512,6 +1560,9 @@ msgstr "" ...@@ -1512,6 +1560,9 @@ msgstr ""
msgid "LastPushEvent|at" msgid "LastPushEvent|at"
msgstr "" msgstr ""
msgid "Learn more"
msgstr ""
msgid "Learn more in the" msgid "Learn more in the"
msgstr "" msgstr ""
...@@ -1533,18 +1584,30 @@ msgstr "" ...@@ -1533,18 +1584,30 @@ msgstr ""
msgid "Lock" msgid "Lock"
msgstr "" msgstr ""
msgid "Lock %{issuableDisplayName}"
msgstr ""
msgid "Lock this %{issuableDisplayName}? Only <strong>project members</strong> will be able to comment."
msgstr ""
msgid "Locked" msgid "Locked"
msgstr "" msgstr ""
msgid "Login" msgid "Login"
msgstr "" msgstr ""
msgid "Manage labels"
msgstr ""
msgid "Mar" msgid "Mar"
msgstr "" msgstr ""
msgid "March" msgid "March"
msgstr "" msgstr ""
msgid "Mark done"
msgstr ""
msgid "Maximum git storage failures" msgid "Maximum git storage failures"
msgstr "" msgstr ""
...@@ -1575,6 +1638,9 @@ msgstr "" ...@@ -1575,6 +1638,9 @@ msgstr ""
msgid "Messages" msgid "Messages"
msgstr "" msgstr ""
msgid "Milestone"
msgstr ""
msgid "Milestones|Delete milestone" msgid "Milestones|Delete milestone"
msgstr "" msgstr ""
...@@ -1596,6 +1662,15 @@ msgstr "" ...@@ -1596,6 +1662,15 @@ msgstr ""
msgid "More information is available|here" msgid "More information is available|here"
msgstr "" msgstr ""
msgid "Move"
msgstr ""
msgid "Move issue"
msgstr ""
msgid "Name new label"
msgstr ""
msgid "New Issue" msgid "New Issue"
msgid_plural "New Issues" msgid_plural "New Issues"
msgstr[0] "" msgstr[0] ""
...@@ -1649,9 +1724,18 @@ msgstr "" ...@@ -1649,9 +1724,18 @@ msgstr ""
msgid "New tag" msgid "New tag"
msgstr "" msgstr ""
msgid "No assignee"
msgstr ""
msgid "No connection could be made to a Gitaly Server, please check your logs!" msgid "No connection could be made to a Gitaly Server, please check your logs!"
msgstr "" msgstr ""
msgid "No due date"
msgstr ""
msgid "No estimate or time spent"
msgstr ""
msgid "No file chosen" msgid "No file chosen"
msgstr "" msgstr ""
...@@ -1667,9 +1751,15 @@ msgstr "" ...@@ -1667,9 +1751,15 @@ msgstr ""
msgid "None" msgid "None"
msgstr "" msgstr ""
msgid "Not allowed to merge"
msgstr ""
msgid "Not available" msgid "Not available"
msgstr "" msgstr ""
msgid "Not confidential"
msgstr ""
msgid "Not enough data" msgid "Not enough data"
msgstr "" msgstr ""
...@@ -2069,6 +2159,9 @@ msgstr "" ...@@ -2069,6 +2159,9 @@ msgstr ""
msgid "Push events" msgid "Push events"
msgstr "" msgstr ""
msgid "Quick actions can be used in the issues description and comment boxes."
msgstr ""
msgid "Read more" msgid "Read more"
msgstr "" msgstr ""
...@@ -2081,6 +2174,9 @@ msgstr "" ...@@ -2081,6 +2174,9 @@ msgstr ""
msgid "RefSwitcher|Tags" msgid "RefSwitcher|Tags"
msgstr "" msgstr ""
msgid "Reference:"
msgstr ""
msgid "Register / Sign In" msgid "Register / Sign In"
msgstr "" msgstr ""
...@@ -2146,6 +2242,9 @@ msgstr "" ...@@ -2146,6 +2242,9 @@ msgstr ""
msgid "Save pipeline schedule" msgid "Save pipeline schedule"
msgstr "" msgstr ""
msgid "Save variables"
msgstr ""
msgid "Schedule a new pipeline" msgid "Schedule a new pipeline"
msgstr "" msgstr ""
...@@ -2158,18 +2257,33 @@ msgstr "" ...@@ -2158,18 +2257,33 @@ msgstr ""
msgid "Search branches and tags" msgid "Search branches and tags"
msgstr "" msgstr ""
msgid "Search milestones"
msgstr ""
msgid "Search project"
msgstr ""
msgid "Search users"
msgstr ""
msgid "Seconds before reseting failure information" msgid "Seconds before reseting failure information"
msgstr "" msgstr ""
msgid "Seconds to wait for a storage access attempt" msgid "Seconds to wait for a storage access attempt"
msgstr "" msgstr ""
msgid "Secret variables"
msgstr ""
msgid "Select Archive Format" msgid "Select Archive Format"
msgstr "" msgstr ""
msgid "Select a timezone" msgid "Select a timezone"
msgstr "" msgstr ""
msgid "Select assignee"
msgstr ""
msgid "Select branch/tag" msgid "Select branch/tag"
msgstr "" msgstr ""
...@@ -2226,6 +2340,9 @@ msgstr "" ...@@ -2226,6 +2340,9 @@ msgstr ""
msgid "Something went wrong on our end." msgid "Something went wrong on our end."
msgstr "" msgstr ""
msgid "Something went wrong trying to change the confidentiality of this issue"
msgstr ""
msgid "Something went wrong when toggling the button" msgid "Something went wrong when toggling the button"
msgstr "" msgstr ""
...@@ -2558,6 +2675,9 @@ msgstr "" ...@@ -2558,6 +2675,9 @@ msgstr ""
msgid "This is the author's first Merge Request to this project." msgid "This is the author's first Merge Request to this project."
msgstr "" msgstr ""
msgid "This issue is confidential"
msgstr ""
msgid "This issue is confidential and locked." msgid "This issue is confidential and locked."
msgstr "" msgstr ""
...@@ -2603,9 +2723,21 @@ msgstr "" ...@@ -2603,9 +2723,21 @@ msgstr ""
msgid "Time between merge request creation and merge/close" msgid "Time between merge request creation and merge/close"
msgstr "" msgstr ""
msgid "Time tracking"
msgstr ""
msgid "Time until first merge request" msgid "Time until first merge request"
msgstr "" msgstr ""
msgid "TimeTrackingEstimated|Est"
msgstr ""
msgid "TimeTracking|Estimated:"
msgstr ""
msgid "TimeTracking|Spent"
msgstr ""
msgid "Timeago|%s days ago" msgid "Timeago|%s days ago"
msgstr "" msgstr ""
...@@ -2742,6 +2874,12 @@ msgstr[1] "" ...@@ -2742,6 +2874,12 @@ msgstr[1] ""
msgid "Time|s" msgid "Time|s"
msgstr "" msgstr ""
msgid "Todo"
msgstr ""
msgid "Toggle sidebar"
msgstr ""
msgid "ToggleButton|Toggle Status: OFF" msgid "ToggleButton|Toggle Status: OFF"
msgstr "" msgstr ""
...@@ -2757,6 +2895,9 @@ msgstr "" ...@@ -2757,6 +2895,9 @@ msgstr ""
msgid "Total test time for all commits/merges" msgid "Total test time for all commits/merges"
msgstr "" msgstr ""
msgid "Track time with quick actions"
msgstr ""
msgid "Trigger this manual action" msgid "Trigger this manual action"
msgstr "" msgstr ""
...@@ -2769,6 +2910,9 @@ msgstr "" ...@@ -2769,6 +2910,9 @@ msgstr ""
msgid "Unlock" msgid "Unlock"
msgstr "" msgstr ""
msgid "Unlock this %{issuableDisplayName}? <strong>Everyone</strong> will be able to comment."
msgstr ""
msgid "Unlocked" msgid "Unlocked"
msgstr "" msgstr ""
...@@ -2796,9 +2940,15 @@ msgstr "" ...@@ -2796,9 +2940,15 @@ msgstr ""
msgid "Use your global notification setting" msgid "Use your global notification setting"
msgstr "" msgstr ""
msgid "Variables are applied to environments via the runner. They can be protected by only exposing them to protected branches or tags. You can use variables for passwords, secret keys, or whatever you want."
msgstr ""
msgid "View file @ " msgid "View file @ "
msgstr "" msgstr ""
msgid "View labels"
msgstr ""
msgid "View open merge request" msgid "View open merge request"
msgstr "" msgstr ""
...@@ -3018,14 +3168,26 @@ msgstr "" ...@@ -3018,14 +3168,26 @@ msgstr ""
msgid "Your projects" msgid "Your projects"
msgstr "" msgstr ""
msgid "assign yourself"
msgstr ""
msgid "branch name" msgid "branch name"
msgstr "" msgstr ""
msgid "confidentiality|You are going to turn off the confidentiality. This means <strong>everyone</strong> will be able to see and leave a comment on this issue."
msgstr ""
msgid "confidentiality|You are going to turn on the confidentiality. This means that only team members with <strong>at least Reporter access</strong> are able to see and leave comments on the issue."
msgstr ""
msgid "day" msgid "day"
msgid_plural "days" msgid_plural "days"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "estimateCommand|%{slash_command} will update the estimated time with the latest command."
msgstr ""
msgid "merge request" msgid "merge request"
msgid_plural "merge requests" msgid_plural "merge requests"
msgstr[0] "" msgstr[0] ""
...@@ -3180,9 +3342,15 @@ msgstr "" ...@@ -3180,9 +3342,15 @@ msgstr ""
msgid "personal access token" msgid "personal access token"
msgstr "" msgstr ""
msgid "remove due date"
msgstr ""
msgid "source" msgid "source"
msgstr "" msgstr ""
msgid "spendCommand|%{slash_command} will update the sum of the time spent."
msgstr ""
msgid "username" msgid "username"
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