Change strings for projects dropdown placeholder and error state

gitlab-ce#37513
This commit is contained in:
Chris Peressini 2017-09-06 13:36:51 +00:00
parent 5d2b7aa200
commit e3c76e6b1b
5 changed files with 22 additions and 4 deletions

View file

@ -27,7 +27,7 @@ export default {
listEmptyMessage() {
return this.searchFailed ?
s__('ProjectsDropdown|Something went wrong on our end.') :
s__('ProjectsDropdown|No projects matched your query');
s__('ProjectsDropdown|Sorry, no projects matched your search');
},
},
};

View file

@ -53,7 +53,7 @@ export default {
class="form-control"
ref="search"
v-model="searchQuery"
:placeholder="s__('ProjectsDropdown|Search projects')"
:placeholder="s__('ProjectsDropdown|Search your projects')"
/>
<i
v-if="!searchQuery"

View file

@ -987,6 +987,24 @@ msgstr ""
msgid "Push Rules"
msgstr ""
msgid "ProjectsDropdown|Loading projects"
msgstr ""
msgid "ProjectsDropdown|Sorry, no projects matched your search"
msgstr ""
msgid "ProjectsDropdown|Projects you visit often will appear here"
msgstr ""
msgid "ProjectsDropdown|Search your projects"
msgstr ""
msgid "ProjectsDropdown|Something went wrong on our end"
msgstr ""
msgid "ProjectsDropdown|This feature requires browser localStorage support"
msgstr ""
msgid "Push events"
msgstr ""

View file

@ -43,7 +43,7 @@ describe('ProjectsListSearchComponent', () => {
expect(vm.listEmptyMessage).toBe('Something went wrong on our end.');
vm.searchFailed = false;
expect(vm.listEmptyMessage).toBe('No projects matched your query');
expect(vm.listEmptyMessage).toBe('Sorry, no projects matched your search');
});
});
});

View file

@ -94,7 +94,7 @@ describe('SearchComponent', () => {
expect(vm.$el.classList.contains('search-input-container')).toBeTruthy();
expect(vm.$el.classList.contains('hidden-xs')).toBeTruthy();
expect(inputEl).not.toBe(null);
expect(inputEl.getAttribute('placeholder')).toBe('Search projects');
expect(inputEl.getAttribute('placeholder')).toBe('Search your projects');
expect(vm.$el.querySelector('.search-icon')).toBeDefined();
});
});