Commit 0795742f authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'diff-filter-bar-placeholder-text' into 'master'

Changed the placeholder text of the diff tree filter input

Closes #58339

See merge request gitlab-org/gitlab-ce!28352
parents bc852e05 10074ece
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective } from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import FileRow from '~/vue_shared/components/file_row.vue'; import FileRow from '~/vue_shared/components/file_row.vue';
import FileRowStats from './file_row_stats.vue'; import FileRowStats from './file_row_stats.vue';
...@@ -57,6 +58,9 @@ export default { ...@@ -57,6 +58,9 @@ export default {
this.search = ''; this.search = '';
}, },
}, },
searchPlaceholder: sprintf(s__('MergeRequest|Filter files or search with %{modifier_key}+p'), {
modifier_key: /Mac/i.test(navigator.userAgent) ? 'cmd' : 'ctrl',
}),
}; };
</script> </script>
...@@ -65,10 +69,13 @@ export default { ...@@ -65,10 +69,13 @@ export default {
<div class="append-bottom-8 position-relative tree-list-search d-flex"> <div class="append-bottom-8 position-relative tree-list-search d-flex">
<div class="flex-fill d-flex"> <div class="flex-fill d-flex">
<icon name="search" class="position-absolute tree-list-icon" /> <icon name="search" class="position-absolute tree-list-icon" />
<label for="diff-tree-search" class="sr-only">{{ $options.searchPlaceholder }}</label>
<input <input
id="diff-tree-search"
v-model="search" v-model="search"
:placeholder="s__('MergeRequest|Filter files')" :placeholder="$options.searchPlaceholder"
type="search" type="search"
name="diff-tree-search"
class="form-control" class="form-control"
/> />
<button <button
......
...@@ -5935,7 +5935,7 @@ msgstr "" ...@@ -5935,7 +5935,7 @@ msgstr ""
msgid "MergeRequest|Error loading full diff. Please try again." msgid "MergeRequest|Error loading full diff. Please try again."
msgstr "" msgstr ""
msgid "MergeRequest|Filter files" msgid "MergeRequest|Filter files or search with %{modifier_key}+p"
msgstr "" msgstr ""
msgid "MergeRequest|No files found" msgid "MergeRequest|No files found"
......
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