Commit bfc273f8 authored by Kev's avatar Kev

Fix confusing button text when importing from GitHub

parent f7447302
...@@ -60,13 +60,17 @@ export default { ...@@ -60,13 +60,17 @@ export default {
}, },
importAllButtonText() { importAllButtonText() {
return this.hasIncompatibleRepos if (this.isImportingAnyRepo) {
? n__( return __('Importing...');
'Import %d compatible repository', }
'Import %d compatible repositories',
this.importAllCount, if (this.hasIncompatibleRepos)
) return n__(
: n__('Import %d repository', 'Import %d repositories', this.importAllCount); 'Import %d compatible repository',
'Import %d compatible repositories',
this.importAllCount,
);
return n__('Import %d repository', 'Import %d repositories', this.importAllCount);
}, },
emptyStateText() { emptyStateText() {
......
...@@ -14698,6 +14698,9 @@ msgstr "" ...@@ -14698,6 +14698,9 @@ msgstr ""
msgid "Imported requirements" msgid "Imported requirements"
msgstr "" msgstr ""
msgid "Importing..."
msgstr ""
msgid "Improve Merge Requests and customer support with GitLab Enterprise Edition." msgid "Improve Merge Requests and customer support with GitLab Enterprise Edition."
msgstr "" msgstr ""
......
...@@ -142,6 +142,21 @@ describe('ImportProjectsTable', () => { ...@@ -142,6 +142,21 @@ describe('ImportProjectsTable', () => {
}, },
); );
it('sets the button text to "Importing..." when importing repos', () => {
createComponent({
state: {
providerRepos: [providerRepo],
},
getters: {
hasIncompatibleRepos: () => false,
importAllCount: () => 10,
isImportingAnyRepo: () => true,
},
});
expect(findImportAllButton().text()).toBe('Importing...');
});
it('renders an empty state if there are no repositories available', () => { it('renders an empty state if there are no repositories available', () => {
createComponent({ state: { repositories: [] } }); createComponent({ state: { repositories: [] } });
......
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