Vue-i18n: app/assets/javascripts/jobs directory

i18n linting for .vue files under the
app/assets/javascripts/jobs directory
上级 e740580d
...@@ -3,7 +3,7 @@ import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui';
import { polyfillSticky } from '~/lib/utils/sticky'; import { polyfillSticky } from '~/lib/utils/sticky';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils'; import { numberToHumanSize } from '~/lib/utils/number_utils';
import { sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import scrollDown from '../svg/scroll_down.svg'; import scrollDown from '../svg/scroll_down.svg';
export default { export default {
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
}, },
computed: { computed: {
jobLogSize() { jobLogSize() {
return sprintf('Showing last %{size} of log -', { return sprintf(__('Showing last %{size} of log -'), {
size: numberToHumanSize(this.size), size: numberToHumanSize(this.size),
}); });
}, },
...@@ -74,14 +74,12 @@ export default { ...@@ -74,14 +74,12 @@ export default {
<div class="js-truncated-info truncated-info d-none d-sm-block float-left"> <div class="js-truncated-info truncated-info d-none d-sm-block float-left">
<template v-if="isTraceSizeVisible"> <template v-if="isTraceSizeVisible">
{{ jobLogSize }} {{ jobLogSize }}
<gl-link <gl-link
v-if="rawPath" v-if="rawPath"
:href="rawPath" :href="rawPath"
class="js-raw-link text-plain text-underline prepend-left-5" class="js-raw-link text-plain text-underline prepend-left-5"
>{{ s__('Job|Complete Raw') }}</gl-link
> >
{{ s__('Job|Complete Raw') }}
</gl-link>
</template> </template>
</div> </div>
<!-- eo truncate information --> <!-- eo truncate information -->
......
<script> <script>
import { __, sprintf } from '~/locale';
import _ from 'underscore'; import _ from 'underscore';
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { GlLink, GlButton } from '@gitlab/ui'; import { GlLink, GlButton } from '@gitlab/ui';
...@@ -63,7 +64,9 @@ export default { ...@@ -63,7 +64,9 @@ export default {
let t = this.job.metadata.timeout_human_readable; let t = this.job.metadata.timeout_human_readable;
if (this.job.metadata.timeout_source !== '') { if (this.job.metadata.timeout_source !== '') {
t += ` (from ${this.job.metadata.timeout_source})`; t += sprintf(__(` (from %{timeoutSource})`), {
timeoutSource: this.job.metadata.timeout_source,
});
} }
return t; return t;
......
...@@ -16,6 +16,9 @@ msgstr "" ...@@ -16,6 +16,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
msgid " (from %{timeoutSource})"
msgstr ""
msgid " Please sign in." msgid " Please sign in."
msgstr "" msgstr ""
...@@ -9175,6 +9178,9 @@ msgid_plural "Showing %d events" ...@@ -9175,6 +9178,9 @@ msgid_plural "Showing %d events"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Showing last %{size} of log -"
msgstr ""
msgid "Side-by-side" msgid "Side-by-side"
msgstr "" msgstr ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册