From d14cc985b5f608b7cf6b060595abf0d647707055 Mon Sep 17 00:00:00 2001 From: Ezekiel Kigbo Date: Mon, 8 Jul 2019 08:20:45 +0000 Subject: Vue-i18n: app/assets/javascripts/vue_merge_request_widget directory i18n linting for .vue files under the app/assets/javascripts/vue_merge_request_widget directory --- .../components/deployment.vue | 4 +- .../components/mr_widget_header.vue | 2 +- .../states/mr_widget_auto_merge_enabled.vue | 13 ++++--- .../components/states/mr_widget_rebase.vue | 43 +++++++++++++--------- .../components/states/nothing_to_merge.vue | 30 ++++++++++----- .../components/states/ready_to_merge.vue | 2 +- .../components/states/work_in_progress.vue | 20 ++++++---- .../vue_merge_request_widget/mr_widget_options.vue | 7 +++- locale/gitlab.pot | 42 +++++++++++++++++++++ 9 files changed, 117 insertions(+), 46 deletions(-) diff --git a/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue b/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue index 34cdb70ce14..5c7859828d8 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue @@ -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; }); } diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue index e20a16900d4..fb826be19f5 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue @@ -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" > diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue index 5958c2cf87e..8e8e67228ed 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue @@ -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 {

{{ s__('mrWidget|The changes will be merged into') }} - {{ mr.targetBranch }} + {{ mr.targetBranch }}

{{ s__('mrWidget|The source branch will be deleted') }}

- - {{ s__('mrWidget|The source branch will not be deleted') }} - + {{ + s__('mrWidget|The source branch will not be deleted') + }} ', + endTag: '', + }, + ); + }, }, 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 {

diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue index a38495bb4cc..7312b31c01c 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue @@ -22,19 +22,29 @@ export default { diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue index ca1b4a57717..d1f75593d14 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue @@ -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')" > diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue index 7c322388d30..91c0b40a0b5 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue @@ -46,14 +46,20 @@ export default {
- This is a Work in Progress + {{ __('This is a Work in Progress') }} @@ -64,8 +70,8 @@ export default { class="btn btn-default btn-sm js-remove-wip" @click="removeWIP" > - Resolve WIP - status + + {{ s__('mrWidget|Resolve WIP status') }}
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index a79da476890..8d415c1bbea 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -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); }, diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 78bf48d66fc..1635faf312c 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3796,6 +3796,9 @@ msgstr "" msgid "Download artifacts" msgstr "" +msgid "Download as" +msgstr "" + msgid "Download asset" msgstr "" @@ -4615,6 +4618,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 "" @@ -7360,6 +7366,12 @@ msgstr "" msgid "Pipeline" msgstr "" +msgid "Pipeline %{label}" +msgstr "" + +msgid "Pipeline %{label} for \"%{dataTitle}\"" +msgstr "" + msgid "Pipeline Schedule" msgstr "" @@ -8584,6 +8596,12 @@ msgstr "" msgid "Real-time features" msgstr "" +msgid "Rebase" +msgstr "" + +msgid "Rebase in progress" +msgstr "" + msgid "Receive notifications about your own activity" msgstr "" @@ -9248,6 +9266,9 @@ msgstr "" msgid "Select members to invite" msgstr "" +msgid "Select merge moment" +msgstr "" + msgid "Select private project" msgstr "" @@ -9697,6 +9718,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 search projects" msgstr "" @@ -10740,6 +10764,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 "" @@ -12751,6 +12778,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 "" @@ -12868,6 +12904,9 @@ msgstr "" msgid "mrWidget|Request to merge" msgstr "" +msgid "mrWidget|Resolve WIP status" +msgstr "" + msgid "mrWidget|Resolve conflicts" msgstr "" @@ -12931,6 +12970,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 "" -- cgit v1.2.1