Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ef359df4
Commit
ef359df4
authored
Dec 18, 2019
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up design management error messages
parent
64174a7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
20 deletions
+18
-20
ee/app/assets/javascripts/design_management/utils/error_messages.js
...ets/javascripts/design_management/utils/error_messages.js
+5
-7
ee/spec/frontend/design_management/pages/design/__snapshots__/index_spec.js.snap
..._management/pages/design/__snapshots__/index_spec.js.snap
+1
-1
ee/spec/frontend/design_management/pages/design/index_spec.js
...pec/frontend/design_management/pages/design/index_spec.js
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+11
-11
No files found.
ee/app/assets/javascripts/design_management/utils/error_messages.js
View file @
ef359df4
...
@@ -2,20 +2,18 @@ import { __, s__, sprintf } from '~/locale';
...
@@ -2,20 +2,18 @@ import { __, s__, sprintf } from '~/locale';
export
const
designDeletionError
=
({
singular
=
true
}
=
{})
=>
{
export
const
designDeletionError
=
({
singular
=
true
}
=
{})
=>
{
const
design
=
singular
?
__
(
'
a design
'
)
:
__
(
'
designs
'
);
const
design
=
singular
?
__
(
'
a design
'
)
:
__
(
'
designs
'
);
return
sprintf
(
s__
(
'
DesignManagement|Could not delete %{design}. Please try again
'
),
{
return
sprintf
(
s__
(
'
Could not delete %{design}. Please try again.
'
),
{
design
,
design
,
});
});
};
};
export
const
ADD_DISCUSSION_COMMENT_ERROR
=
s__
(
export
const
ADD_DISCUSSION_COMMENT_ERROR
=
s__
(
'
DesignManagement|Could not add a new comment. Please try again
'
,
'
DesignManagement|Could not add a new comment. Please try again
.
'
,
);
);
export
const
ADD_IMAGE_DIFF_NOTE_ERROR
=
s__
(
export
const
ADD_IMAGE_DIFF_NOTE_ERROR
=
s__
(
'
DesignManagement|Could not create new discussion. Please try again.
'
,
'
DesignManagement|Could not create new discussion. Please try again.
'
,
);
);
export
const
UPLOAD_DESIGN_ERROR
=
s__
(
export
const
UPLOAD_DESIGN_ERROR
=
s__
(
'
DesignManagement|Error uploading a new design. Please try again
'
,
'
DesignManagement|Error uploading a new design. Please try again.
'
,
);
export
const
DESIGN_NOT_FOUND_ERROR
=
s__
(
'
DesignManagement|Could not find design
'
);
export
const
DESIGN_NOT_EXIST_ERROR
=
s__
(
'
DesignManagement|Requested design version does not exist
'
,
);
);
export
const
DESIGN_NOT_FOUND_ERROR
=
__
(
'
Could not find design
'
);
export
const
DESIGN_NOT_EXIST_ERROR
=
__
(
'
Requested design version does not exist
'
);
ee/spec/frontend/design_management/pages/design/__snapshots__/index_spec.js.snap
View file @
ef359df4
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Design management design index page
flash
GlAlert is rendered in correct position with correct content 1`] = `
exports[`Design management design index page
with error
GlAlert is rendered in correct position with correct content 1`] = `
<div
<div
class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row"
class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row"
>
>
...
...
ee/spec/frontend/design_management/pages/design/index_spec.js
View file @
ef359df4
...
@@ -92,7 +92,7 @@ describe('Design management design index page', () => {
...
@@ -92,7 +92,7 @@ describe('Design management design index page', () => {
});
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
expect
(
wrapper
.
element
).
toMatchSnapshot
();
expect
(
wrapper
.
find
(
GlAlert
)
).
toBeUndefined
(
);
expect
(
wrapper
.
find
(
GlAlert
)
.
exists
()).
toBe
(
false
);
});
});
describe
(
'
when has no discussions
'
,
()
=>
{
describe
(
'
when has no discussions
'
,
()
=>
{
...
...
locale/gitlab.pot
View file @
ef359df4
...
@@ -5000,12 +5000,18 @@ msgstr ""
...
@@ -5000,12 +5000,18 @@ msgstr ""
msgid "Could not create project"
msgid "Could not create project"
msgstr ""
msgstr ""
msgid "Could not delete %{design}. Please try again."
msgstr ""
msgid "Could not delete chat nickname %{chat_name}."
msgid "Could not delete chat nickname %{chat_name}."
msgstr ""
msgstr ""
msgid "Could not fetch projects"
msgid "Could not fetch projects"
msgstr ""
msgstr ""
msgid "Could not find design"
msgstr ""
msgid "Could not remove the trigger."
msgid "Could not remove the trigger."
msgstr ""
msgstr ""
...
@@ -6017,18 +6023,12 @@ msgstr ""
...
@@ -6017,18 +6023,12 @@ msgstr ""
msgid "DesignManagement|Are you sure you want to delete the selected designs?"
msgid "DesignManagement|Are you sure you want to delete the selected designs?"
msgstr ""
msgstr ""
msgid "DesignManagement|Could not add a new comment. Please try again"
msgid "DesignManagement|Could not add a new comment. Please try again
.
"
msgstr ""
msgstr ""
msgid "DesignManagement|Could not create new discussion. Please try again."
msgid "DesignManagement|Could not create new discussion. Please try again."
msgstr ""
msgstr ""
msgid "DesignManagement|Could not delete %{design}. Please try again"
msgstr ""
msgid "DesignManagement|Could not find design"
msgstr ""
msgid "DesignManagement|Delete"
msgid "DesignManagement|Delete"
msgstr ""
msgstr ""
...
@@ -6041,7 +6041,7 @@ msgstr ""
...
@@ -6041,7 +6041,7 @@ msgstr ""
msgid "DesignManagement|Deselect all"
msgid "DesignManagement|Deselect all"
msgstr ""
msgstr ""
msgid "DesignManagement|Error uploading a new design. Please try again"
msgid "DesignManagement|Error uploading a new design. Please try again
.
"
msgstr ""
msgstr ""
msgid "DesignManagement|Go back to designs"
msgid "DesignManagement|Go back to designs"
...
@@ -6053,9 +6053,6 @@ msgstr ""
...
@@ -6053,9 +6053,6 @@ msgstr ""
msgid "DesignManagement|Go to previous design"
msgid "DesignManagement|Go to previous design"
msgstr ""
msgstr ""
msgid "DesignManagement|Requested design version does not exist"
msgstr ""
msgid "DesignManagement|Requested design version does not exist. Showing latest version instead"
msgid "DesignManagement|Requested design version does not exist. Showing latest version instead"
msgstr ""
msgstr ""
...
@@ -15195,6 +15192,9 @@ msgstr ""
...
@@ -15195,6 +15192,9 @@ msgstr ""
msgid "Requested %{time_ago}"
msgid "Requested %{time_ago}"
msgstr ""
msgstr ""
msgid "Requested design version does not exist"
msgstr ""
msgid "Requests Profiles"
msgid "Requests Profiles"
msgstr ""
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment