diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-09 21:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-09 21:08:59 +0300 |
commit | cc6b6a7b78befba0fa003def271d446c51d67088 (patch) | |
tree | 63cf925f984ee20379b5c9057e4a3766e8221b36 /app/assets/javascripts/issuable | |
parent | 0a353a9fa386ad60374daa9bad56f41bb5491c33 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issuable')
-rw-r--r-- | app/assets/javascripts/issuable/popover/components/mr_popover.vue | 24 | ||||
-rw-r--r-- | app/assets/javascripts/issuable/popover/constants.js | 13 |
2 files changed, 12 insertions, 25 deletions
diff --git a/app/assets/javascripts/issuable/popover/components/mr_popover.vue b/app/assets/javascripts/issuable/popover/components/mr_popover.vue index 92994809362..af93430963e 100644 --- a/app/assets/javascripts/issuable/popover/components/mr_popover.vue +++ b/app/assets/javascripts/issuable/popover/components/mr_popover.vue @@ -1,14 +1,12 @@ <script> -/* eslint-disable @gitlab/vue-require-i18n-strings */ import { GlBadge, GlPopover, GlSkeletonLoader } from '@gitlab/ui'; +import { STATUS_CLOSED, STATUS_MERGED } from '~/issues/constants'; +import { __ } from '~/locale'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import timeagoMixin from '~/vue_shared/mixins/timeago'; -import { mrStates, humanMRStates } from '../constants'; import query from '../queries/merge_request.query.graphql'; export default { - // name: 'MRPopover' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25 - name: 'MRPopover', // eslint-disable-line @gitlab/require-i18n-strings components: { GlBadge, GlPopover, @@ -48,9 +46,9 @@ export default { }, badgeVariant() { switch (this.mergeRequest.state) { - case mrStates.merged: + case STATUS_MERGED: return 'info'; - case mrStates.closed: + case STATUS_CLOSED: return 'danger'; default: return 'success'; @@ -58,12 +56,12 @@ export default { }, stateHumanName() { switch (this.mergeRequest.state) { - case mrStates.merged: - return humanMRStates.merged; - case mrStates.closed: - return humanMRStates.closed; + case STATUS_MERGED: + return __('Merged'); + case STATUS_CLOSED: + return __('Closed'); default: - return humanMRStates.open; + return __('Open'); } }, title() { @@ -101,7 +99,9 @@ export default { <gl-badge class="gl-mr-3" :variant="badgeVariant"> {{ stateHumanName }} </gl-badge> - <span class="gl-text-secondary">Opened <time v-text="formattedTime"></time></span> + <span class="gl-text-secondary"> + {{ __('Opened') }} <time v-text="formattedTime"></time + ></span> </div> <ci-icon v-if="detailedStatus" :status="detailedStatus" /> </div> diff --git a/app/assets/javascripts/issuable/popover/constants.js b/app/assets/javascripts/issuable/popover/constants.js deleted file mode 100644 index 352bc635293..00000000000 --- a/app/assets/javascripts/issuable/popover/constants.js +++ /dev/null @@ -1,13 +0,0 @@ -import { __ } from '~/locale'; - -export const mrStates = { - merged: 'merged', - closed: 'closed', - open: 'open', -}; - -export const humanMRStates = { - merged: __('Merged'), - closed: __('Closed'), - open: __('Open'), -}; |