Commit 638c8465 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'vue-i18n-js-boards-directory' into 'master'

Vue-i18n: autofix for 'app/assetsjavascripts/boards' dir

See merge request gitlab-org/gitlab-ce!29877
parents be83c8ea 2efafb62
<script> <script>
import { __ } from '~/locale';
/* global ListLabel */ /* global ListLabel */
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import boardsStore from '../stores/boards_store'; import boardsStore from '../stores/boards_store';
...@@ -7,8 +8,8 @@ export default { ...@@ -7,8 +8,8 @@ export default {
data() { data() {
return { return {
predefinedLabels: [ predefinedLabels: [
new ListLabel({ title: 'To Do', color: '#F0AD4E' }), new ListLabel({ title: __('To Do'), color: '#F0AD4E' }),
new ListLabel({ title: 'Doing', color: '#5CB85C' }), new ListLabel({ title: __('Doing'), color: '#5CB85C' }),
], ],
}; };
}, },
...@@ -58,7 +59,11 @@ export default { ...@@ -58,7 +59,11 @@ export default {
<template> <template>
<div class="board-blank-state p-3"> <div class="board-blank-state p-3">
<p>Add the following default lists to your Issue Board with one click:</p> <p>
{{
__('BoardBlankState|Add the following default lists to your Issue Board with one click:')
}}
</p>
<ul class="list-unstyled board-blank-state-list"> <ul class="list-unstyled board-blank-state-list">
<li v-for="(label, index) in predefinedLabels" :key="index"> <li v-for="(label, index) in predefinedLabels" :key="index">
<span <span
...@@ -70,18 +75,21 @@ export default { ...@@ -70,18 +75,21 @@ export default {
</li> </li>
</ul> </ul>
<p> <p>
Starting out with the default set of lists will get you right on the way to making the most of {{
your board. __(
'BoardBlankState|Starting out with the default set of lists will get you right on the way to making the most of your board.',
)
}}
</p> </p>
<button <button
class="btn btn-success btn-inverted btn-block" class="btn btn-success btn-inverted btn-block"
type="button" type="button"
@click.stop="addDefaultLists" @click.stop="addDefaultLists"
> >
Add default lists {{ __('BoardBlankState|Add default lists') }}
</button> </button>
<button class="btn btn-default btn-block" type="button" @click.stop="clearBlankState"> <button class="btn btn-default btn-block" type="button" @click.stop="clearBlankState">
Nevermind, I'll use my own {{ __("BoardBlankState|Nevermind, I'll use my own") }}
</button> </button>
</div> </div>
</template> </template>
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
:class="{ 'd-none': !list.isExpanded, 'd-flex flex-column': list.isExpanded }" :class="{ 'd-none': !list.isExpanded, 'd-flex flex-column': list.isExpanded }"
class="board-list-component position-relative h-100" class="board-list-component position-relative h-100"
> >
<div v-if="loading" class="board-list-loading text-center" aria-label="Loading issues"> <div v-if="loading" class="board-list-loading text-center" :aria-label="__('Loading issues')">
<gl-loading-icon /> <gl-loading-icon />
</div> </div>
<board-new-issue <board-new-issue
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
/> />
<li v-if="showCount" class="board-list-count text-center" data-issue-id="-1"> <li v-if="showCount" class="board-list-count text-center" data-issue-id="-1">
<gl-loading-icon v-show="list.loadingMore" label="Loading more issues" /> <gl-loading-icon v-show="list.loadingMore" label="Loading more issues" />
<span v-if="list.issues.length === list.issuesSize"> Showing all issues </span> <span v-if="list.issues.length === list.issuesSize">{{ __('Showing all issues') }}</span>
<span v-else> Showing {{ list.issues.length }} of {{ list.issuesSize }} issues </span> <span v-else> Showing {{ list.issues.length }} of {{ list.issuesSize }} issues </span>
</li> </li>
</ul> </ul>
......
...@@ -102,9 +102,9 @@ export default { ...@@ -102,9 +102,9 @@ export default {
<div class="board-card position-relative p-3 rounded"> <div class="board-card position-relative p-3 rounded">
<form @submit="submit($event)"> <form @submit="submit($event)">
<div v-if="error" class="flash-container"> <div v-if="error" class="flash-container">
<div class="flash-alert">An error occurred. Please try again.</div> <div class="flash-alert">{{ __('An error occurred. Please try again.') }}</div>
</div> </div>
<label :for="list.id + '-title'" class="label-bold"> Title </label> <label :for="list.id + '-title'" class="label-bold">{{ __('Title') }}</label>
<input <input
:id="list.id + '-title'" :id="list.id + '-title'"
ref="input" ref="input"
...@@ -122,12 +122,11 @@ export default { ...@@ -122,12 +122,11 @@ export default {
class="float-left" class="float-left"
variant="success" variant="success"
type="submit" type="submit"
>{{ __('Submit issue') }}</gl-button
> >
Submit issue <gl-button class="float-right" type="button" variant="default" @click="cancel">{{
</gl-button> __('Cancel')
<gl-button class="float-right" type="button" variant="default" @click="cancel"> }}</gl-button>
Cancel
</gl-button>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
return `${this.rootPath}${assignee.username}`; return `${this.rootPath}${assignee.username}`;
}, },
avatarUrlTitle(assignee) { avatarUrlTitle(assignee) {
return `Avatar for ${assignee.name}`; return sprintf(__(`Avatar for %{assigneeName}`), { assigneeName: assignee.name });
}, },
showLabel(label) { showLabel(label) {
if (!label.id) return false; if (!label.id) return false;
...@@ -160,9 +160,10 @@ export default { ...@@ -160,9 +160,10 @@ export default {
:title="__('Confidential')" :title="__('Confidential')"
class="confidential-icon append-right-4" class="confidential-icon append-right-4"
:aria-label="__('Confidential')" :aria-label="__('Confidential')"
/><a :href="issue.path" :title="issue.title" class="js-no-trigger" @mousemove.stop>{{ />
issue.title <a :href="issue.path" :title="issue.title" class="js-no-trigger" @mousemove.stop>
}}</a> {{ issue.title }}
</a>
</h4> </h4>
</div> </div>
<div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap"> <div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap">
...@@ -204,13 +205,13 @@ export default { ...@@ -204,13 +205,13 @@ export default {
placement="bottom" placement="bottom"
class="board-issue-path block-truncated bold" class="board-issue-path block-truncated bold"
>{{ issueReferencePath }}</tooltip-on-truncate >{{ issueReferencePath }}</tooltip-on-truncate
>#{{ issue.iid }} >
#{{ issue.iid }}
</span> </span>
<span class="board-info-items prepend-top-8 d-inline-block"> <span class="board-info-items prepend-top-8 d-inline-block">
<issue-due-date v-if="issue.dueDate" :date="issue.dueDate" /><issue-time-estimate <issue-due-date v-if="issue.dueDate" :date="issue.dueDate" />
v-if="issue.timeEstimate" <issue-time-estimate v-if="issue.timeEstimate" :estimate="issue.timeEstimate" />
:estimate="issue.timeEstimate" <issue-card-weight
/><issue-card-weight
v-if="issue.weight" v-if="issue.weight"
:weight="issue.weight" :weight="issue.weight"
@click="filterByWeight(issue.weight)" @click="filterByWeight(issue.weight)"
...@@ -230,7 +231,8 @@ export default { ...@@ -230,7 +231,8 @@ export default {
tooltip-placement="bottom" tooltip-placement="bottom"
> >
<span class="js-assignee-tooltip"> <span class="js-assignee-tooltip">
<span class="bold d-block">Assignee</span> {{ assignee.name }} <span class="bold d-block">{{ __('Assignee') }}</span>
{{ assignee.name }}
<span class="text-white-50">@{{ assignee.username }}</span> <span class="text-white-50">@{{ assignee.username }}</span>
</span> </span>
</user-avatar-link> </user-avatar-link>
...@@ -240,9 +242,8 @@ export default { ...@@ -240,9 +242,8 @@ export default {
:title="assigneeCounterTooltip" :title="assigneeCounterTooltip"
class="avatar-counter" class="avatar-counter"
data-placement="bottom" data-placement="bottom"
>{{ assigneeCounterLabel }}</span
> >
{{ assigneeCounterLabel }}
</span>
</div> </div>
</div> </div>
</div> </div>
......
<script> <script>
import { __, sprintf } from '~/locale';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins'; import modalMixin from '../../mixins/modal_mixins';
...@@ -20,19 +21,20 @@ export default { ...@@ -20,19 +21,20 @@ export default {
computed: { computed: {
contents() { contents() {
const obj = { const obj = {
title: "You haven't added any issues to your project yet", title: __("You haven't added any issues to your project yet"),
content: ` content: __(
An issue can be a bug, a todo or a feature request that needs to be 'An issue can be a bug, a todo or a feature request that needs to be discussed in a project. Besides, issues are searchable and filterable.',
discussed in a project. Besides, issues are searchable and filterable. ),
`,
}; };
if (this.activeTab === 'selected') { if (this.activeTab === 'selected') {
obj.title = "You haven't selected any issues yet"; obj.title = __("You haven't selected any issues yet");
obj.content = ` obj.content = sprintf(
Go back to <strong>Open issues</strong> and select some issues __(
to add to your board. 'Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board.',
`; ),
{ startTag: '<strong>', endTag: '</strong>' },
);
} }
return obj; return obj;
...@@ -51,16 +53,16 @@ export default { ...@@ -51,16 +53,16 @@ export default {
<div class="text-content"> <div class="text-content">
<h4>{{ contents.title }}</h4> <h4>{{ contents.title }}</h4>
<p v-html="contents.content"></p> <p v-html="contents.content"></p>
<a v-if="activeTab === 'all'" :href="newIssuePath" class="btn btn-success btn-inverted"> <a v-if="activeTab === 'all'" :href="newIssuePath" class="btn btn-success btn-inverted">{{
New issue __('New issue')
</a> }}</a>
<button <button
v-if="activeTab === 'selected'" v-if="activeTab === 'selected'"
class="btn btn-default" class="btn btn-default"
type="button" type="button"
@click="changeTab('all')" @click="changeTab('all')"
> >
Open issues {{ __('Open issues') }}
</button> </button>
</div> </div>
</div> </div>
......
<script> <script>
import Flash from '../../../flash'; import Flash from '../../../flash';
import { __ } from '../../../locale'; import { __, n__ } from '../../../locale';
import ListsDropdown from './lists_dropdown.vue'; import ListsDropdown from './lists_dropdown.vue';
import { pluralize } from '../../../lib/utils/text_utility';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins'; import modalMixin from '../../mixins/modal_mixins';
import boardsStore from '../../stores/boards_store'; import boardsStore from '../../stores/boards_store';
...@@ -24,8 +23,8 @@ export default { ...@@ -24,8 +23,8 @@ export default {
}, },
submitText() { submitText() {
const count = ModalStore.selectedCount(); const count = ModalStore.selectedCount();
if (!count) return __('Add issues');
return `Add ${count > 0 ? count : ''} ${pluralize('issue', count)}`; return n__(`Add %d issue`, `Add %d issues`, count);
}, },
}, },
methods: { methods: {
...@@ -68,11 +67,11 @@ export default { ...@@ -68,11 +67,11 @@ export default {
<button :disabled="submitDisabled" class="btn btn-success" type="button" @click="addIssues"> <button :disabled="submitDisabled" class="btn btn-success" type="button" @click="addIssues">
{{ submitText }} {{ submitText }}
</button> </button>
<span class="inline add-issues-footer-to-list"> to list </span> <span class="inline add-issues-footer-to-list">{{ __('to list') }}</span>
<lists-dropdown /> <lists-dropdown />
</div> </div>
<button class="btn btn-default float-right" type="button" @click="toggleModal(false)"> <button class="btn btn-default float-right" type="button" @click="toggleModal(false)">
Cancel {{ __('Cancel') }}
</button> </button>
</footer> </footer>
</template> </template>
<script> <script>
import { __ } from '~/locale';
import ModalFilters from './filters'; import ModalFilters from './filters';
import ModalTabs from './tabs.vue'; import ModalTabs from './tabs.vue';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
...@@ -30,10 +31,10 @@ export default { ...@@ -30,10 +31,10 @@ export default {
computed: { computed: {
selectAllText() { selectAllText() {
if (ModalStore.selectedCount() !== this.issues.length || this.issues.length === 0) { if (ModalStore.selectedCount() !== this.issues.length || this.issues.length === 0) {
return 'Select all'; return __('Select all');
} }
return 'Deselect all'; return __('Deselect all');
}, },
showSearch() { showSearch() {
return this.activeTab === 'all' && !this.loading && this.issuesCount > 0; return this.activeTab === 'all' && !this.loading && this.issuesCount > 0;
...@@ -57,7 +58,7 @@ export default { ...@@ -57,7 +58,7 @@ export default {
type="button" type="button"
class="close" class="close"
data-dismiss="modal" data-dismiss="modal"
aria-label="Close" :aria-label="__('Close')"
@click="toggleModal(false)" @click="toggleModal(false)"
> >
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>
......
...@@ -123,7 +123,9 @@ export default { ...@@ -123,7 +123,9 @@ export default {
class="empty-state add-issues-empty-state-filter text-center" class="empty-state add-issues-empty-state-filter text-center"
> >
<div class="svg-content"><img :src="emptyStateSvg" /></div> <div class="svg-content"><img :src="emptyStateSvg" /></div>
<div class="text-content"><h4>There are no issues to show.</h4></div> <div class="text-content">
<h4>{{ __('There are no issues to show.') }}</h4>
</div>
</div> </div>
<div v-for="(group, index) in groupedIssues" :key="index" class="add-issues-list-column"> <div v-for="(group, index) in groupedIssues" :key="index" class="add-issues-list-column">
<div v-for="issue in group" v-if="showIssue(issue)" :key="issue.id" class="board-card-parent"> <div v-for="issue in group" v-if="showIssue(issue)" :key="issue.id" class="board-card-parent">
......
<script> <script>
import { __ } from '~/locale';
import $ from 'jquery'; import $ from 'jquery';
import _ from 'underscore'; import _ from 'underscore';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
...@@ -27,7 +28,7 @@ export default { ...@@ -27,7 +28,7 @@ export default {
}, },
computed: { computed: {
selectedProjectName() { selectedProjectName() {
return this.selectedProject.name || 'Select a project'; return this.selectedProject.name || __('Select a project');
}, },
}, },
mounted() { mounted() {
...@@ -81,7 +82,7 @@ export default { ...@@ -81,7 +82,7 @@ export default {
<template> <template>
<div> <div>
<label class="label-bold prepend-top-10"> Project </label> <label class="label-bold prepend-top-10">{{ __('Project') }}</label>
<div ref="projectsDropdown" class="dropdown dropdown-projects"> <div ref="projectsDropdown" class="dropdown dropdown-projects">
<button <button
class="dropdown-menu-toggle wide" class="dropdown-menu-toggle wide"
...@@ -92,9 +93,9 @@ export default { ...@@ -92,9 +93,9 @@ export default {
{{ selectedProjectName }} <icon name="chevron-down" /> {{ selectedProjectName }} <icon name="chevron-down" />
</button> </button>
<div class="dropdown-menu dropdown-menu-selectable dropdown-menu-full-width"> <div class="dropdown-menu dropdown-menu-selectable dropdown-menu-full-width">
<div class="dropdown-title">Projects</div> <div class="dropdown-title">{{ __('Projects') }}</div>
<div class="dropdown-input"> <div class="dropdown-input">
<input class="dropdown-input-field" type="search" placeholder="Search projects" /> <input class="dropdown-input-field" type="search" :placeholder="__('Search projects')" />
<icon name="search" class="dropdown-input-search" data-hidden="true" /> <icon name="search" class="dropdown-input-search" data-hidden="true" />
</div> </div>
<div class="dropdown-content"></div> <div class="dropdown-content"></div>
......
...@@ -76,7 +76,7 @@ export default Vue.extend({ ...@@ -76,7 +76,7 @@ export default Vue.extend({
<template> <template>
<div class="block list"> <div class="block list">
<button class="btn btn-default btn-block" type="button" @click="removeIssue"> <button class="btn btn-default btn-block" type="button" @click="removeIssue">
Remove from board {{ __('Remove from board') }}
</button> </button>
</div> </div>
</template> </template>
...@@ -579,6 +579,11 @@ msgstr "" ...@@ -579,6 +579,11 @@ msgstr ""
msgid "Activity" msgid "Activity"
msgstr "" msgstr ""
msgid "Add %d issue"
msgid_plural "Add %d issues"
msgstr[0] ""
msgstr[1] ""
msgid "Add CHANGELOG" msgid "Add CHANGELOG"
msgstr "" msgstr ""
...@@ -639,6 +644,9 @@ msgstr "" ...@@ -639,6 +644,9 @@ msgstr ""
msgid "Add image comment" msgid "Add image comment"
msgstr "" msgstr ""
msgid "Add issues"
msgstr ""
msgid "Add italic text" msgid "Add italic text"
msgstr "" msgstr ""
...@@ -1071,6 +1079,9 @@ msgstr "" ...@@ -1071,6 +1079,9 @@ msgstr ""
msgid "An error occurred. Please try again." msgid "An error occurred. Please try again."
msgstr "" msgstr ""
msgid "An issue can be a bug, a todo or a feature request that needs to be discussed in a project. Besides, issues are searchable and filterable."
msgstr ""
msgid "Anonymous" msgid "Anonymous"
msgstr "" msgstr ""
...@@ -1580,6 +1591,18 @@ msgstr "" ...@@ -1580,6 +1591,18 @@ msgstr ""
msgid "Blog" msgid "Blog"
msgstr "" msgstr ""
msgid "BoardBlankState|Add default lists"
msgstr ""
msgid "BoardBlankState|Add the following default lists to your Issue Board with one click:"
msgstr ""
msgid "BoardBlankState|Nevermind, I'll use my own"
msgstr ""
msgid "BoardBlankState|Starting out with the default set of lists will get you right on the way to making the most of your board."
msgstr ""
msgid "Boards" msgid "Boards"
msgstr "" msgstr ""
...@@ -3582,6 +3605,9 @@ msgstr "" ...@@ -3582,6 +3605,9 @@ msgstr ""
msgid "Description:" msgid "Description:"
msgstr "" msgstr ""
msgid "Deselect all"
msgstr ""
msgid "Destroy" msgid "Destroy"
msgstr "" msgstr ""
...@@ -3684,6 +3710,9 @@ msgstr "" ...@@ -3684,6 +3710,9 @@ msgstr ""
msgid "Dockerfile" msgid "Dockerfile"
msgstr "" msgstr ""
msgid "Doing"
msgstr ""
msgid "Domain" msgid "Domain"
msgstr "" msgstr ""
...@@ -4829,6 +4858,9 @@ msgstr "" ...@@ -4829,6 +4858,9 @@ msgstr ""
msgid "Go back" msgid "Go back"
msgstr "" msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
msgstr ""
msgid "Go full screen" msgid "Go full screen"
msgstr "" msgstr ""
...@@ -5972,6 +6004,9 @@ msgstr "" ...@@ -5972,6 +6004,9 @@ msgstr ""
msgid "Loading functions timed out. Please reload the page to try again." msgid "Loading functions timed out. Please reload the page to try again."
msgstr "" msgstr ""
msgid "Loading issues"
msgstr ""
msgid "Loading the GitLab IDE..." msgid "Loading the GitLab IDE..."
msgstr "" msgstr ""
...@@ -6969,6 +7004,9 @@ msgstr "" ...@@ -6969,6 +7004,9 @@ msgstr ""
msgid "Open in Xcode" msgid "Open in Xcode"
msgstr "" msgstr ""
msgid "Open issues"
msgstr ""
msgid "Open raw" msgid "Open raw"
msgstr "" msgstr ""
...@@ -8525,6 +8563,9 @@ msgstr "" ...@@ -8525,6 +8563,9 @@ msgstr ""
msgid "Remove fork relationship" msgid "Remove fork relationship"
msgstr "" msgstr ""
msgid "Remove from board"
msgstr ""
msgid "Remove group" msgid "Remove group"
msgstr "" msgstr ""
...@@ -9049,9 +9090,15 @@ msgstr "" ...@@ -9049,9 +9090,15 @@ msgstr ""
msgid "Select a new namespace" msgid "Select a new namespace"
msgstr "" msgstr ""
msgid "Select a project"
msgstr ""
msgid "Select a timezone" msgid "Select a timezone"
msgstr "" msgstr ""
msgid "Select all"
msgstr ""
msgid "Select an existing Kubernetes cluster or create a new one" msgid "Select an existing Kubernetes cluster or create a new one"
msgstr "" msgstr ""
...@@ -9339,6 +9386,9 @@ msgid_plural "Showing %d events" ...@@ -9339,6 +9386,9 @@ msgid_plural "Showing %d events"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Showing all issues"
msgstr ""
msgid "Showing last %{size} of log -" msgid "Showing last %{size} of log -"
msgstr "" msgstr ""
...@@ -9789,6 +9839,9 @@ msgstr "" ...@@ -9789,6 +9839,9 @@ msgstr ""
msgid "Submit feedback" msgid "Submit feedback"
msgstr "" msgstr ""
msgid "Submit issue"
msgstr ""
msgid "Submit search" msgid "Submit search"
msgstr "" msgstr ""
...@@ -10361,6 +10414,9 @@ msgstr "" ...@@ -10361,6 +10414,9 @@ msgstr ""
msgid "There are no issues to show" msgid "There are no issues to show"
msgstr "" msgstr ""
msgid "There are no issues to show."
msgstr ""
msgid "There are no labels yet" msgid "There are no labels yet"
msgstr "" msgstr ""
...@@ -10863,6 +10919,9 @@ msgstr "" ...@@ -10863,6 +10919,9 @@ msgstr ""
msgid "To %{link_to_help} of your domain, add the above key to a TXT record within to your DNS configuration." msgid "To %{link_to_help} of your domain, add the above key to a TXT record within to your DNS configuration."
msgstr "" msgstr ""
msgid "To Do"
msgstr ""
msgid "To GitLab" msgid "To GitLab"
msgstr "" msgstr ""
...@@ -12026,6 +12085,12 @@ msgstr "" ...@@ -12026,6 +12085,12 @@ msgstr ""
msgid "You have reached your project limit" msgid "You have reached your project limit"
msgstr "" msgstr ""
msgid "You haven't added any issues to your project yet"
msgstr ""
msgid "You haven't selected any issues yet"
msgstr ""
msgid "You left the \"%{membershipable_human_name}\" %{source_type}." msgid "You left the \"%{membershipable_human_name}\" %{source_type}."
msgstr "" msgstr ""
...@@ -12797,6 +12862,9 @@ msgstr "" ...@@ -12797,6 +12862,9 @@ msgstr ""
msgid "this document" msgid "this document"
msgstr "" msgstr ""
msgid "to list"
msgstr ""
msgid "triggered" msgid "triggered"
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