summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-01-23 08:03:01 +0100
committerJarka Kadlecová <jarka@gitlab.com>2018-02-07 14:05:57 +0100
commita39dc76645132fb848cb474a04178844bd6a70e3 (patch)
tree1992bbcffa80f44eeca3fa89705350fe7074e4fa
parenta55cfc1e6316232e25a46416b0a60be7c1282da7 (diff)
downloadgitlab-ce-34416-issue-i18n.tar.gz
Translate issuable sidebar34416-issue-i18n
-rw-r--r--app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue10
-rw-r--r--app/assets/javascripts/sidebar/components/confidential/edit_form.vue23
-rw-r--r--app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue2
-rw-r--r--app/assets/javascripts/sidebar/components/lock/edit_form.vue22
-rw-r--r--app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue2
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.js4
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.js2
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/help_state.js34
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.js2
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/time_tracker.js2
-rw-r--r--app/views/shared/issuable/_label_page_create.html.haml8
-rw-r--r--app/views/shared/issuable/_label_page_default.html.haml10
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml46
-rw-r--r--app/views/shared/issuable/_sidebar_assignees.html.haml16
-rw-r--r--app/views/shared/issuable/_sidebar_todo.html.haml8
-rw-r--r--changelogs/unreleased/34416-issue-i18n.yml5
-rw-r--r--doc/development/i18n/externalization.md2
-rw-r--r--locale/gitlab.pot172
18 files changed, 284 insertions, 86 deletions
diff --git a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
index 02153fb86a5..8a86c409b62 100644
--- a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
+++ b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
@@ -2,6 +2,7 @@
import Flash from '../../../flash';
import editForm from './edit_form.vue';
import Icon from '../../../vue_shared/components/icon.vue';
+ import { __ } from '../../../locale';
export default {
components: {
@@ -40,8 +41,7 @@
this.service.update('issue', { confidential })
.then(() => location.reload())
.catch(() => {
- Flash(`Something went wrong trying to
- change the confidentiality of this issue`);
+ Flash(__('Something went wrong trying to change the confidentiality of this issue'));
});
},
},
@@ -58,7 +58,7 @@
/>
</div>
<div class="title hide-collapsed">
- Confidentiality
+ {{ __('Confidentiality') }}
<a
v-if="isEditable"
class="pull-right confidential-edit"
@@ -84,7 +84,7 @@
aria-hidden="true"
class="sidebar-item-icon inline"
/>
- Not confidential
+ {{ __('Not confidential') }}
</div>
<div
v-else
@@ -95,7 +95,7 @@
aria-hidden="true"
class="sidebar-item-icon inline is-active"
/>
- This issue is confidential
+ {{ __('This issue is confidential') }}
</div>
</div>
</div>
diff --git a/app/assets/javascripts/sidebar/components/confidential/edit_form.vue b/app/assets/javascripts/sidebar/components/confidential/edit_form.vue
index 6a81235a1a7..c569843b05f 100644
--- a/app/assets/javascripts/sidebar/components/confidential/edit_form.vue
+++ b/app/assets/javascripts/sidebar/components/confidential/edit_form.vue
@@ -1,5 +1,6 @@
<script>
import editFormButtons from './edit_form_buttons.vue';
+ import { s__ } from '../../../locale';
export default {
components: {
@@ -19,6 +20,14 @@
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>
@@ -26,15 +35,13 @@
<div class="dropdown open">
<div class="dropdown-menu sidebar-item-warning-message">
<div>
- <p v-if="!isConfidential">
- 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.
+ <p
+ v-if="!isConfidential"
+ v-html="confidentialityOnWarning">
</p>
- <p v-else>
- 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.
+ <p
+ v-else
+ v-html="confidentialityOffWarning">
</p>
<edit-form-buttons
:is-confidential="isConfidential"
diff --git a/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue b/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
index 7ed0619ee6b..49d5dfeea1a 100644
--- a/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
+++ b/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
@@ -32,7 +32,7 @@ export default {
class="btn btn-default append-right-10"
@click="toggleForm"
>
- Cancel
+ {{ __('Cancel') }}
</button>
<button
type="button"
diff --git a/app/assets/javascripts/sidebar/components/lock/edit_form.vue b/app/assets/javascripts/sidebar/components/lock/edit_form.vue
index e7a87636aa7..bc32e974bc3 100644
--- a/app/assets/javascripts/sidebar/components/lock/edit_form.vue
+++ b/app/assets/javascripts/sidebar/components/lock/edit_form.vue
@@ -1,6 +1,7 @@
<script>
import editFormButtons from './edit_form_buttons.vue';
import issuableMixin from '../../../vue_shared/mixins/issuable';
+ import { __, sprintf } from '../../../locale';
export default {
components: {
@@ -25,6 +26,14 @@
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>
@@ -33,19 +42,14 @@
<div class="dropdown-menu sidebar-item-warning-message">
<p
class="text"
- v-if="isLocked">
- Unlock this {{ issuableDisplayName }}?
- <strong>Everyone</strong>
- will be able to comment.
+ v-if="isLocked"
+ v-html="unlockWarning">
</p>
<p
class="text"
- v-else>
- Lock this {{ issuableDisplayName }}?
- Only
- <strong>project members</strong>
- will be able to comment.
+ v-else
+ v-html="lockWarning">
</p>
<edit-form-buttons
diff --git a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
index 02876a6c175..3a344c89299 100644
--- a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
+++ b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
@@ -72,7 +72,7 @@
</div>
<div class="title hide-collapsed">
- Lock {{ issuableDisplayName }}
+ {{ sprintf(__('Lock %{issuableDisplayName}'), { issuableDisplayName: issuableDisplayName }) }}
<button
v-if="isEditable"
class="pull-right lock-edit btn btn-blank"
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.js b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.js
index fd0d4570d68..b5ebccd3795 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.js
+++ b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.js
@@ -68,7 +68,7 @@ export default {
<div class="compare-display-container">
<div class="compare-display pull-left">
<span class="compare-label">
- Spent
+ {{ s__('TimeTracking|Spent') }}
</span>
<span class="compare-value spent">
{{ timeSpentHumanReadable }}
@@ -76,7 +76,7 @@ export default {
</div>
<div class="compare-display estimated pull-right">
<span class="compare-label">
- Est
+ {{ s__('TimeTrackingEstimated|Est') }}
</span>
<span class="compare-value">
{{ timeEstimateHumanReadable }}
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.js b/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.js
index ad1b9179db0..2d324c71379 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.js
+++ b/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.js
@@ -9,7 +9,7 @@ export default {
template: `
<div class="time-tracking-estimate-only-pane">
<span class="bold">
- Estimated:
+ {{ s__('TimeTracking|Estimated:') }}
</span>
{{ timeEstimateHumanReadable }}
</div>
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/help_state.js b/app/assets/javascripts/sidebar/components/time_tracking/help_state.js
index 142ad437509..19f74ad3c6d 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/help_state.js
+++ b/app/assets/javascripts/sidebar/components/time_tracking/help_state.js
@@ -1,3 +1,5 @@
+import { sprintf, s__ } from '../../../locale';
+
export default {
name: 'time-tracking-help-state',
props: {
@@ -10,33 +12,39 @@ export default {
href() {
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: `
<div class="time-tracking-help-state">
<div class="time-tracking-info">
<h4>
- Track time with quick actions
+ {{ __('Track time with quick actions') }}
</h4>
<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>
- <code>
- /estimate
- </code>
- will update the estimated time with the latest command.
+ <p v-html="estimateText">
</p>
- <p>
- <code>
- /spend
- </code>
- will update the sum of the time spent.
+ <p v-html="spendText">
</p>
<a
class="btn btn-default learn-more-button"
:href="href"
>
- Learn more
+ {{ __('Learn more') }}
</a>
</div>
</div>
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.js b/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.js
index d1dd1dcdd27..38da76c6771 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.js
+++ b/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.js
@@ -3,7 +3,7 @@ export default {
template: `
<div class="time-tracking-no-tracking-pane">
<span class="no-value">
- No estimate or time spent
+ {{ __('No estimate or time spent') }}
</span>
</div>
`,
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.js b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.js
index ed0d71a4f79..866178e2b23 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.js
+++ b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.js
@@ -110,7 +110,7 @@ export default {
:time-estimate-human-readable="timeEstimateHumanReadable"
/>
<div class="title hide-collapsed">
- Time tracking
+ {{ __('Time tracking') }}
<div
class="help-button pull-right"
v-if="!showHelpState"
diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml
index 0a692d9653f..d5e7d3b87b7 100644
--- a/app/views/shared/issuable/_label_page_create.html.haml
+++ b/app/views/shared/issuable/_label_page_create.html.haml
@@ -2,16 +2,16 @@
= dropdown_title("Create new label", options: { back: true })
= dropdown_content do
.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
- suggested_colors.each do |color|
= link_to '#', style: "background-color: #{color}", data: { color: color } do
&nbsp
.dropdown-label-color-input
.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
%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" }
- Cancel
+ = _('Cancel')
diff --git a/app/views/shared/issuable/_label_page_default.html.haml b/app/views/shared/issuable/_label_page_default.html.haml
index ad031e6af80..6a83321abcb 100644
--- a/app/views/shared/issuable/_label_page_default.html.haml
+++ b/app/views/shared/issuable/_label_page_default.html.haml
@@ -1,4 +1,4 @@
-- title = local_assigns.fetch(:title, 'Assign labels')
+- title = local_assigns.fetch(:title, _('Assign labels'))
- show_create = local_assigns.fetch(:show_create, true)
- show_footer = local_assigns.fetch(:show_footer, true)
- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search')
@@ -8,7 +8,7 @@
- if show_boards_content
.issue-board-dropdown-content
%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_content
- if current_board_parent && show_footer
@@ -17,11 +17,11 @@
- if can?(current_user, :admin_label, current_board_parent)
%li
%a.dropdown-toggle-page{ href: "#" }
- Create new label
+ = _('Create new label')
%li
= link_to labels_path, :"data-is-link" => true do
- if show_create && can?(current_user, :admin_label, current_board_parent)
- Manage labels
+ = _('Manage labels')
- else
- View labels
+ = _('View labels')
= dropdown_loading
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index cc00c3c0bfd..15fd01c8429 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -9,7 +9,7 @@
.block.issuable-sidebar-header
- if current_user
%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" }
= sidebar_gutter_toggle_icon
- if current_user
@@ -29,9 +29,9 @@
%span.has-tooltip{ title: "#{issuable.milestone.title}<br>#{milestone_tooltip_title(issuable.milestone)}", data: { container: 'body', html: 1, placement: 'left' } }
= issuable.milestone.title
- else
- None
+ = _('None')
.title.hide-collapsed
- Milestone
+ = _('Milestone')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can_edit_issuable
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
@@ -39,16 +39,17 @@
- 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 }
- else
- %span.no-value None
+ %span.no-value
+ = _('None')
.selectbox.hide-collapsed
= 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)
#issuable-time-tracker.block
// Fallback while content is loading
.title.hide-collapsed
- Time tracking
+ = _('Time tracking')
= icon('spinner spin', 'aria-hidden': 'true')
- if issuable.has_attribute?(:due_date)
.block.due_date
@@ -57,7 +58,7 @@
%span.js-due-date-sidebar-value
= issuable.due_date.try(:to_s, :medium) || 'None'
.title.hide-collapsed
- Due date
+ = _('Due date')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
@@ -66,21 +67,23 @@
- if issuable.due_date
%span.bold= issuable.due_date.to_s(:medium)
- else
- %span.no-value No due date
+ %span.no-value
+ = _('No due date')
- 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?) }
\-
%a.js-remove-due-date{ href: "#", role: "button" }
- remove due date
+ = _('remove due date')
- if can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
.selectbox.hide-collapsed
= f.hidden_field :due_date, value: issuable.due_date.try(:strftime, 'yy-mm-dd')
.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) } }
- %span.dropdown-toggle-text Due date
+ %span.dropdown-toggle-text
+ = _('Due date')
= icon('chevron-down', 'aria-hidden': 'true')
.dropdown-menu.dropdown-menu-due-date
- = dropdown_title('Due date')
+ = dropdown_title(_('Due date'))
= dropdown_content do
.js-due-date-calendar
@@ -92,7 +95,7 @@
%span
= selected_labels.size
.title.hide-collapsed
- Labels
+ = _('Labels')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can_edit_issuable
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
@@ -101,7 +104,8 @@
- selected_labels.each do |label|
= link_to_label(label, subject: issuable.project, type: issuable.to_ability_name)
- else
- %span.no-value None
+ %span.no-value
+ = _('None')
.selectbox.hide-collapsed
- selected_labels.each do |label|
= hidden_field_tag "#{issuable.to_ability_name}[label_names][]", label.id, id: nil
@@ -131,29 +135,29 @@
- project_ref = cross_project_reference(@project, issuable)
.block.project-reference
.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
%span
- Reference:
+ = _('Reference:')
%cite{ title: 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)
.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')
.dropdown.sidebar-move-issue-dropdown.hide-collapsed
%button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button',
data: { toggle: 'dropdown' } }
- Move issue
+ = _('Move issue')
.dropdown-menu.dropdown-menu-selectable
- = dropdown_title('Move issue')
- = dropdown_filter('Search project', search_id: 'sidebar-move-issue-dropdown-search')
+ = dropdown_title(_('Move issue'))
+ = dropdown_filter(_('Search project'), search_id: 'sidebar-move-issue-dropdown-search')
= dropdown_content
= dropdown_loading
= dropdown_footer add_content_class: true do
%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')
%script.js-sidebar-options{ type: "application/json" }= issuable_sidebar_options(issuable, can_edit_issuable).to_json.html_safe
diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml
index 0fca4162ec9..304df38a096 100644
--- a/app/views/shared/issuable/_sidebar_assignees.html.haml
+++ b/app/views/shared/issuable/_sidebar_assignees.html.haml
@@ -1,7 +1,7 @@
- if issuable.is_a?(Issue)
#js-vue-sidebar-assignees{ data: { field: "#{issuable.to_ability_name}[assignee_ids]", signed_in: signed_in } }
.title.hide-collapsed
- Assignee
+ = _('Assignee')
= icon('spinner spin')
- else
.sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: (issuable.assignee.name if issuable.assignee) }
@@ -10,35 +10,35 @@
- else
= icon('user', 'aria-hidden': 'true')
.title.hide-collapsed
- Assignee
+ = _('Assignee')
= icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true')
- if can_edit_issuable
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right'
- 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
.value.hide-collapsed
- if issuable.assignee
= link_to_member(@project, issuable.assignee, size: 32, extra_class: 'bold') do
- 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')
%span.username
= issuable.assignee.to_reference
- else
%span.assign-yourself.no-value
- No assignee
+ = _('No assignee')
- if can_edit_issuable
\-
%a.js-assign-yourself{ href: '#' }
- assign yourself
+ = _('assign yourself')
.selectbox.hide-collapsed
- 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 }
- - 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'
+ - 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')
- if issuable.is_a?(Issue)
- unless issuable.assignees.any?
diff --git a/app/views/shared/issuable/_sidebar_todo.html.haml b/app/views/shared/issuable/_sidebar_todo.html.haml
index 574e2958ae8..b77e104c072 100644
--- a/app/views/shared/issuable/_sidebar_todo.html.haml
+++ b/app/views/shared/issuable/_sidebar_todo.html.haml
@@ -1,11 +1,11 @@
- is_collapsed = local_assigns.fetch(:is_collapsed, false)
-- mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : 'Mark done'
-- todo_content = is_collapsed ? icon('plus-square') : 'Add todo'
+- mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : _('Mark done')
+- todo_content = is_collapsed ? icon('plus-square') : _('Add todo')
%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'),
- title: (todo.nil? ? 'Add todo' : 'Mark done'),
- 'aria-label' => (todo.nil? ? 'Add todo' : 'Mark done'),
+ title: (todo.nil? ? _('Add todo') : _('Mark done')),
+ 'aria-label' => (todo.nil? ? _('Add todo') : _('Mark done')),
data: issuable_todo_button_data(issuable, todo, is_collapsed) }
%span.issuable-todo-inner.js-issuable-todo-inner<
- if todo
diff --git a/changelogs/unreleased/34416-issue-i18n.yml b/changelogs/unreleased/34416-issue-i18n.yml
new file mode 100644
index 00000000000..523073ee43b
--- /dev/null
+++ b/changelogs/unreleased/34416-issue-i18n.yml
@@ -0,0 +1,5 @@
+---
+title: Translate issuable sidebar
+merge_request:
+author:
+type: other
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md
index f493ad4ae66..f4542932295 100644
--- a/doc/development/i18n/externalization.md
+++ b/doc/development/i18n/externalization.md
@@ -110,6 +110,8 @@ You can mark that content for translation with:
In JavaScript we added the `__()` (double underscore parenthesis) function
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
Now that the new content is marked for translation, we need to update the PO
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index d5cb5400d4f..fbb3f949430 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-02-06 10:02+0100\n"
-"PO-Revision-Date: 2018-02-06 10:02+0100\n"
+"POT-Creation-Date: 2018-02-07 13:35+0100\n"
+"PO-Revision-Date: 2018-02-07 13:35+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -129,6 +129,9 @@ msgstr ""
msgid "Add new directory"
msgstr ""
+msgid "Add todo"
+msgstr ""
+
msgid "AdminArea|Stop all jobs"
msgstr ""
@@ -228,6 +231,21 @@ msgstr ""
msgid "Artifacts"
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}"
msgstr ""
@@ -524,15 +542,24 @@ msgstr ""
msgid "CiVariables|Remove variable row"
msgstr ""
+msgid "CiVariable|* (All environments)"
+msgstr ""
+
msgid "CiVariable|All environments"
msgstr ""
+msgid "CiVariable|Error occured while saving variables"
+msgstr ""
+
msgid "CiVariable|Protected"
msgstr ""
msgid "CiVariable|Toggle protected"
msgstr ""
+msgid "CiVariable|Validation failed"
+msgstr ""
+
msgid "CircuitBreakerApiLink|circuitbreaker api"
msgstr ""
@@ -698,6 +725,9 @@ msgstr ""
msgid "ClusterIntegration|Manage your Kubernetes cluster by visiting %{link_gke}"
msgstr ""
+msgid "ClusterIntegration|More information"
+msgstr ""
+
msgid "ClusterIntegration|Note:"
msgstr ""
@@ -877,6 +907,9 @@ msgstr ""
msgid "CompareBranches|There isn't anything to compare."
msgstr ""
+msgid "Confidentiality"
+msgstr ""
+
msgid "Container Registry"
msgstr ""
@@ -949,6 +982,12 @@ msgstr ""
msgid "Copy commit SHA to clipboard"
msgstr ""
+msgid "Copy reference to clipboard"
+msgstr ""
+
+msgid "Create"
+msgstr ""
+
msgid "Create New Directory"
msgstr ""
@@ -964,6 +1003,9 @@ msgstr ""
msgid "Create file"
msgstr ""
+msgid "Create lists from labels. Issues with that label appear in that list."
+msgstr ""
+
msgid "Create merge request"
msgstr ""
@@ -976,6 +1018,9 @@ msgstr ""
msgid "Create new file"
msgstr ""
+msgid "Create new label"
+msgstr ""
+
msgid "Create new..."
msgstr ""
@@ -1098,6 +1143,9 @@ msgstr ""
msgid "DownloadSource|Download"
msgstr ""
+msgid "Due date"
+msgstr ""
+
msgid "Edit"
msgstr ""
@@ -1512,6 +1560,9 @@ msgstr ""
msgid "LastPushEvent|at"
msgstr ""
+msgid "Learn more"
+msgstr ""
+
msgid "Learn more in the"
msgstr ""
@@ -1533,18 +1584,30 @@ msgstr ""
msgid "Lock"
msgstr ""
+msgid "Lock %{issuableDisplayName}"
+msgstr ""
+
+msgid "Lock this %{issuableDisplayName}? Only <strong>project members</strong> will be able to comment."
+msgstr ""
+
msgid "Locked"
msgstr ""
msgid "Login"
msgstr ""
+msgid "Manage labels"
+msgstr ""
+
msgid "Mar"
msgstr ""
msgid "March"
msgstr ""
+msgid "Mark done"
+msgstr ""
+
msgid "Maximum git storage failures"
msgstr ""
@@ -1575,6 +1638,9 @@ msgstr ""
msgid "Messages"
msgstr ""
+msgid "Milestone"
+msgstr ""
+
msgid "Milestones|Delete milestone"
msgstr ""
@@ -1596,6 +1662,15 @@ msgstr ""
msgid "More information is available|here"
msgstr ""
+msgid "Move"
+msgstr ""
+
+msgid "Move issue"
+msgstr ""
+
+msgid "Name new label"
+msgstr ""
+
msgid "New Issue"
msgid_plural "New Issues"
msgstr[0] ""
@@ -1649,9 +1724,18 @@ msgstr ""
msgid "New tag"
msgstr ""
+msgid "No assignee"
+msgstr ""
+
msgid "No connection could be made to a Gitaly Server, please check your logs!"
msgstr ""
+msgid "No due date"
+msgstr ""
+
+msgid "No estimate or time spent"
+msgstr ""
+
msgid "No file chosen"
msgstr ""
@@ -1667,9 +1751,15 @@ msgstr ""
msgid "None"
msgstr ""
+msgid "Not allowed to merge"
+msgstr ""
+
msgid "Not available"
msgstr ""
+msgid "Not confidential"
+msgstr ""
+
msgid "Not enough data"
msgstr ""
@@ -2069,6 +2159,9 @@ msgstr ""
msgid "Push events"
msgstr ""
+msgid "Quick actions can be used in the issues description and comment boxes."
+msgstr ""
+
msgid "Read more"
msgstr ""
@@ -2081,6 +2174,9 @@ msgstr ""
msgid "RefSwitcher|Tags"
msgstr ""
+msgid "Reference:"
+msgstr ""
+
msgid "Register / Sign In"
msgstr ""
@@ -2146,6 +2242,9 @@ msgstr ""
msgid "Save pipeline schedule"
msgstr ""
+msgid "Save variables"
+msgstr ""
+
msgid "Schedule a new pipeline"
msgstr ""
@@ -2158,18 +2257,33 @@ msgstr ""
msgid "Search branches and tags"
msgstr ""
+msgid "Search milestones"
+msgstr ""
+
+msgid "Search project"
+msgstr ""
+
+msgid "Search users"
+msgstr ""
+
msgid "Seconds before reseting failure information"
msgstr ""
msgid "Seconds to wait for a storage access attempt"
msgstr ""
+msgid "Secret variables"
+msgstr ""
+
msgid "Select Archive Format"
msgstr ""
msgid "Select a timezone"
msgstr ""
+msgid "Select assignee"
+msgstr ""
+
msgid "Select branch/tag"
msgstr ""
@@ -2226,6 +2340,9 @@ msgstr ""
msgid "Something went wrong on our end."
msgstr ""
+msgid "Something went wrong trying to change the confidentiality of this issue"
+msgstr ""
+
msgid "Something went wrong when toggling the button"
msgstr ""
@@ -2558,6 +2675,9 @@ msgstr ""
msgid "This is the author's first Merge Request to this project."
msgstr ""
+msgid "This issue is confidential"
+msgstr ""
+
msgid "This issue is confidential and locked."
msgstr ""
@@ -2603,9 +2723,21 @@ msgstr ""
msgid "Time between merge request creation and merge/close"
msgstr ""
+msgid "Time tracking"
+msgstr ""
+
msgid "Time until first merge request"
msgstr ""
+msgid "TimeTrackingEstimated|Est"
+msgstr ""
+
+msgid "TimeTracking|Estimated:"
+msgstr ""
+
+msgid "TimeTracking|Spent"
+msgstr ""
+
msgid "Timeago|%s days ago"
msgstr ""
@@ -2742,6 +2874,12 @@ msgstr[1] ""
msgid "Time|s"
msgstr ""
+msgid "Todo"
+msgstr ""
+
+msgid "Toggle sidebar"
+msgstr ""
+
msgid "ToggleButton|Toggle Status: OFF"
msgstr ""
@@ -2757,6 +2895,9 @@ msgstr ""
msgid "Total test time for all commits/merges"
msgstr ""
+msgid "Track time with quick actions"
+msgstr ""
+
msgid "Trigger this manual action"
msgstr ""
@@ -2769,6 +2910,9 @@ msgstr ""
msgid "Unlock"
msgstr ""
+msgid "Unlock this %{issuableDisplayName}? <strong>Everyone</strong> will be able to comment."
+msgstr ""
+
msgid "Unlocked"
msgstr ""
@@ -2796,9 +2940,15 @@ msgstr ""
msgid "Use your global notification setting"
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 @ "
msgstr ""
+msgid "View labels"
+msgstr ""
+
msgid "View open merge request"
msgstr ""
@@ -3018,14 +3168,26 @@ msgstr ""
msgid "Your projects"
msgstr ""
+msgid "assign yourself"
+msgstr ""
+
msgid "branch name"
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_plural "days"
msgstr[0] ""
msgstr[1] ""
+msgid "estimateCommand|%{slash_command} will update the estimated time with the latest command."
+msgstr ""
+
msgid "merge request"
msgid_plural "merge requests"
msgstr[0] ""
@@ -3180,9 +3342,15 @@ msgstr ""
msgid "personal access token"
msgstr ""
+msgid "remove due date"
+msgstr ""
+
msgid "source"
msgstr ""
+msgid "spendCommand|%{slash_command} will update the sum of the time spent."
+msgstr ""
+
msgid "username"
msgstr ""