summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-05-16 13:21:27 +0100
committerPhil Hughes <me@iamphill.com>2019-05-16 13:21:27 +0100
commit10074ecea0e440369d64cdb02b1c8138c38446d1 (patch)
tree48756cb643a3a9e2a4e86460a7905c35ae21a730
parent9ef67989b4d9462f6caa4f0f0ab7e8d264d47336 (diff)
downloadgitlab-ce-10074ecea0e440369d64cdb02b1c8138c38446d1.tar.gz
Changed the placeholder text of the diff tree filter input
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58339
-rw-r--r--app/assets/javascripts/diffs/components/tree_list.vue9
-rw-r--r--locale/gitlab.pot2
2 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/components/tree_list.vue b/app/assets/javascripts/diffs/components/tree_list.vue
index 384f33e0983..30be2e68e76 100644
--- a/app/assets/javascripts/diffs/components/tree_list.vue
+++ b/app/assets/javascripts/diffs/components/tree_list.vue
@@ -1,6 +1,7 @@
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
import { GlTooltipDirective } from '@gitlab/ui';
+import { s__, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import FileRow from '~/vue_shared/components/file_row.vue';
import FileRowStats from './file_row_stats.vue';
@@ -57,6 +58,9 @@ export default {
this.search = '';
},
},
+ searchPlaceholder: sprintf(s__('MergeRequest|Filter files or search with %{modifier_key}+p'), {
+ modifier_key: /Mac/i.test(navigator.userAgent) ? 'cmd' : 'ctrl',
+ }),
};
</script>
@@ -65,10 +69,13 @@ export default {
<div class="append-bottom-8 position-relative tree-list-search d-flex">
<div class="flex-fill d-flex">
<icon name="search" class="position-absolute tree-list-icon" />
+ <label for="diff-tree-search" class="sr-only">{{ $options.searchPlaceholder }}</label>
<input
+ id="diff-tree-search"
v-model="search"
- :placeholder="s__('MergeRequest|Filter files')"
+ :placeholder="$options.searchPlaceholder"
type="search"
+ name="diff-tree-search"
class="form-control"
/>
<button
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index f13c3023bab..20b704eb313 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -5923,7 +5923,7 @@ msgstr ""
msgid "MergeRequest|Error loading full diff. Please try again."
msgstr ""
-msgid "MergeRequest|Filter files"
+msgid "MergeRequest|Filter files or search with %{modifier_key}+p"
msgstr ""
msgid "MergeRequest|No files found"