diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-28 21:07:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-28 21:07:56 +0300 |
commit | 1b6c8b34c1301ece8383b4a7950270a757304c0b (patch) | |
tree | fcdd5518b2e7b9d2308797e3203eb8a47c813b56 /app/assets/javascripts/environments | |
parent | b213b675ec1d6fa633497c5f71c195f00b56be6d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/environments')
-rw-r--r-- | app/assets/javascripts/environments/components/empty_state.vue | 31 | ||||
-rw-r--r-- | app/assets/javascripts/environments/components/environments_app.vue | 2 |
2 files changed, 26 insertions, 7 deletions
diff --git a/app/assets/javascripts/environments/components/empty_state.vue b/app/assets/javascripts/environments/components/empty_state.vue index 36b9b647af7..563fa6c96fb 100644 --- a/app/assets/javascripts/environments/components/empty_state.vue +++ b/app/assets/javascripts/environments/components/empty_state.vue @@ -1,4 +1,7 @@ <script> +import { s__ } from '~/locale'; +import { ENVIRONMENTS_SCOPE } from '../constants'; + export default { name: 'EnvironmentsEmptyState', props: { @@ -6,6 +9,25 @@ export default { type: String, required: true, }, + scope: { + type: String, + required: true, + }, + }, + computed: { + title() { + return this.$options.i18n.title[this.scope]; + }, + }, + i18n: { + title: { + [ENVIRONMENTS_SCOPE.AVAILABLE]: s__("Environments|You don't have any environments."), + [ENVIRONMENTS_SCOPE.STOPPED]: s__("Environments|You don't have any stopped environments."), + }, + content: s__( + 'Environments|Environments are places where code gets deployed, such as staging or production.', + ), + link: s__('Environments|How do I create an environment?'), }, }; </script> @@ -13,14 +35,11 @@ export default { <div class="empty-state"> <div class="text-content"> <h4 class="js-blank-state-title"> - {{ s__("Environments|You don't have any environments right now") }} + {{ title }} </h4> <p> - {{ - s__(`Environments|Environments are places where - code gets deployed, such as staging or production.`) - }} - <a :href="helpPath"> {{ s__('Environments|More information') }} </a> + {{ $options.i18n.content }} + <a :href="helpPath"> {{ $options.i18n.link }} </a> </p> </div> </div> diff --git a/app/assets/javascripts/environments/components/environments_app.vue b/app/assets/javascripts/environments/components/environments_app.vue index c7008c03099..f44182e822b 100644 --- a/app/assets/javascripts/environments/components/environments_app.vue +++ b/app/assets/javascripts/environments/components/environments_app.vue @@ -253,7 +253,7 @@ export default { @change="resetPolling" /> </template> - <empty-state v-else :help-path="helpPagePath" /> + <empty-state v-else :help-path="helpPagePath" :scope="scope" /> <gl-pagination align="center" :total-items="totalItems" |