diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /app/assets/javascripts/branches | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/branches')
-rw-r--r-- | app/assets/javascripts/branches/components/delete_branch_modal.vue | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/app/assets/javascripts/branches/components/delete_branch_modal.vue b/app/assets/javascripts/branches/components/delete_branch_modal.vue index 14c2badeb3f..383fa5f7512 100644 --- a/app/assets/javascripts/branches/components/delete_branch_modal.vue +++ b/app/assets/javascripts/branches/components/delete_branch_modal.vue @@ -32,17 +32,10 @@ export default { return sprintf(modalTitle, { branchName: this.branchName }); }, - message() { - const modalMessage = this.isProtectedBranch + modalMessage() { + return this.isProtectedBranch ? this.$options.i18n.modalMessageProtectedBranch : this.$options.i18n.modalMessage; - - return sprintf(modalMessage, { branchName: this.branchName }); - }, - unmergedWarning() { - return sprintf(this.$options.i18n.unmergedWarning, { - defaultBranchName: this.defaultBranchName, - }); }, undoneWarning() { return sprintf(this.$options.i18n.undoneWarning, { @@ -92,17 +85,15 @@ export default { i18n: { modalTitle: s__('Branches|Delete branch. Are you ABSOLUTELY SURE?'), modalTitleProtectedBranch: s__('Branches|Delete protected branch. Are you ABSOLUTELY SURE?'), - modalMessage: s__( - "Branches|You're about to permanently delete the branch %{strongStart}%{branchName}.%{strongEnd}", - ), + modalMessage: s__("Branches|You're about to permanently delete the branch %{branchName}."), modalMessageProtectedBranch: s__( - "Branches|You're about to permanently delete the protected branch %{strongStart}%{branchName}.%{strongEnd}", + "Branches|You're about to permanently delete the protected branch %{branchName}.", ), unmergedWarning: s__( - 'Branches|This branch hasn’t been merged into %{defaultBranchName}. To avoid data loss, consider merging this branch before deleting it.', + "Branches|This branch hasn't been merged into %{defaultBranchName}. To avoid data loss, consider merging this branch before deleting it.", ), undoneWarning: s__( - 'Branches|Once you confirm and press %{strongStart}%{buttonText},%{strongEnd} it cannot be undone or recovered.', + 'Branches|After you confirm and select %{strongStart}%{buttonText},%{strongEnd} you cannot recover this branch.', ), cancelButtonText: s__('Branches|Cancel, keep branch'), confirmationText: s__( @@ -119,13 +110,19 @@ export default { <gl-modal ref="modal" size="sm" :modal-id="modalId" :title="title"> <gl-alert class="gl-mb-5" variant="danger" :dismissible="false"> <div data-testid="modal-message"> - <gl-sprintf :message="message"> - <template #strong="{ content }"> - <strong> {{ content }} </strong> + <gl-sprintf :message="modalMessage"> + <template #branchName> + <strong> + <code class="gl-white-space-pre-wrap">{{ branchName }}</code> + </strong> </template> </gl-sprintf> <p v-if="!merged" class="gl-mb-0 gl-mt-4"> - {{ unmergedWarning }} + <gl-sprintf :message="$options.i18n.unmergedWarning"> + <template #defaultBranchName> + <code class="gl-white-space-pre-wrap">{{ defaultBranchName }}</code> + </template> + </gl-sprintf> </p> </div> </gl-alert> @@ -145,7 +142,7 @@ export default { {{ content }} </template> </gl-sprintf> - <code class="gl-white-space-pre-wrap"> {{ branchName }} </code> + <code class="gl-white-space-pre-wrap">{{ branchName }}</code> <gl-form-input v-model="enteredBranchName" name="delete_branch_input" |