From e9588108a41c7e790015b5ef3d470309a32b2bff Mon Sep 17 00:00:00 2001 From: Ezekiel Kigbo Date: Mon, 1 Jul 2019 11:51:19 +0000 Subject: [PATCH] Vue-i18n: app/assets/javascripts/serverless directory i18n linting for .vue files under the app/assets/javascripts/serverless directory --- .../serverless/components/area.vue | 15 +++--- .../components/function_details.vue | 4 +- .../serverless/components/functions.vue | 47 +++++++++++++++---- locale/gitlab.pot | 18 +++++++ 4 files changed, 65 insertions(+), 19 deletions(-) diff --git a/app/assets/javascripts/serverless/components/area.vue b/app/assets/javascripts/serverless/components/area.vue index 32c9d6eccb8..a1a8cd3acbd 100644 --- a/app/assets/javascripts/serverless/components/area.vue +++ b/app/assets/javascripts/serverless/components/area.vue @@ -4,6 +4,7 @@ import { debounceByAnimationFrame } from '~/lib/utils/common_utils'; import dateFormat from 'dateformat'; import { X_INTERVAL } from '../constants'; import { validateGraphData } from '../utils'; +import { __ } from '~/locale'; let debouncedResize; @@ -42,7 +43,7 @@ export default { }, generateSeries() { return { - name: 'Invocations', + name: __('Invocations'), type: 'line', data: this.chartData.requests.map(data => [data.time, data.value]), symbolSize: 0, @@ -124,7 +125,9 @@ export default {
{{ graphData.title }}
-
+
+ +
- - + +
diff --git a/app/assets/javascripts/serverless/components/function_details.vue b/app/assets/javascripts/serverless/components/function_details.vue index b8906cfca4e..d542dad8119 100644 --- a/app/assets/javascripts/serverless/components/function_details.vue +++ b/app/assets/javascripts/serverless/components/function_details.vue @@ -89,7 +89,9 @@ export default { }}

-

No pods loaded at this time.

+
+

{{ s__('ServerlessDetails|No pods loaded at this time.') }}

+
+import { sprintf, s__ } from '~/locale'; import { mapState, mapActions, mapGetters } from 'vuex'; import { GlLoadingIcon } from '@gitlab/ui'; import FunctionRow from './function_row.vue'; @@ -37,6 +38,28 @@ export default { isInstalled() { return this.installed === true; }, + noServerlessConfigFile() { + return sprintf( + s__( + 'Serverless|Your repository does not have a corresponding %{startTag}serverless.yml%{endTag} file.', + ), + { startTag: '', endTag: '' }, + ); + }, + noGitlabYamlConfigured() { + return sprintf( + s__('Serverless|Your %{startTag}.gitlab-ci.yml%{endTag} file is not properly configured.'), + { startTag: '', endTag: '' }, + ); + }, + mismatchedServerlessFunctions() { + return sprintf( + s__( + "Serverless|The functions listed in the %{startTag}serverless.yml%{endTag} file don't match the namespace of your cluster.", + ), + { startTag: '', endTag: '' }, + ); + }, }, created() { this.fetchFunctions({ @@ -82,25 +105,29 @@ export default {

{{ s__('Serverless|No functions available') }}

{{ - s__(`Serverless|There is currently no function data available from Knative. - This could be for a variety of reasons including:`) + s__( + 'Serverless|There is currently no function data available from Knative. This could be for a variety of reasons including:', + ) }}

    -
  • Your repository does not have a corresponding serverless.yml file.
  • -
  • Your .gitlab-ci.yml file is not properly configured.
  • - The functions listed in the serverless.yml file don't match the namespace - of your cluster. + {{ noServerlessConfigFile }}
  • -
  • The deploy job has not finished.
  • +
  • + {{ noGitlabYamlConfigured }} +
  • +
  • + {{ mismatchedServerlessFunctions }} +
  • +
  • {{ s__('Serverless|The deploy job has not finished.') }}

{{ - s__(`Serverless|If you believe none of these apply, please check - back later as the function data may be in the process of becoming - available.`) + s__( + 'Serverless|If you believe none of these apply, please check back later as the function data may be in the process of becoming available.', + ) }}

diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 965a2294240..6ab105f134e 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -5559,6 +5559,9 @@ msgstr "" msgid "Invite member" msgstr "" +msgid "Invocations" +msgstr "" + msgid "Invoke Count" msgstr "" @@ -9198,6 +9201,9 @@ msgstr "" msgid "ServerlessDetails|More information" msgstr "" +msgid "ServerlessDetails|No pods loaded at this time." +msgstr "" + msgid "ServerlessDetails|Number of Kubernetes pods in use over time based on necessity." msgstr "" @@ -9228,9 +9234,21 @@ msgstr "" msgid "Serverless|No functions available" msgstr "" +msgid "Serverless|The deploy job has not finished." +msgstr "" + +msgid "Serverless|The functions listed in the %{startTag}serverless.yml%{endTag} file don't match the namespace of your cluster." +msgstr "" + msgid "Serverless|There is currently no function data available from Knative. This could be for a variety of reasons including:" msgstr "" +msgid "Serverless|Your %{startTag}.gitlab-ci.yml%{endTag} file is not properly configured." +msgstr "" + +msgid "Serverless|Your repository does not have a corresponding %{startTag}serverless.yml%{endTag} file." +msgstr "" + msgid "Service" msgstr ""