diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2019-07-01 23:25:00 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-07-01 23:25:00 +0300 |
commit | b8ab6009fcd7e99c14baa5756f32525892b210bf (patch) | |
tree | 26ed6a23166f16c59346fbc93ef4f3b276057b01 /app/assets/javascripts/environments/components/environment_item.vue | |
parent | 7177f59fe67ba00bb137fbf3d6f8636232640344 (diff) | |
parent | 9a18b2757d3b682c9773797eff070a63a3be55bb (diff) |
Merge branch 'vue-i18n-js-environments-directory' into 'master'
Vue-i18n: autofix for app/assets/javascripts/environments directory
See merge request gitlab-org/gitlab-ce!29966
Diffstat (limited to 'app/assets/javascripts/environments/components/environment_item.vue')
-rw-r--r-- | app/assets/javascripts/environments/components/environment_item.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/environments/components/environment_item.vue b/app/assets/javascripts/environments/components/environment_item.vue index f0e80cba753..dc68443493c 100644 --- a/app/assets/javascripts/environments/components/environment_item.vue +++ b/app/assets/javascripts/environments/components/environment_item.vue @@ -1,4 +1,5 @@ <script> +import { __, sprintf } from '~/locale'; import Timeago from 'timeago.js'; import _ from 'underscore'; import { GlTooltipDirective } from '@gitlab/ui'; @@ -172,7 +173,9 @@ export default { this.model.last_deployment.user && this.model.last_deployment.user.username ) { - return `${this.model.last_deployment.user.username}'s avatar'`; + return sprintf(__("%{username}'s avatar"), { + username: this.model.last_deployment.user.username, + }); } return ''; }, @@ -293,6 +296,9 @@ export default { * @returns {Boolean|Undefined} */ isLastDeployment() { + // TODO: when the vue i18n rules are merged need to disable @gitlab/i18n/no-non-i18n-strings + // name: 'last?' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives + // Vue i18n ESLint rules issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/63560 return this.model && this.model.last_deployment && this.model.last_deployment['last?']; }, |