Commit 4ac646b3 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'vue-i18n-js-vue-mr-widget-directory-ee' into 'master'

Vue-i18n: app/assets/javascripts/vue_merge_request_widget directory

See merge request gitlab-org/gitlab-ee!14380
parents 6850a11c e6b88baf
......@@ -125,7 +125,9 @@ export default {
this.isStopping = false;
})
.catch(() => {
createFlash('Something went wrong while stopping this environment. Please try again.');
createFlash(
__('Something went wrong while stopping this environment. Please try again.'),
);
this.isStopping = false;
});
}
......
......@@ -139,7 +139,7 @@ export default {
type="button"
class="btn dropdown-toggle qa-dropdown-toggle"
data-toggle="dropdown"
aria-label="Download as"
:aria-label="__('Download as')"
aria-haspopup="true"
aria-expanded="false"
>
......
......@@ -6,6 +6,7 @@ import statusIcon from '../mr_widget_status_icon.vue';
import MrWidgetAuthor from '../../components/mr_widget_author.vue';
import eventHub from '../../event_hub';
import { AUTO_MERGE_STRATEGIES } from '../../constants';
import { __ } from '~/locale';
export default {
name: 'MRWidgetAutoMergeEnabled',
......@@ -55,7 +56,7 @@ export default {
})
.catch(() => {
this.isCancellingAutoMerge = false;
Flash('Something went wrong. Please try again.');
Flash(__('Something went wrong. Please try again.'));
});
},
removeSourceBranch() {
......@@ -76,7 +77,7 @@ export default {
})
.catch(() => {
this.isRemovingSourceBranch = false;
Flash('Something went wrong. Please try again.');
Flash(__('Something went wrong. Please try again.'));
});
},
},
......@@ -107,15 +108,15 @@ export default {
<section class="mr-info-list">
<p>
{{ s__('mrWidget|The changes will be merged into') }}
<a :href="mr.targetBranchPath" class="label-branch"> {{ mr.targetBranch }} </a>
<a :href="mr.targetBranchPath" class="label-branch">{{ mr.targetBranch }}</a>
</p>
<p v-if="mr.shouldRemoveSourceBranch">
{{ s__('mrWidget|The source branch will be deleted') }}
</p>
<p v-else class="d-flex align-items-start">
<span class="append-right-10">
{{ s__('mrWidget|The source branch will not be deleted') }}
</span>
<span class="append-right-10">{{
s__('mrWidget|The source branch will not be deleted')
}}</span>
<a
v-if="canRemoveSourceBranch"
:disabled="isRemovingSourceBranch"
......
......@@ -4,6 +4,7 @@ import simplePoll from '../../../lib/utils/simple_poll';
import eventHub from '../../event_hub';
import statusIcon from '../mr_widget_status_icon.vue';
import Flash from '../../../flash';
import { __, sprintf } from '~/locale';
export default {
name: 'MRWidgetRebase',
......@@ -40,6 +41,17 @@ export default {
showDisabledButton() {
return ['failed', 'loading'].includes(this.status);
},
fastForwardMergeText() {
return sprintf(
__(
`Fast-forward merge is not possible. Rebase the source branch onto %{startTag}${this.mr.targetBranch}%{endTag} to allow this merge request to be merged.`,
),
{
startTag: '<span class="label-branch">',
endTag: '</span>',
},
);
},
},
methods: {
rebase() {
......@@ -54,7 +66,7 @@ export default {
.catch(error => {
this.rebasingError = error.merge_error;
this.isMakingRequest = false;
Flash('Something went wrong. Please try again.');
Flash(__('Something went wrong. Please try again.'));
});
},
checkRebaseStatus(continuePolling, stopPolling) {
......@@ -69,7 +81,7 @@ export default {
if (res.merge_error && res.merge_error.length) {
this.rebasingError = res.merge_error;
Flash('Something went wrong. Please try again.');
Flash(__('Something went wrong. Please try again.'));
}
eventHub.$emit('MRWidgetRebaseSuccess');
......@@ -78,7 +90,7 @@ export default {
})
.catch(() => {
this.isMakingRequest = false;
Flash('Something went wrong. Please try again.');
Flash(__('Something went wrong. Please try again.'));
stopPolling();
});
},
......@@ -91,19 +103,14 @@ export default {
<div class="rebase-state-find-class-convention media media-body space-children">
<template v-if="mr.rebaseInProgress || isMakingRequest">
<span class="bold"> Rebase in progress </span>
<span class="bold">{{ __('Rebase in progress') }}</span>
</template>
<template v-if="!mr.rebaseInProgress && !mr.canPushToSourceBranch">
<span class="bold">
Fast-forward merge is not possible. Rebase the source branch onto
<span class="label-branch">{{ mr.targetBranch }}</span> to allow this merge request to be
merged.
</span>
<span class="bold" v-html="fastForwardMergeText"></span>
</template>
<template v-if="!mr.rebaseInProgress && mr.canPushToSourceBranch && !isMakingRequest">
<div
class="accept-merge-holder clearfix
js-toggle-container accept-action media space-children"
class="accept-merge-holder clearfix js-toggle-container accept-action media space-children"
>
<button
:disabled="isMakingRequest"
......@@ -111,14 +118,14 @@ js-toggle-container accept-action media space-children"
class="btn btn-sm btn-reopen btn-success qa-mr-rebase-button"
@click="rebase"
>
<gl-loading-icon v-if="isMakingRequest" />
Rebase
<gl-loading-icon v-if="isMakingRequest" />{{ __('Rebase') }}
</button>
<span v-if="!rebasingError" class="bold">
Fast-forward merge is not possible. Rebase the source branch onto the target branch or
merge target branch into source branch to allow this merge request to be merged.
</span>
<span v-else class="bold danger"> {{ rebasingError }} </span>
<span v-if="!rebasingError" class="bold">{{
__(
'Fast-forward merge is not possible. Rebase the source branch onto the target branch or merge target branch into source branch to allow this merge request to be merged.',
)
}}</span>
<span v-else class="bold danger">{{ rebasingError }}</span>
</div>
</template>
</div>
......
......@@ -22,19 +22,29 @@ export default {
<span v-html="emptyStateSVG"></span>
</div>
<div class="text col-md-7 order-md-first col-12">
<span>
Merge requests are a place to propose changes you have made to a project and discuss those
changes with others.
</span>
<p>Interested parties can even contribute by pushing commits if they want to.</p>
<span>{{
s__(
'mrWidgetNothingToMerge|Merge requests are a place to propose changes you have made to a project and discuss those changes with others.',
)
}}</span>
<p>
Currently there are no changes in this merge request's source branch. Please push new
commits or use a different branch.
{{
s__(
'mrWidgetNothingToMerge|Interested parties can even contribute by pushing commits if they want to.',
)
}}
</p>
<p>
{{
s__(
"mrWidgetNothingToMerge|Currently there are no changes in this merge request's source branch. Please push new commits or use a different branch.",
)
}}
</p>
<div>
<a v-if="mr.newBlobPath" :href="mr.newBlobPath" class="btn btn-inverted btn-success">
Create file
</a>
<a v-if="mr.newBlobPath" :href="mr.newBlobPath" class="btn btn-inverted btn-success">{{
__('Create file')
}}</a>
</div>
</div>
</div>
......
......@@ -248,7 +248,7 @@ export default {
type="button"
class="btn btn-sm btn-info dropdown-toggle js-merge-moment"
data-toggle="dropdown"
aria-label="Select merge moment"
:aria-label="__('Select merge moment')"
>
<i class="fa fa-chevron-down qa-merge-moment-dropdown" aria-hidden="true"></i>
</button>
......
......@@ -46,14 +46,20 @@ export default {
<status-icon :show-disabled-button="Boolean(mr.removeWIPPath)" status="warning" />
<div class="media-body space-children">
<span class="bold">
This is a Work in Progress
{{ __('This is a Work in Progress') }}
<i
v-tooltip
class="fa fa-question-circle"
title="When this merge request is ready,
remove the WIP: prefix from the title to allow it to be merged"
aria-label="When this merge request is ready,
remove the WIP: prefix from the title to allow it to be merged"
:title="
s__(
'mrWidget|When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged',
)
"
:aria-label="
s__(
'mrWidget|When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged',
)
"
>
</i>
</span>
......@@ -64,8 +70,8 @@ export default {
class="btn btn-default btn-sm js-remove-wip"
@click="removeWIP"
>
<i v-if="isMakingRequest" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> Resolve WIP
status
<i v-if="isMakingRequest" class="fa fa-spinner fa-spin" aria-hidden="true"> </i>
{{ s__('mrWidget|Resolve WIP status') }}
</button>
</div>
</div>
......
......@@ -263,8 +263,11 @@ export default {
if (!data.pipeline) return;
const { label } = data.pipeline.details.status;
const title = `Pipeline ${label}`;
const message = `Pipeline ${label} for "${data.title}"`;
const title = sprintf(__('Pipeline %{label}'), { label });
const message = sprintf(__('Pipeline %{label} for "%{dataTitle}"'), {
dataTitle: data.title,
label,
});
notify.notifyMe(title, message, this.mr.gitlabLogo);
},
......
......@@ -4689,6 +4689,9 @@ msgstr ""
msgid "Download artifacts"
msgstr ""
msgid "Download as"
msgstr ""
msgid "Download asset"
msgstr ""
......@@ -5703,6 +5706,9 @@ msgstr ""
msgid "Failure"
msgstr ""
msgid "Fast-forward merge is not possible. Rebase the source branch onto the target branch or merge target branch into source branch to allow this merge request to be merged."
msgstr ""
msgid "Fast-forward merge without a merge commit"
msgstr ""
......@@ -9752,6 +9758,12 @@ msgstr ""
msgid "Pipeline"
msgstr ""
msgid "Pipeline %{label}"
msgstr ""
msgid "Pipeline %{label} for \"%{dataTitle}\""
msgstr ""
msgid "Pipeline Schedule"
msgstr ""
......@@ -11234,6 +11246,12 @@ msgstr ""
msgid "Real-time features"
msgstr ""
msgid "Rebase"
msgstr ""
msgid "Rebase in progress"
msgstr ""
msgid "Receive alerts from manually configured Prometheus servers."
msgstr ""
......@@ -12175,6 +12193,9 @@ msgstr ""
msgid "Select members to invite"
msgstr ""
msgid "Select merge moment"
msgstr ""
msgid "Select private project"
msgstr ""
......@@ -12741,6 +12762,9 @@ msgstr ""
msgid "Something went wrong while resolving this discussion. Please try again."
msgstr ""
msgid "Something went wrong while stopping this environment. Please try again."
msgstr ""
msgid "Something went wrong, unable to add %{project} to dashboard"
msgstr ""
......@@ -14021,6 +14045,9 @@ msgstr ""
msgid "This is a \"Ghost User\", created to hold all issues authored by users that have since been deleted. This user cannot be removed."
msgstr ""
msgid "This is a Work in Progress"
msgstr ""
msgid "This is a confidential issue."
msgstr ""
......@@ -16888,6 +16915,15 @@ msgstr ""
msgid "mrWidgetCommitsAdded|1 merge commit"
msgstr ""
msgid "mrWidgetNothingToMerge|Currently there are no changes in this merge request's source branch. Please push new commits or use a different branch."
msgstr ""
msgid "mrWidgetNothingToMerge|Interested parties can even contribute by pushing commits if they want to."
msgstr ""
msgid "mrWidgetNothingToMerge|Merge requests are a place to propose changes you have made to a project and discuss those changes with others."
msgstr ""
msgid "mrWidget| Please restore it or use a different %{missingBranchName} branch"
msgstr ""
......@@ -17044,6 +17080,9 @@ msgstr ""
msgid "mrWidget|Request to merge"
msgstr ""
msgid "mrWidget|Resolve WIP status"
msgstr ""
msgid "mrWidget|Resolve conflicts"
msgstr ""
......@@ -17110,6 +17149,9 @@ msgstr ""
msgid "mrWidget|This project is archived, write access has been disabled"
msgstr ""
msgid "mrWidget|When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged"
msgstr ""
msgid "mrWidget|You are not allowed to edit this project directly. Please fork to make changes."
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