Commit a8d50a38 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'pedroms/file-header-dropdown-title' into 'master'

Change MR file header dropdown title and tooltip

See merge request gitlab-org/gitlab!43886
parents 1be89f35 319cf3cc
...@@ -9,7 +9,6 @@ import { ...@@ -9,7 +9,6 @@ import {
GlButtonGroup, GlButtonGroup,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlDropdownSectionHeader,
GlDropdownDivider, GlDropdownDivider,
} from '@gitlab/ui'; } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
...@@ -19,6 +18,7 @@ import { __, s__, sprintf } from '~/locale'; ...@@ -19,6 +18,7 @@ import { __, s__, sprintf } from '~/locale';
import { diffViewerModes } from '~/ide/constants'; import { diffViewerModes } from '~/ide/constants';
import DiffStats from './diff_stats.vue'; import DiffStats from './diff_stats.vue';
import { scrollToElement } from '~/lib/utils/common_utils'; import { scrollToElement } from '~/lib/utils/common_utils';
import { DIFF_FILE_HEADER } from '../i18n';
export default { export default {
components: { components: {
...@@ -30,13 +30,15 @@ export default { ...@@ -30,13 +30,15 @@ export default {
GlButtonGroup, GlButtonGroup,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlDropdownSectionHeader,
GlDropdownDivider, GlDropdownDivider,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
SafeHtml: GlSafeHtmlDirective, SafeHtml: GlSafeHtmlDirective,
}, },
i18n: {
...DIFF_FILE_HEADER,
},
props: { props: {
discussionPath: { discussionPath: {
type: String, type: String,
...@@ -290,7 +292,7 @@ export default { ...@@ -290,7 +292,7 @@ export default {
icon="external-link" icon="external-link"
/> />
<gl-dropdown <gl-dropdown
v-gl-tooltip.hover.focus="__('More actions')" v-gl-tooltip.hover.focus="$options.i18n.optionsDropdownTitle"
right right
toggle-class="btn-icon js-diff-more-actions" toggle-class="btn-icon js-diff-more-actions"
class="gl-pt-0!" class="gl-pt-0!"
...@@ -299,11 +301,8 @@ export default { ...@@ -299,11 +301,8 @@ export default {
> >
<template #button-content> <template #button-content>
<gl-icon name="ellipsis_v" class="mr-0" /> <gl-icon name="ellipsis_v" class="mr-0" />
<span class="sr-only">{{ __('More actions') }}</span> <span class="sr-only">{{ $options.i18n.optionsDropdownTitle }}</span>
</template> </template>
<gl-dropdown-section-header>
{{ __('More actions') }}
</gl-dropdown-section-header>
<gl-dropdown-item <gl-dropdown-item
v-if="diffFile.replaced_view_path" v-if="diffFile.replaced_view_path"
ref="replacedFileButton" ref="replacedFileButton"
......
import { __ } from '~/locale';
export const DIFF_FILE_HEADER = {
optionsDropdownTitle: __('Options'),
};
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