Commit 8e3737c2 authored by Samantha Ming's avatar Samantha Ming Committed by Paul Slaughter

Refactor translation to use gl-sprintf

parent 56550f91
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton, GlSprintf } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
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';
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
Icon, Icon,
GlLink, GlLink,
GlButton, GlButton,
GlSprintf,
SettingsDropdown, SettingsDropdown,
DiffStats, DiffStats,
}, },
...@@ -106,23 +107,29 @@ export default { ...@@ -106,23 +107,29 @@ export default {
> >
<icon name="file-tree" /> <icon name="file-tree" />
</button> </button>
<div v-if="showDropdowns" class="d-flex align-items-center compare-versions-container"> <gl-sprintf
{{ __('Compare') }} v-if="showDropdowns"
<compare-versions-dropdown class="d-flex align-items-center compare-versions-container"
:other-versions="mergeRequestDiffs" :message="s__('MergeRequest|Compare %{source} and %{target}')"
:merge-request-version="mergeRequestDiff" >
:show-commit-count="true" <template #source>
class="mr-version-dropdown" <compare-versions-dropdown
/> :other-versions="mergeRequestDiffs"
{{ __('and') }} :merge-request-version="mergeRequestDiff"
<compare-versions-dropdown :show-commit-count="true"
:other-versions="comparableDiffs" class="mr-version-dropdown"
:base-version-path="baseVersionPath" />
:start-version="startVersion" </template>
:target-branch="targetBranch" <template #target>
class="mr-version-compare-dropdown" <compare-versions-dropdown
/> :other-versions="comparableDiffs"
</div> :base-version-path="baseVersionPath"
:start-version="startVersion"
:target-branch="targetBranch"
class="mr-version-compare-dropdown"
/>
</template>
</gl-sprintf>
<div v-else-if="commit"> <div v-else-if="commit">
{{ __('Viewing commit') }} {{ __('Viewing commit') }}
<gl-link :href="commit.commit_url" class="monospace">{{ commit.short_id }}</gl-link> <gl-link :href="commit.commit_url" class="monospace">{{ commit.short_id }}</gl-link>
......
...@@ -11944,6 +11944,9 @@ msgstr "" ...@@ -11944,6 +11944,9 @@ msgstr ""
msgid "MergeRequests|started a thread on commit %{linkStart}%{commitDisplay}%{linkEnd}" msgid "MergeRequests|started a thread on commit %{linkStart}%{commitDisplay}%{linkEnd}"
msgstr "" msgstr ""
msgid "MergeRequest|Compare %{source} and %{target}"
msgstr ""
msgid "MergeRequest|Error dismissing suggestion popover. Please try again." msgid "MergeRequest|Error dismissing suggestion popover. Please try again."
msgstr "" msgstr ""
...@@ -22255,9 +22258,6 @@ msgstr "" ...@@ -22255,9 +22258,6 @@ msgstr ""
msgid "among other things" msgid "among other things"
msgstr "" msgstr ""
msgid "and"
msgstr ""
msgid "any-approver for the merge request already exists" msgid "any-approver for the merge request already exists"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment